summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-03-22 17:58:49 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-03-22 18:53:12 +0900
commit09bda4ceb592801d1729a2e7b4aea164dc855f6d (patch)
treec203c86eee2999a24193789e52682d643b4afe1e /tool
parent6cc8eb4daadbbc0cf3b6be4bed48f7d5a476f557 (diff)
downloadruby-09bda4ceb592801d1729a2e7b4aea164dc855f6d.tar.gz
core_assertions.rb: Refine `assert_linear_performance`
* Calculate each timeout from the ratio of each factor to the first factor.
Diffstat (limited to 'tool')
-rw-r--r--tool/lib/core_assertions.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/lib/core_assertions.rb b/tool/lib/core_assertions.rb
index d9d633a0ac..1662024e7d 100644
--- a/tool/lib/core_assertions.rb
+++ b/tool/lib/core_assertions.rb
@@ -760,7 +760,7 @@ eom
seq.each do |i|
next if i == first
- t = (tmax * i).to_f
+ t = tmax * i.fdiv(first)
*arg = pre.call(i)
message = "[#{i}]: in #{t}s"
Timeout.timeout(t, nil, message) do