File tree Expand file tree Collapse file tree 5 files changed +497
-9
lines changed Expand file tree Collapse file tree 5 files changed +497
-9
lines changed Original file line number Diff line number Diff line change @@ -123,18 +123,24 @@ module Benchmarker =
123
123
let private benchmarkOutput = Path.GetFullPath( Paths.Output( " benchmarks" )) |> directoryInfo
124
124
let private copyToOutput file = CopyFile benchmarkOutput.FullName file
125
125
126
- let Run () =
126
+ let Run ( runInteractive : bool ) =
127
127
128
128
ensureDirExists benchmarkOutput
129
129
130
130
let projectJson = testsProjectDirectory @@ " project.json"
131
131
132
132
// running benchmarks can timeout so clean up any generated benchmark files
133
133
try
134
- DotNetCli.RunCommand( fun p ->
135
- { p with
136
- WorkingDir = testsProjectDirectory
137
- }) " run -f net46 -c Release Benchmark non-interactive"
134
+ if runInteractive then
135
+ DotNetCli.RunCommand( fun p ->
136
+ { p with
137
+ WorkingDir = testsProjectDirectory
138
+ }) " run -f net46 -c Release Benchmark"
139
+ else
140
+ DotNetCli.RunCommand( fun p ->
141
+ { p with
142
+ WorkingDir = testsProjectDirectory
143
+ }) " run -f net46 -c Release Benchmark non-interactive"
138
144
finally
139
145
let benchmarkOutputFiles =
140
146
let output = combinePaths testsProjectDirectory " BenchmarkDotNet.Artifacts"
Original file line number Diff line number Diff line change @@ -79,6 +79,14 @@ module Commandline =
79
79
80
80
| [ " benchmark" ; IsUrl elasticsearch] ->
81
81
setBuildParam " elasticsearch" elasticsearch
82
+ setBuildParam " nonInteractive" " 0"
83
+
84
+ | [ " benchmark" ; IsUrl elasticsearch; " non-interactive" ] ->
85
+ setBuildParam " elasticsearch" elasticsearch
86
+ setBuildParam " nonInteractive" " 1"
87
+
88
+ | [ " benchmark" ; " non-interactive" ] ->
89
+ setBuildParam " nonInteractive" " 1"
82
90
83
91
| [ " profile" ; IsUrl elasticsearch] ->
84
92
setBuildParam " elasticsearch" elasticsearch
Original file line number Diff line number Diff line change @@ -48,8 +48,9 @@ Target "Profile" <| fun _ ->
48
48
49
49
Target " Integrate" <| Tests.RunIntegrationTests
50
50
51
- Target " Benchmark" <| fun _ ->
52
- Benchmarker.Run()
51
+ Target " Benchmark" <| fun _ ->
52
+ let runInteractive = (( getBuildParam " nonInteractive" ) <> " 1" )
53
+ Benchmarker.Run( runInteractive)
53
54
let url = getBuildParam " elasticsearch"
54
55
Benchmarker.IndexResults url
55
56
You can’t perform that action at this time.
0 commit comments