Skip to content

Commit 37f22c2

Browse files
committed
[GR-26172] Fix benchmark reporting when bench optimized away before reporting samples
PullRequest: truffleruby/2009
2 parents 6f66e81 + e0cd9ce commit 37f22c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mx.truffleruby/mx_truffleruby_benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ def runBenchmark(self, benchmark, bmSuiteArgs):
308308
'metric.better': 'higher',
309309
'metric.iteration': len(samples),
310310
'extra.metric.warmedup': 'true',
311-
'extra.metric.elapsed-num': elapsed[-1] + 2.0, # just put the data point beyond the last one a bit
311+
'extra.metric.elapsed-num': elapsed[-1] + 2.0 if elapsed else 2.0, # just put the data point beyond the last one a bit
312312
'error': 'optimised away'
313313
}]
314314
else:

0 commit comments

Comments
 (0)