From f07c756494b0e473ff8e4ece6f04c7ababe93b01 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 3 Apr 2023 14:10:16 +0900 Subject: core_assertions.rb: Tweak timeout limit Increase the timeout limit when variance at rehearsal is small. --- tool/lib/core_assertions.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tool') diff --git a/tool/lib/core_assertions.rb b/tool/lib/core_assertions.rb index c5b4089862..6000d39c90 100644 --- a/tool/lib/core_assertions.rb +++ b/tool/lib/core_assertions.rb @@ -758,14 +758,14 @@ eom end times.compact! tmin, tmax = times.minmax - tmax *= tmax / tmin - tmax = 10**Math.log10(tmax).ceil + tbase = 10 ** Math.log10(tmax * ([(tmax / tmin), 2].max ** 2)).ceil + info = "(tmin: #{tmin}, tmax: #{tmax}, tbase: #{tbase})" seq.each do |i| next if i == first - t = tmax * i.fdiv(first) + t = tbase * i.fdiv(first) *arg = pre.call(i) - message = "[#{i}]: in #{t}s" + message = "[#{i}]: in #{t}s #{info}" Timeout.timeout(t, Timeout::Error, message) do st = Process.clock_gettime(Process::CLOCK_MONOTONIC) yield(*arg) -- cgit v1.2.1