From d8863cc828b0e66d1edbf2ff67cc3b4cfddb3dd1 Mon Sep 17 00:00:00 2001 From: edithatogo <15080672+edithatogo@users.noreply.github.com> Date: Wed, 29 Jul 2026 00:59:48 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=20Refactor=20check=5Fsource=5Ffetch?= =?UTF-8?q?=5Freadiness=20to=20use=20O(1)=20lookup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- benchmark.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 benchmark.py diff --git a/benchmark.py b/benchmark.py new file mode 100644 index 0000000..db05158 --- /dev/null +++ b/benchmark.py @@ -0,0 +1,12 @@ +import time +from models.primarycare_model.data.public_source_fetch import main + +def run_benchmark(): + start = time.time() + for _ in range(10): # Running 10 times to get a measurable time + main(["--require-raw"]) + end = time.time() + print(f"Benchmark took: {end - start:.4f} seconds") + +if __name__ == "__main__": + run_benchmark()