Skip to content

Commit e9ad5b8

Browse files
committed
Fixed GetMaxMeasurementCount.
1 parent a9458f1 commit e9ad5b8

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/BenchmarkDotNet/Engines/EngineJitStage.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,9 @@ internal EngineFirstJitStage(bool evaluateOverhead, EngineParameters parameters)
4747

4848
private int GetMaxMeasurementCount()
4949
{
50-
if (!JitInfo.IsTiered)
51-
{
52-
return 1;
53-
}
54-
int count = JitInfo.MaxTierPromotions* JitInfo.TieredCallCountThreshold + 2;
50+
int count = JitInfo.IsTiered
51+
? JitInfo.MaxTierPromotions * JitInfo.TieredCallCountThreshold + 2
52+
: 1;
5553
if (evaluateOverhead)
5654
{
5755
count *= 2;
@@ -160,7 +158,7 @@ public EngineSecondJitStage(int unrollFactor, bool evaluateOverhead, EngineParam
160158
iterationIndex = evaluateOverhead ? 0 : 2;
161159
}
162160

163-
internal override List<Measurement> GetMeasurementList() => new(evaluateOverhead ? 5 : 3);
161+
internal override List<Measurement> GetMeasurementList() => new(evaluateOverhead ? 2 : 1);
164162

165163
// The benchmark method has already been jitted via *NoUnroll, we only need to jit the *Unroll methods here, which aren't tiered.
166164
internal override bool GetShouldRunIteration(List<Measurement> measurements, out IterationData iterationData)

0 commit comments

Comments
 (0)