File tree 1 file changed +10
-5
lines changed
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ type GrammarReaderBenchmark() =
16
16
17
17
let mutable base64EGT = " "
18
18
19
+ [<VolatileField>]
20
+ let mutable builtGrammar = Unchecked.defaultof<_>
21
+
19
22
[<GlobalSetup>]
20
23
member __.Setup () =
21
24
let bytes = File.ReadAllBytes " gml.egt"
@@ -25,9 +28,11 @@ type GrammarReaderBenchmark() =
25
28
member __.Base64EGT () =
26
29
base64EGT |> EGT.ofBase64String
27
30
28
- [<Benchmark>]
31
+ [<Benchmark( OperationsPerInvoke = 100 ) >]
29
32
member __.BuildGrammar () =
30
- GOLDMetaLanguage.designtime
31
- |> DesigntimeFarkleBuild.createGrammarDefinition
32
- |> DesigntimeFarkleBuild.buildGrammarOnly
33
- |> returnOrFail
33
+ for __ = 0 to 99 do
34
+ builtGrammar <-
35
+ GOLDMetaLanguage.designtime
36
+ |> DesigntimeFarkleBuild.createGrammarDefinition
37
+ |> DesigntimeFarkleBuild.buildGrammarOnly
38
+ |> returnOrFail
You can’t perform that action at this time.
0 commit comments