Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
t, total_time = _b(data, kernel, repeat, timer, is_ns_timer, resolution)
time_per_repetition = total_time / repeat
remaining_time -= total_time
repeat = int(remaining_time // time_per_repetition)
if repeat > 0:
t2, _ = _b(data, kernel, repeat, timer, is_ns_timer, resolution)
t = min(t, t2)
timings[k, i] = t
except KeyboardInterrupt:
timings = timings[:, :i]
n_range = n_range[:i]
data = PerfplotData(n_range, timings, flop, labels, colors, xlabel, title)
return data