Skip to content

Commit e0cd9ce

Browse files
committed
Fixed benchmark reporting when bench optimized away before reporting samples
1 parent d0c3803 commit e0cd9ce

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)