Lines Matching refs:seconds
20 def bench(name, cleanup=lambda: None, *, seconds=1, repeat=3): argument
28 while total_time < seconds:
36 if total_time > seconds:
38 yield count // seconds
40 def from_cache(seconds, repeat): argument
48 yield from bench(name, repeat=repeat, seconds=seconds)
51 def builtin_mod(seconds, repeat): argument
58 seconds=seconds)
61 def source_wo_bytecode(seconds, repeat): argument
74 seconds=seconds)
81 def benchmark_wo_bytecode(seconds, repeat): argument
89 repeat=repeat, seconds=seconds)
100 def source_writing_bytecode(seconds, repeat): argument
112 for result in bench(name, cleanup, repeat=repeat, seconds=seconds):
119 def writing_bytecode_benchmark(seconds, repeat): argument
125 yield from bench(name, cleanup, repeat=repeat, seconds=seconds)
135 def source_using_bytecode(seconds, repeat): argument
146 seconds=seconds)
151 def using_bytecode_benchmark(seconds, repeat): argument
155 seconds=seconds)
189 seconds = 1
190 seconds_plural = 's' if seconds > 1 else ''
195 print(header.format(seconds, seconds_plural, repeat,
196 len(benchmarks) * seconds * repeat, __import__))
202 for result in benchmark(seconds=seconds, repeat=repeat):