-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f8cd5b3
commit 406c29f
Showing
6 changed files
with
58 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 8 additions & 7 deletions
15
redis_benchmarks_specification/__self_contained_coordinator__/post_processing.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
import os | ||
import json | ||
|
||
|
||
def post_process_vector_db(temporary_dir): | ||
results_dir = os.path.join(temporary_dir, 'results') | ||
results_dir = os.path.join(temporary_dir, "results") | ||
results = {} | ||
for file in os.listdir(results_dir): | ||
if "upload" in file: | ||
with open(os.path.join(results_dir, file), 'r') as f: | ||
with open(os.path.join(results_dir, file), "r") as f: | ||
upload_results = json.load(f) | ||
results['upload_time'] = upload_results['results']['upload_time'] | ||
results["upload_time"] = upload_results["results"]["upload_time"] | ||
else: | ||
with open(os.path.join(results_dir, file), 'r') as f: | ||
with open(os.path.join(results_dir, file), "r") as f: | ||
query_results = json.load(f) | ||
results['rps'] = query_results['results']['rps'] | ||
results['precision'] = query_results['results']['mean_precisions'] | ||
results['total_time'] = query_results['results']['total_time'] | ||
results["rps"] = query_results["results"]["rps"] | ||
results["precision"] = query_results["results"]["mean_precisions"] | ||
results["total_time"] = query_results["results"]["total_time"] | ||
return results |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters