diff options
author | Adam Sitnik <adam.sitnik@gmail.com> | 2018-03-30 15:47:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-30 15:47:16 +0200 |
commit | d845ef1c33f0283d18541714ad9469a7b1a559e6 (patch) | |
tree | 0da6fef032faea3535ca36c7b489509fa0803f98 | |
parent | 3077484466ebc016194f16f80d9c65cb9660d703 (diff) | |
download | coreclr-d845ef1c33f0283d18541714ad9469a7b1a559e6.tar.gz coreclr-d845ef1c33f0283d18541714ad9469a7b1a559e6.tar.bz2 coreclr-d845ef1c33f0283d18541714ad9469a7b1a559e6.zip |
JitBench scenarios fix for 2.1 branch (#17317)
* JitBench scenarios fix (#17154)
* each web app should use a separate directory to avoid conflicts + dead code removal
* update the framework package version to get scenarios benchmarks working
* use the correct version for 2.1 branch
-rw-r--r-- | dependencies.props | 2 | ||||
-rw-r--r-- | tests/src/performance/Scenario/JitBench/Benchmarks/WebAppBenchmarks.cs | 38 |
2 files changed, 17 insertions, 23 deletions
diff --git a/dependencies.props b/dependencies.props index 3a2bb972db..08558225eb 100644 --- a/dependencies.props +++ b/dependencies.props @@ -45,7 +45,7 @@ <!-- Scenario tests install this version of Microsoft.NetCore.App, then patch coreclr binaries via xcopy. At the moment it is updated manually whenever breaking changes require it to move forward, but it would be nice if we could update it automatically as we do with many of the package versions above --> - <BaselineMicrosoftNetCoreAppPackageVersion>2.1.0-preview2-26131-06</BaselineMicrosoftNetCoreAppPackageVersion> + <BaselineMicrosoftNetCoreAppPackageVersion>2.1.0-preview2-26326-03</BaselineMicrosoftNetCoreAppPackageVersion> </PropertyGroup> <!-- Package versions used as toolsets --> diff --git a/tests/src/performance/Scenario/JitBench/Benchmarks/WebAppBenchmarks.cs b/tests/src/performance/Scenario/JitBench/Benchmarks/WebAppBenchmarks.cs index bcfac7ab22..81c37aec74 100644 --- a/tests/src/performance/Scenario/JitBench/Benchmarks/WebAppBenchmarks.cs +++ b/tests/src/performance/Scenario/JitBench/Benchmarks/WebAppBenchmarks.cs @@ -9,9 +9,12 @@ namespace JitBench { class MusicStoreBenchmark : WebAppBenchmark { - public MusicStoreBenchmark() : base("MusicStore") { } + public MusicStoreBenchmark() : base("MusicStore", "MusicStore.dll") { } - protected override string ExecutableName => "MusicStore.dll"; + protected override string GetJitBenchRepoRootDir(string outputDir) + { + return Path.Combine(outputDir, "K"); + } protected override string GetWebAppSrcDirectory(string outputDir) { @@ -21,9 +24,12 @@ namespace JitBench class AllReadyBenchmark : WebAppBenchmark { - public AllReadyBenchmark() : base("AllReady") { } + public AllReadyBenchmark() : base("AllReady", "AllReady.dll") { } - protected override string ExecutableName => "AllReady.dll"; + protected override string GetJitBenchRepoRootDir(string outputDir) + { + return Path.Combine(outputDir, "J"); + } protected override string GetWebAppSrcDirectory(string outputDir) { @@ -35,13 +41,11 @@ namespace JitBench { private static readonly HashSet<int> DefaultExitCodes = new HashSet<int>(new[] { 0 }); - public WebAppBenchmark(string name) : base(name) + public WebAppBenchmark(string name, string executableName) : base(name) { - ExePath = ExecutableName; + ExePath = executableName; } - protected abstract string ExecutableName { get; } - public override async Task Setup(DotNetInstallation dotNetInstall, string outputDir, bool useExistingSetup, ITestOutputHelper output) { if(!useExistingSetup) @@ -53,7 +57,7 @@ namespace JitBench await Publish(dotNetInstall, outputDir, setupSection); } } - string webAppSrcDirectory = GetWebAppSrcDirectory(outputDir); + string tfm = DotNetSetup.GetTargetFrameworkMonikerForFrameworkVersion(dotNetInstall.FrameworkVersion); WorkingDirPath = GetWebAppPublishDirectory(dotNetInstall, outputDir, tfm); EnvironmentVariables.Add("DOTNET_SHARED_STORE", GetWebAppStoreDir(outputDir)); @@ -78,7 +82,7 @@ namespace JitBench throw new Exception($"git {arguments} has failed, the exit code was {exitCode}"); } - private static async Task CreateStore(DotNetInstallation dotNetInstall, string outputDir, ITestOutputHelper output) + private async Task CreateStore(DotNetInstallation dotNetInstall, string outputDir, ITestOutputHelper output) { string tfm = DotNetSetup.GetTargetFrameworkMonikerForFrameworkVersion(dotNetInstall.FrameworkVersion); string rid = $"win7-{dotNetInstall.Architecture}"; @@ -228,10 +232,7 @@ namespace JitBench return true; } - protected static string GetJitBenchRepoRootDir(string outputDir) - { - return Path.Combine(outputDir, "J"); - } + protected abstract string GetJitBenchRepoRootDir(string outputDir); protected abstract string GetWebAppSrcDirectory(string outputDir); @@ -252,23 +253,16 @@ namespace JitBench return null; } - static string GetWebAppStoreDir(string outputDir) + string GetWebAppStoreDir(string outputDir) { return Path.Combine(GetJitBenchRepoRootDir(outputDir), StoreDirName); } - string GetLocalJitBenchRepoDirectory() - { - return Environment.GetEnvironmentVariable("MUSICSTORE_PRIVATE_REPO"); - } - private const string JitBenchRepoUrl = "https://github.com/aspnet/JitBench"; private const string JitBenchCommitSha1Id = "6bee730486f272d31f23f1033225090511f856f3"; - private const string EnvironmentFileName = "JitBenchEnvironment.txt"; private const string StoreDirName = ".store"; private readonly Metric StartupMetric = new Metric("Startup", "ms"); private readonly Metric FirstRequestMetric = new Metric("First Request", "ms"); private readonly Metric MedianResponseMetric = new Metric("Median Response", "ms"); - private readonly Metric MeanResponseMetric = new Metric("Mean Response", "ms"); } } |