From 8cd5960391eb5ab4e5f7474d7bfa08064f0d12ad Mon Sep 17 00:00:00 2001
From: felixwelter <felixwelter@gmail.com>
Date: Fri, 4 Sep 2020 17:41:36 +0200
Subject: [PATCH] Add plain benchmark script

---
 benchmark.py | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 benchmark.py

diff --git a/benchmark.py b/benchmark.py
new file mode 100644
index 0000000..d7b6f99
--- /dev/null
+++ b/benchmark.py
@@ -0,0 +1,20 @@
+import json
+
+from search_index import TitleFocusSearchIndex
+
+INDEX_DIR = "benchmark_index"
+BENCHMARK_DATA_DIR = "benchmark_data"
+
+Index = TitleFocusSearchIndex
+
+
+def run_case(case_spec):
+    print(case_spec)
+
+
+if __name__ == '__main__':
+    with open('benchmark_data/meta.json') as json_file:
+        data = json.load(json_file)
+    for case in data["cases"]:
+        print("RUNNING CASE: {}".format(case["name"]))
+        run_case(case)
-- 
GitLab