@@ -9,9 +9,12 @@ namespace JitBench
9
9
{
10
10
class MusicStoreBenchmark : WebAppBenchmark
11
11
{
12
- public MusicStoreBenchmark ( ) : base ( "MusicStore" ) { }
12
+ public MusicStoreBenchmark ( ) : base ( "MusicStore" , "MusicStore.dll" ) { }
13
13
14
- protected override string ExecutableName => "MusicStore.dll" ;
14
+ protected override string GetJitBenchRepoRootDir ( string outputDir )
15
+ {
16
+ return Path . Combine ( outputDir , "K" ) ;
17
+ }
15
18
16
19
protected override string GetWebAppSrcDirectory ( string outputDir )
17
20
{
@@ -21,9 +24,12 @@ protected override string GetWebAppSrcDirectory(string outputDir)
21
24
22
25
class AllReadyBenchmark : WebAppBenchmark
23
26
{
24
- public AllReadyBenchmark ( ) : base ( "AllReady" ) { }
27
+ public AllReadyBenchmark ( ) : base ( "AllReady" , "AllReady.dll" ) { }
25
28
26
- protected override string ExecutableName => "AllReady.dll" ;
29
+ protected override string GetJitBenchRepoRootDir ( string outputDir )
30
+ {
31
+ return Path . Combine ( outputDir , "J" ) ;
32
+ }
27
33
28
34
protected override string GetWebAppSrcDirectory ( string outputDir )
29
35
{
@@ -35,13 +41,11 @@ abstract class WebAppBenchmark : Benchmark
35
41
{
36
42
private static readonly HashSet < int > DefaultExitCodes = new HashSet < int > ( new [ ] { 0 } ) ;
37
43
38
- public WebAppBenchmark ( string name ) : base ( name )
44
+ public WebAppBenchmark ( string name , string executableName ) : base ( name )
39
45
{
40
- ExePath = ExecutableName ;
46
+ ExePath = executableName ;
41
47
}
42
48
43
- protected abstract string ExecutableName { get ; }
44
-
45
49
public override async Task Setup ( DotNetInstallation dotNetInstall , string outputDir , bool useExistingSetup , ITestOutputHelper output )
46
50
{
47
51
if ( ! useExistingSetup )
@@ -53,7 +57,7 @@ public override async Task Setup(DotNetInstallation dotNetInstall, string output
53
57
await Publish ( dotNetInstall , outputDir , setupSection ) ;
54
58
}
55
59
}
56
- string webAppSrcDirectory = GetWebAppSrcDirectory ( outputDir ) ;
60
+
57
61
string tfm = DotNetSetup . GetTargetFrameworkMonikerForFrameworkVersion ( dotNetInstall . FrameworkVersion ) ;
58
62
WorkingDirPath = GetWebAppPublishDirectory ( dotNetInstall , outputDir , tfm ) ;
59
63
EnvironmentVariables . Add ( "DOTNET_SHARED_STORE" , GetWebAppStoreDir ( outputDir ) ) ;
@@ -78,7 +82,7 @@ async Task ExecuteGitCommand(string arguments, ITestOutputHelper output, string
78
82
throw new Exception ( $ "git { arguments } has failed, the exit code was { exitCode } ") ;
79
83
}
80
84
81
- private static async Task CreateStore ( DotNetInstallation dotNetInstall , string outputDir , ITestOutputHelper output )
85
+ private async Task CreateStore ( DotNetInstallation dotNetInstall , string outputDir , ITestOutputHelper output )
82
86
{
83
87
string tfm = DotNetSetup . GetTargetFrameworkMonikerForFrameworkVersion ( dotNetInstall . FrameworkVersion ) ;
84
88
string rid = $ "win7-{ dotNetInstall . Architecture } ";
@@ -228,10 +232,7 @@ public override bool TryGetBenchviewCustomMetricReporting(Metric originalMetric,
228
232
return true ;
229
233
}
230
234
231
- protected static string GetJitBenchRepoRootDir ( string outputDir )
232
- {
233
- return Path . Combine ( outputDir , "J" ) ;
234
- }
235
+ protected abstract string GetJitBenchRepoRootDir ( string outputDir ) ;
235
236
236
237
protected abstract string GetWebAppSrcDirectory ( string outputDir ) ;
237
238
@@ -252,23 +253,16 @@ string GetWebAppPublishDirectory(DotNetInstallation dotNetInstall, string output
252
253
return null ;
253
254
}
254
255
255
- static string GetWebAppStoreDir ( string outputDir )
256
+ string GetWebAppStoreDir ( string outputDir )
256
257
{
257
258
return Path . Combine ( GetJitBenchRepoRootDir ( outputDir ) , StoreDirName ) ;
258
259
}
259
260
260
- string GetLocalJitBenchRepoDirectory ( )
261
- {
262
- return Environment . GetEnvironmentVariable ( "MUSICSTORE_PRIVATE_REPO" ) ;
263
- }
264
-
265
261
private const string JitBenchRepoUrl = "https://github.com/aspnet/JitBench" ;
266
262
private const string JitBenchCommitSha1Id = "6bee730486f272d31f23f1033225090511f856f3" ;
267
- private const string EnvironmentFileName = "JitBenchEnvironment.txt" ;
268
263
private const string StoreDirName = ".store" ;
269
264
private readonly Metric StartupMetric = new Metric ( "Startup" , "ms" ) ;
270
265
private readonly Metric FirstRequestMetric = new Metric ( "First Request" , "ms" ) ;
271
266
private readonly Metric MedianResponseMetric = new Metric ( "Median Response" , "ms" ) ;
272
- private readonly Metric MeanResponseMetric = new Metric ( "Mean Response" , "ms" ) ;
273
267
}
274
268
}
0 commit comments