Build-Time Hello World Performance Test (#2681)
Hello world build performance benchmark.
This commit is contained in:
parent
f420e1478e
commit
705a48940f
6 changed files with 194 additions and 19 deletions
|
@ -211,7 +211,9 @@ namespace Microsoft.DotNet.Tests.EndToEnd
|
|||
catch(Exception) {}
|
||||
|
||||
Directory.CreateDirectory(RestoredTestProjectDirectory);
|
||||
WriteNuGetConfig(RestoredTestProjectDirectory);
|
||||
|
||||
// Todo: this is a hack until corefx is on nuget.org remove this After RC 2 Release
|
||||
NuGetConfig.Write(RestoredTestProjectDirectory);
|
||||
|
||||
var currentDirectory = Directory.GetCurrentDirectory();
|
||||
Directory.SetCurrentDirectory(RestoredTestProjectDirectory);
|
||||
|
@ -248,24 +250,6 @@ namespace Microsoft.DotNet.Tests.EndToEnd
|
|||
return isSupported;
|
||||
}
|
||||
|
||||
// Todo: this is a hack until corefx is on nuget.org remove this After RC 2 Release
|
||||
private static void WriteNuGetConfig(string directory)
|
||||
{
|
||||
var contents = @"<?xml version=""1.0"" encoding=""utf-8""?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
|
||||
<clear />
|
||||
<add key=""dotnet-core"" value=""https://dotnet.myget.org/F/dotnet-core/api/v3/index.json"" />
|
||||
<add key=""api.nuget.org"" value=""https://api.nuget.org/v3/index.json"" />
|
||||
</packageSources>
|
||||
</configuration>";
|
||||
|
||||
var path = Path.Combine(directory, "NuGet.config");
|
||||
|
||||
File.WriteAllText(path, contents);
|
||||
}
|
||||
|
||||
private static DateTime GetLastWriteTimeUtcOfDirectoryFiles(string outputDirectory)
|
||||
{
|
||||
return Directory.EnumerateFiles(outputDirectory).Max(f => File.GetLastWriteTimeUtc(f));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue