From 3bfc91536f1904414363cf792e472be842698945 Mon Sep 17 00:00:00 2001 From: Andrey Akinshin Date: Thu, 19 Aug 2021 10:22:02 +0300 Subject: [PATCH] Update threshold for the heuristic that performs second WorkloadJitting, fix #1780 --- src/BenchmarkDotNet/Engines/EngineFactory.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/BenchmarkDotNet/Engines/EngineFactory.cs b/src/BenchmarkDotNet/Engines/EngineFactory.cs index c438890e84..9342ec5378 100644 --- a/src/BenchmarkDotNet/Engines/EngineFactory.cs +++ b/src/BenchmarkDotNet/Engines/EngineFactory.cs @@ -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); }