Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39,364 changes: 19,689 additions & 19,675 deletions commands.json

Large diffs are not rendered by default.

74 changes: 39 additions & 35 deletions groups.json
Original file line number Diff line number Diff line change
@@ -1,70 +1,74 @@
{
"bitmap": {
"display": "Bitmap",
"description": "Operations on the Bitmap data type"
"description": "Operations on the Bitmap data type",
"display": "Bitmap"
},
"cluster": {
"display": "Cluster",
"description": "Redis Cluster management"
"description": "Redis Cluster management",
"display": "Cluster"
},
"connection": {
"display": "Connection",
"description": "Client connections management"
"description": "Client connections management",
"display": "Connection"
},
"generic": {
"display": "Generic",
"description": "Generic commands"
"description": "Generic commands",
"display": "Generic"
},
"geo": {
"display": "Geospatial indices",
"description": "Operations on the Geospatial Index data type"
"description": "Operations on the Geospatial Index data type",
"display": "Geospatial indices"
},
"hash": {
"display": "Hash",
"description": "Operations on the Hash data type"
"description": "Operations on the Hash data type",
"display": "Hash"
},
"hyperloglog": {
"display": "HyperLogLog",
"description": "Operations on the HyperLogLog data type"
"description": "Operations on the HyperLogLog data type",
"display": "HyperLogLog"
},
"json": [
"JSON.GET",
"JSON.SET"
],
"list": {
"display": "List",
"description": "Operations on the List data type"
"description": "Operations on the List data type",
"display": "List"
},
"pubsub": {
"display": "Pub/Sub",
"description": "Pub/Sub commands"
"description": "Pub/Sub commands",
"display": "Pub/Sub"
},
"scripting": {
"display": "Scripting and Functions",
"description": "Redis server-side scripting and functions"
"description": "Redis server-side scripting and functions",
"display": "Scripting and Functions"
},
"sentinel": {
"display": "Sentinel",
"description": "Redis Sentinel commands"
"description": "Redis Sentinel commands",
"display": "Sentinel"
},
"server": {
"display": "Server",
"description": "Server management commands"
"description": "Server management commands",
"display": "Server"
},
"set": {
"display": "Set",
"description": "Operations on the Set data type"
"description": "Operations on the Set data type",
"display": "Set"
},
"sorted-set": {
"display": "Sorted Set",
"description": "Operations on the Sorted Set data type"
"description": "Operations on the Sorted Set data type",
"display": "Sorted Set"
},
"stream": {
"display": "Stream",
"description": "Operations on the Stream data type"
"description": "Operations on the Stream data type",
"display": "Stream"
},
"string": {
"display": "String",
"description": "Operations on the String data type"
"description": "Operations on the String data type",
"display": "String"
},
"transactions": {
"display": "Transactions",
"description": "Redis Transaction management"
"description": "Redis Transaction management",
"display": "Transactions"
}
}
}
18 changes: 17 additions & 1 deletion redis_benchmarks_specification/__cli__/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,22 @@ def trigger_tests_dockerhub_cli_command_logic(args, project_name, project_versio
decode_responses=False,
)
conn.ping()

# Extract version from Docker image tag if possible
# e.g., "redis:7.4.0" -> "7.4.0"
# e.g., "valkey/valkey:7.2.6-bookworm" -> "7.2.6"
git_version = None
if ":" in args.run_image:
tag = args.run_image.split(":")[-1]
# Try to extract version number from tag
# Common patterns: "7.4.0", "7.2.6-bookworm", "latest"
import re

version_match = re.match(r"^(\d+\.\d+\.\d+)", tag)
if version_match:
git_version = version_match.group(1)
logging.info(f"Extracted git_version '{git_version}' from image tag")

testDetails = {}
build_stream_fields, result = generate_benchmark_stream_request(
args.id,
Expand All @@ -96,7 +112,7 @@ def trigger_tests_dockerhub_cli_command_logic(args, project_name, project_versio
None,
None,
None,
None,
git_version, # Pass extracted version
None,
None,
None,
Expand Down
54 changes: 48 additions & 6 deletions redis_benchmarks_specification/__runner__/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,20 @@ def validate_benchmark_metrics(
Args:
results_dict: Dictionary containing benchmark results
test_name: Name of the test being validated
benchmark_config: Benchmark configuration (unused, for compatibility)
benchmark_config: Benchmark configuration (optional, contains tested-commands)
default_metrics: Default metrics configuration (unused, for compatibility)

Returns:
tuple: (is_valid, error_message)
"""
try:
# Get tested commands from config if available
tested_commands = []
if benchmark_config and "tested-commands" in benchmark_config:
tested_commands = [
cmd.lower() for cmd in benchmark_config["tested-commands"]
]

# Define validation rules
throughput_patterns = [
"ops/sec",
Expand Down Expand Up @@ -219,6 +226,29 @@ def check_nested_dict(data, path=""):
):
return

# Skip operation-specific metrics for operations not being tested
# For example, skip Gets.Ops/sec if only SET commands are tested
if tested_commands:
skip_metric = False
operation_types = [
"gets",
"sets",
"hgets",
"hsets",
"lpush",
"rpush",
"sadd",
]
for op_type in operation_types:
if (
op_type in metric_path_lower
and op_type not in tested_commands
):
skip_metric = True
break
if skip_metric:
return

# Check throughput metrics
for pattern in throughput_patterns:
if pattern in metric_path_lower:
Expand Down Expand Up @@ -2672,13 +2702,20 @@ def delete_temporary_files(
if not success:
logging.error(f"Memtier benchmark failed: {stderr}")
# Clean up database after failure (timeout or error)
if args.flushall_on_every_test_end or args.flushall_on_every_test_start:
logging.warning("Benchmark failed - cleaning up database with FLUSHALL")
if (
args.flushall_on_every_test_end
or args.flushall_on_every_test_start
):
logging.warning(
"Benchmark failed - cleaning up database with FLUSHALL"
)
try:
for r in redis_conns:
r.flushall()
except Exception as e:
logging.error(f"FLUSHALL failed after benchmark failure: {e}")
logging.error(
f"FLUSHALL failed after benchmark failure: {e}"
)
# Continue with the test but log the failure
client_container_stdout = f"ERROR: {stderr}"

Expand Down Expand Up @@ -3025,8 +3062,13 @@ def delete_temporary_files(
test_result = False

# Clean up database after exception to prevent contamination of next test
if args.flushall_on_every_test_end or args.flushall_on_every_test_start:
logging.warning("Exception caught - cleaning up database with FLUSHALL")
if (
args.flushall_on_every_test_end
or args.flushall_on_every_test_start
):
logging.warning(
"Exception caught - cleaning up database with FLUSHALL"
)
try:
for r in redis_conns:
r.flushall()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ tested-commands:
- bitcount
- eval
tested-groups:
- bitmap
- scripting

redis-topologies:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ dbconfig:
tested-commands:
- smembers
- sdiff
- sunion
redis-topologies:
- oss-standalone
build-variants:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ dbconfig:
tested-commands:
- smembers
- sdiff
- sunion
redis-topologies:
- oss-standalone
build-variants:
Expand Down
Loading
Loading