From 1f319037234fa9eaa330cc60db46650ea6aefc7f Mon Sep 17 00:00:00 2001 From: PThorpe92 Date: Mon, 18 Aug 2025 17:39:50 -0400 Subject: [PATCH] dont time the first iteration of sqlite benchmark --- testing/cli_tests/sqlite_bench.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/testing/cli_tests/sqlite_bench.py b/testing/cli_tests/sqlite_bench.py index 2f57b35db..ad2585229 100644 --- a/testing/cli_tests/sqlite_bench.py +++ b/testing/cli_tests/sqlite_bench.py @@ -25,8 +25,9 @@ if platform.system() == "Linux": vfs_list.append("io_uring") -def append_time(times, start, perf_counter): - times.append(perf_counter() - start) +def append_time(i, times, start, perf_counter): + if i > 0: + times.append(perf_counter() - start) return True @@ -69,7 +70,7 @@ def bench_one(vfs: str, sql: str, iterations: int, assorted: bool, use_sqlite3=F for i in range(1, iterations + 1): for query in queries: start = perf_counter() - _ = shell.run_test_fn(query, lambda x: x is not None and append_time(times, start, perf_counter)) + _ = shell.run_test_fn(query, lambda x: x is not None and append_time(i, times, start, perf_counter)) test(f" {test_name} | run {i:>3}: {times[-1]:.6f}s") shell.quit()