Last active
May 25, 2016 21:47
-
-
Save xoofx/c0508e8fc4a91cb00a1141848eea8371 to your computer and use it in GitHub Desktop.
Hardcoded patch for BenchmarkDotNet to have fixed GC results in SingleRun mode (only working for Markdig benchmarks env)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var config = ManualConfig.Create(DefaultConfig.Instance); | |
var gcDiagnoser = new MemoryDiagnoser(); | |
config.Add(new Job { Mode = Mode.SingleRun, LaunchCount = 2, WarmupCount = 2, TargetCount = 10 }); | |
config.Add(gcDiagnoser); | |
_________________________________ Patch for BenchMarkDotNet to have precise GC: | |
diff --git a/BenchmarkDotNet/Running/MethodInvoker.cs b/BenchmarkDotNet/Running/MethodInvoker.cs | |
index e8d8de5..6a46aa2 100644 | |
--- a/BenchmarkDotNet/Running/MethodInvoker.cs | |
+++ b/BenchmarkDotNet/Running/MethodInvoker.cs | |
@@ -89,7 +89,7 @@ namespace BenchmarkDotNet.Running | |
private void Invoke(IJob job, Func<MultiInvokeInput, Measurement> multiInvoke) | |
{ | |
- long invokeCount = 1; | |
+ long invokeCount = 64; | |
IList<Measurement> idle = null; | |
if (job.Mode == Mode.Throughput) | |
{ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment