Skip to content

Commit cd2e8e9

Browse files
try/catch on metric exporting and redis shutdown on coordinator. fixed memtier_benchmark-1Mkeys-string-get-2MB test given it required 2tb of memory
1 parent 9f151b7 commit cd2e8e9

File tree

3 files changed

+56
-31
lines changed

3 files changed

+56
-31
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "redis-benchmarks-specification"
3-
version = "0.1.89"
3+
version = "0.1.90"
44
description = "The Redis benchmarks specification describes the cross-language/tools requirements and expectations to foster performance and observability standards around redis related technologies. Members from both industry and academia, including organizations and individuals are encouraged to contribute."
55
authors = ["filipecosta90 <[email protected]>","Redis Performance Group <[email protected]>"]
66
readme = "Readme.md"

redis_benchmarks_specification/__self_contained_coordinator__/self_contained_coordinator.py

Lines changed: 53 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,31 +1011,46 @@ def process_self_contained_coordinator_stream(
10111011
)
10121012

10131013
dataset_load_duration_seconds = 0
1014+
try:
1015+
exporter_datasink_common(
1016+
benchmark_config,
1017+
benchmark_duration_seconds,
1018+
build_variant_name,
1019+
datapoint_time_ms,
1020+
dataset_load_duration_seconds,
1021+
datasink_conn,
1022+
datasink_push_results_redistimeseries,
1023+
git_branch,
1024+
git_version,
1025+
metadata,
1026+
redis_conns,
1027+
results_dict,
1028+
running_platform,
1029+
setup_name,
1030+
setup_type,
1031+
test_name,
1032+
tf_github_org,
1033+
tf_github_repo,
1034+
tf_triggering_env,
1035+
topology_spec_name,
1036+
default_metrics,
1037+
)
1038+
r.shutdown(save=False)
1039+
1040+
except redis.exceptions.ConnectionError as e:
1041+
logging.critical(
1042+
"Some unexpected exception was caught during metric fetching. Skipping it..."
1043+
)
1044+
logging.critical(
1045+
f"Exception type: {type(e).__name__}"
1046+
)
1047+
logging.critical(f"Exception message: {str(e)}")
1048+
logging.critical("Traceback details:")
1049+
logging.critical(traceback.format_exc())
1050+
print("-" * 60)
1051+
traceback.print_exc(file=sys.stdout)
1052+
print("-" * 60)
10141053

1015-
exporter_datasink_common(
1016-
benchmark_config,
1017-
benchmark_duration_seconds,
1018-
build_variant_name,
1019-
datapoint_time_ms,
1020-
dataset_load_duration_seconds,
1021-
datasink_conn,
1022-
datasink_push_results_redistimeseries,
1023-
git_branch,
1024-
git_version,
1025-
metadata,
1026-
redis_conns,
1027-
results_dict,
1028-
running_platform,
1029-
setup_name,
1030-
setup_type,
1031-
test_name,
1032-
tf_github_org,
1033-
tf_github_repo,
1034-
tf_triggering_env,
1035-
topology_spec_name,
1036-
default_metrics,
1037-
)
1038-
r.shutdown(save=False)
10391054
test_result = True
10401055
total_test_suite_runs = total_test_suite_runs + 1
10411056

@@ -1054,10 +1069,20 @@ def process_self_contained_coordinator_stream(
10541069
logging.critical("Printing redis container log....")
10551070

10561071
print("-" * 60)
1057-
1058-
print(
1059-
redis_container.logs(stdout=True, stderr=True)
1060-
)
1072+
try:
1073+
print(
1074+
redis_container.logs(
1075+
stdout=True, stderr=True
1076+
)
1077+
)
1078+
except docker.errors.NotFound:
1079+
logging.info(
1080+
"When trying to stop DB container with id {} and image {} it was already stopped".format(
1081+
redis_container.id,
1082+
redis_container.image,
1083+
)
1084+
)
1085+
pass
10611086

10621087
print("-" * 60)
10631088

redis_benchmarks_specification/test-suites/memtier_benchmark-1Mkeys-string-get-2MB.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ dbconfig:
99
preload_tool:
1010
run_image: redislabs/memtier_benchmark:edge
1111
tool: memtier_benchmark
12-
arguments: '"--data-size" "2000000" "--ratio" "1:0" "--key-pattern" "P:P" "-c" "50" "-t" "2" "--hide-histogram" "--key-minimum" "1"'
12+
arguments: '"--data-size" "2000000" "--ratio" "1:0" "--key-pattern" "P:P" "-c" "50" "-t" "2" "--hide-histogram" "--key-minimum" "1" "--key-minimum" "1000"'
1313
resources:
1414
requests:
1515
memory: 2g
@@ -22,7 +22,7 @@ build-variants:
2222
clientconfig:
2323
run_image: redislabs/memtier_benchmark:edge
2424
tool: memtier_benchmark
25-
arguments: --data-size 2000000 --ratio 0:1 --key-pattern R:R -c 25 -t 4 --hide-histogram --test-time 180
25+
arguments: --data-size 2000000 --key-minimum 1 --key-maximum 1000 --ratio 0:1 --key-pattern R:R -c 25 -t 4 --hide-histogram --test-time 180
2626
resources:
2727
requests:
2828
cpus: '4'

0 commit comments

Comments
 (0)