Skip to content

Commit 777da0a

Browse files
authored
Fixing and simplifying background compiler benchmarks (#16501)
* Fixing and simplifying background compiler benchmarks * up * Rename
1 parent 119a2eb commit 777da0a

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/BackgroundCompilerBenchmarks.fs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,7 @@ type NoFileSystemCheckerBenchmark() =
152152
let mutable benchmark : ProjectWorkflowBuilder = Unchecked.defaultof<_>
153153

154154
[<ParamsAllValues>]
155-
member val UseGetSource = true with get,set
156-
157-
[<ParamsAllValues>]
158-
member val UseChangeNotifications = true with get,set
155+
member val UseInMemoryDocuments = true with get,set
159156

160157
[<ParamsAllValues>]
161158
member val EmptyCache = true with get,set
@@ -165,8 +162,8 @@ type NoFileSystemCheckerBenchmark() =
165162
benchmark <-
166163
ProjectWorkflowBuilder(
167164
project,
168-
useGetSource = this.UseGetSource,
169-
useChangeNotifications = this.UseChangeNotifications).CreateBenchmarkBuilder()
165+
useGetSource = this.UseInMemoryDocuments,
166+
useChangeNotifications = this.UseInMemoryDocuments).CreateBenchmarkBuilder()
170167

171168
[<IterationSetup>]
172169
member this.EditFirstFile_OnlyInternalChange() =
@@ -178,15 +175,14 @@ type NoFileSystemCheckerBenchmark() =
178175
member this.ExampleWorkflow() =
179176

180177
use _ = Activity.start "Benchmark" [
181-
"UseGetSource", this.UseGetSource.ToString()
182-
"UseChangeNotifications", this.UseChangeNotifications.ToString()
178+
"UseInMemoryDocuments", this.UseInMemoryDocuments.ToString()
183179
]
184180

185181
let first = "File001"
186182
let middle = $"File%03d{size / 2}"
187183
let last = $"File%03d{size}"
188184

189-
if this.UseGetSource && this.UseChangeNotifications then
185+
if this.UseInMemoryDocuments then
190186

191187
benchmark {
192188
updateFile first updatePublicSurface

0 commit comments

Comments
 (0)