From 24c3d84b449048b28ae73561c434bde806e86ae8 Mon Sep 17 00:00:00 2001 From: Paulo Sousa Date: Thu, 8 May 2025 17:24:50 +0100 Subject: [PATCH 1/2] Prevent stats to fail on unkown commands --- redis_benchmarks_specification/__cli__/stats.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/redis_benchmarks_specification/__cli__/stats.py b/redis_benchmarks_specification/__cli__/stats.py index dbca65a..6aae327 100644 --- a/redis_benchmarks_specification/__cli__/stats.py +++ b/redis_benchmarks_specification/__cli__/stats.py @@ -108,6 +108,8 @@ def generate_stats_cli_command_logic(args, project_name, project_version): benchmark_config = {} requires_override = False test_result = True + tested_groups_match_origin = True + with open(test_file, "r") as stream: try: @@ -291,7 +293,7 @@ def generate_stats_cli_command_logic(args, project_name, project_version): ) if tested_groups != origin_tested_groups: - requires_override = True + tested_groups_match_origin = False benchmark_config["tested-groups"] = tested_groups logging.warn( "there is a difference between specified test-groups in the yaml (name={}) and the ones we've detected {}!={}".format( @@ -312,7 +314,15 @@ def generate_stats_cli_command_logic(args, project_name, project_version): test_result = False overall_result &= test_result - if requires_override and override_enabled: + if not tested_groups_match_origin: + if len(tested_groups) > 0: + overall_result = False + else: + logging.warn( + "difference between specified and detected test-groups was ignored since command info is not available in this benchmark version" + ) + + if (requires_override or not tested_groups_match_origin) and override_enabled: logging.info( "Saving a new version of the file {} with the overrided data".format( test_file From 253268cc3d043ad7b201fb77aeefb110b37f8ee2 Mon Sep 17 00:00:00 2001 From: Paulo Sousa Date: Thu, 8 May 2025 17:25:50 +0100 Subject: [PATCH 2/2] Fix `tested-groups` and `tested-commands` on `vector_db_benchmark_test` --- .../test-suites/vector_db_benchmark_test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/redis_benchmarks_specification/test-suites/vector_db_benchmark_test.yml b/redis_benchmarks_specification/test-suites/vector_db_benchmark_test.yml index cfc7247..75167f1 100644 --- a/redis_benchmarks_specification/test-suites/vector_db_benchmark_test.yml +++ b/redis_benchmarks_specification/test-suites/vector_db_benchmark_test.yml @@ -10,9 +10,10 @@ dbconfig: requests: memory: 1g tested-groups: -- redisearch -tested-commands: - search +tested-commands: +- hset +- ft.search redis-topologies: - oss-standalone-with-redisearch build-variants: