From c6a4f742135cf5a82d9391ea788ff88a8e3ab543 Mon Sep 17 00:00:00 2001 From: ATATC Date: Wed, 2 Oct 2024 12:42:15 -0400 Subject: [PATCH] Added an overall score. (#419) --- leads_vec/benchmark.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/leads_vec/benchmark.py b/leads_vec/benchmark.py index eae6df1..0a49ea9 100644 --- a/leads_vec/benchmark.py +++ b/leads_vec/benchmark.py @@ -84,6 +84,12 @@ def main() -> int: L.info("Video test complete") for k, v in report.items(): L.info(f"{k}: {v:.3f}") + baseline = {"frame rate": 30, "net delay": 1.062, "video capture": 17.898, "video capture and encoding": 16.657, + "video capture and Base64 encoding": 16.658, "video capture and PIL": 16.668} + score = 0 + for k, v in report.items(): + score += v / baseline[k] + L.info("Score:", str(score / len(report))) return 0