core_assertions.rb: Refine assert_linear_performance

* Calculate each timeout from the ratio of each factor to the first
  factor.
This commit is contained in:
Nobuyoshi Nakada 2023-03-22 17:58:49 +09:00
parent 6cc8eb4daa
commit 09bda4ceb5
No known key found for this signature in database
GPG Key ID: 7CD2805BFA3770C6

View File

@ -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