From f67213adf632cb827ad9a0f3eead1fbcd1092913 Mon Sep 17 00:00:00 2001 From: akore Date: Thu, 28 Nov 2024 09:51:57 -0500 Subject: [PATCH] run linter --- README.md | 2 ++ docs/source/api.rst | 46 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/README.md b/README.md index 9c311ee..781f19d 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,8 @@ Make sure you have these tools installed: - Node.js (18.0.0+) - Poetry (1.4.0+) +Note: the project is only tested with python 3.11, and it is recommended to use the same version. + ### 🔑 API keys setup Create a `.env.development` file in the project root: diff --git a/docs/source/api.rst b/docs/source/api.rst index d38426e..a0b4485 100644 --- a/docs/source/api.rst +++ b/docs/source/api.rst @@ -221,3 +221,49 @@ Common HTTP Status Codes - ``400 Bad Request``: Invalid parameters - ``422 Unprocessable Entity``: Invalid request body - ``500 Internal Server Error``: Server-side error + + +API Benchmark +------------- + +The following table shows latency benchmarks for the /recommend API endpoint. Tests were run with different combinations of query parameters and reranking options. Each request was made sequentially to measure individual request latency accurately. +The summary statistics are generating from 50 runs with a timeout of 30 seconds w/ no delay between each request. + +.. list-table:: + :header-rows: 1 + + * - Test Case + - Mean (s) + - Median (s) + - Std Dev (s) + - Min (s) + - Max (s) + - Sample Size + * - Query only + - 6.686 + - 5.985 + - 2.336 + - 4.504 + - 19.362 + - 48 + * - Query w/ reranking + - 8.729 + - 8.547 + - 1.964 + - 5.249 + - 14.133 + - 50 + * - Query w/ location + - 6.795 + - 6.260 + - 3.560 + - 3.277 + - 27.860 + - 46 + * - Query w/ location and reranking + - 8.197 + - 7.934 + - 1.867 + - 5.720 + - 13.688 + - 50