pretty gifff

This commit is contained in:
2026-01-15 02:02:50 +03:00
parent cd3dd10d11
commit 0f8b1c05fc
12 changed files with 36 additions and 51 deletions
+10 -1
View File
@@ -1,10 +1,19 @@
from metrics.utils import attempts_to_average
from .registry import Benchmarks, Benchmark
def main():
all_benchmarks: list[Benchmark] = Benchmarks.get_benchmarks()
for benchmark in all_benchmarks: pass
for benchmark in all_benchmarks:
bench_attempts: list[float] = []
for _ in range(benchmark.iterations):
bench_attempts.append(benchmark.run())
print(f'Name: {benchmark.name}\n'
f'Description: {benchmark.description}\n'
f'Iterations: {benchmark.iterations}\n'
f'Average time per iteration: {attempts_to_average(bench_attempts, benchmark.iterations)} ms\n')
if __name__ == '__main__':