зеркало из https://github.com/github/ruby.git
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:
Родитель
6cc8eb4daa
Коммит
09bda4ceb5
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче