We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4870ffd + 963097c commit 5f019c2Copy full SHA for 5f019c2
harness/harness-extra.rb
@@ -65,10 +65,11 @@ def get_time
65
# but allow that to be overridden by MIN_BENCH_ITRS env var.
66
# Also use MIN_BENCH_TIME to loop until the benchmark has run for a sufficient duration.
67
def run_enough_to_profile(n, &block)
68
+ # Allow MIN_BENCH_ITRS to override the argument.
69
+ n = ENV.fetch('MIN_BENCH_ITRS', n).to_i
70
+
71
start = get_time
72
loop do
- # Allow MIN_BENCH_ITRS to override the argument.
- n = ENV.fetch('MIN_BENCH_ITRS', n).to_i
73
n.times(&block)
74
75
break if (get_time - start) >= MIN_BENCH_TIME
0 commit comments