Skip to content

Commit 5614b82

Browse files
committed
Add max # of iters for harness-ractor
1 parent e106947 commit 5614b82

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

harness-ractor/harness.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,14 @@ def join
2727
end
2828
end
2929

30+
MAX_ITERS = Integer(ENV.fetch("MAX_BENCH_ITRS", 5))
31+
3032
def run_benchmark(num_itrs_hint, ractor_args: [], &block)
31-
warmup_itrs = Integer(ENV.fetch('WARMUP_ITRS', 10))
33+
warmup_itrs = Integer(ENV.fetch('WARMUP_ITRS', 5))
3234
bench_itrs = Integer(ENV.fetch('MIN_BENCH_ITRS', num_itrs_hint))
35+
if bench_itrs > MAX_ITERS
36+
bench_itrs = MAX_ITERS
37+
end
3338
# { num_ractors => [itr_in_ms, ...] }
3439
stats = Hash.new { |h,k| h[k] = [] }
3540

0 commit comments

Comments
 (0)