-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for numerous NuGet, handling inheritance (#25)
- Loading branch information
1 parent
fba8713
commit 047c03f
Showing
90 changed files
with
193,191 additions
and
50,860 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
using BenchmarkDotNet.Attributes; | ||
|
||
using NuGet.Frameworks; | ||
using NuGet.Packaging.Core; | ||
using NuGet.Versioning; | ||
|
||
using Pharmacist.Core.NuGet; | ||
|
||
namespace Pharmacist.Benchmarks | ||
{ | ||
[ClrJob] | ||
////[CoreJob] | ||
[MemoryDiagnoser] | ||
[MarkdownExporterAttribute.GitHub] | ||
public class NuGetTaskGeneratorBenchmarks | ||
{ | ||
private static readonly string _packageDirectory = Path.Combine(Path.GetTempPath(), "Pharmacist.Benchamarks"); | ||
|
||
[IterationSetup] | ||
public void IterationSetup() | ||
{ | ||
try | ||
{ | ||
Directory.Delete(_packageDirectory); | ||
} | ||
catch | ||
{ | ||
} | ||
} | ||
|
||
[Benchmark] | ||
public async Task MultipleDirectoryCase() | ||
{ | ||
// NetCore contains multiple directories that match. | ||
var package = new[] { new PackageIdentity("Microsoft.NETCore.App", new NuGetVersion("2.0.0")) }; | ||
var frameworks = new[] { FrameworkConstants.CommonFrameworks.NetCoreApp20 }; | ||
|
||
var result = (await NuGetPackageHelper | ||
.DownloadPackageFilesAndFolder(package, frameworks, packageOutputDirectory: _packageDirectory) | ||
.ConfigureAwait(false)).ToList(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.