Improve base time of assert_linear_performance (#11369)
Remove `.ceil` from base time calculation that makes 10x gap. This will make the assertion more strict and also less flaky.
This commit is contained in:
parent
a1d8ef6ebf
commit
8a7e6f6852
Notes:
git
2024-08-15 06:56:22 +00:00
Merged-By: kou <kou@clear-code.com>
@ -825,7 +825,9 @@ eom
|
|||||||
end
|
end
|
||||||
times.compact!
|
times.compact!
|
||||||
tmin, tmax = times.minmax
|
tmin, tmax = times.minmax
|
||||||
tbase = 10 ** Math.log10(tmax * ([(tmax / tmin), 2].max ** 2)).ceil
|
|
||||||
|
# safe_factor * tmax * rehearsal_time_variance_factor(equals to 1 when variance is small)
|
||||||
|
tbase = 10 * tmax * [(tmax / tmin) ** 2 / 4, 1].max
|
||||||
info = "(tmin: #{tmin}, tmax: #{tmax}, tbase: #{tbase})"
|
info = "(tmin: #{tmin}, tmax: #{tmax}, tbase: #{tbase})"
|
||||||
|
|
||||||
seq.each do |i|
|
seq.each do |i|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user