Skip to content

Commit

Permalink
Update threshold for the heuristic that performs second WorkloadJitti…
Browse files Browse the repository at this point in the history
…ng, fix #1780
  • Loading branch information
AndreyAkinshin committed Aug 19, 2021
1 parent 9378651 commit 3bfc915
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/BenchmarkDotNet/Engines/EngineFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ public IEngine CreateReadyToRun(EngineParameters engineParameters)
var singleActionEngine = CreateSingleActionEngine(engineParameters);
var singleInvocationTime = Jit(singleActionEngine, ++jitIndex, invokeCount: 1, unrollFactor: 1);

if (singleInvocationTime > engineParameters.IterationTime && singleInvocationTime < TimeInterval.FromSeconds(1.0))
if (singleInvocationTime > engineParameters.IterationTime && singleInvocationTime < TimeInterval.FromSeconds(10.0))
{
// if the Jitting took more than IterationTime but still less than 1s (a magic number based on observations of the reported bug)
// if the Jitting took more than IterationTime but still less than 10s (a magic number based on observations of the reported bugs)
// we call it one more time to see if Jitting itself has not dominated the first invocation
// if it did, it shoud NOT be a single invocation engine (see #837, #1337 and #1338)
// if it did, it should NOT be a single invocation engine (see #837, #1337, #1338, and #1780)
singleInvocationTime = Jit(singleActionEngine, ++jitIndex, invokeCount: 1, unrollFactor: 1);
}

Expand Down

0 comments on commit 3bfc915

Please sign in to comment.