Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update threshold for the heuristic that performs second WorkloadJitting, fix #1780 #1781

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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