Skip to content

Commit 6bf3837

Browse files
Update runner functionality with unix socket support and UI improvements
1 parent 30c9673 commit 6bf3837

File tree

5 files changed

+33
-7
lines changed

5 files changed

+33
-7
lines changed

.github/workflows/validate-spec-fields.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
pytest:
1010
name: Validate SPEC fields
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-22.04
1212
env:
1313
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
1414
steps:

redis_benchmarks_specification/__common__/runner.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,16 @@ def extract_testsuites(args):
106106
testsuite_spec_files = get_benchmark_specs(
107107
testsuites_folder, args.test, args.tests_regexp
108108
)
109+
testsuite_spec_files.sort()
109110
logging.info(
110111
"There are a total of {} test-suites in folder {}".format(
111112
len(testsuite_spec_files), testsuites_folder
112113
)
113114
)
115+
if len(testsuite_spec_files) < 11:
116+
for test in testsuite_spec_files:
117+
logging.info(f"Test {test}")
118+
114119
return testsuite_spec_files
115120

116121

redis_benchmarks_specification/__compare__/compare.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,11 +874,12 @@ def compute_regression_table(
874874
len_no_datapoints = len(no_datapoints_list)
875875
if len_no_datapoints > 0:
876876
table_output += f"\n WARNING: There were {len_no_datapoints} benchmarks with NO datapoints for both baseline and comparison.\n\n"
877+
table_output += "<details>\n <summary>NO datapoints for both baseline and comparison:</summary>\n\n"
877878
no_datapoints_test_names_str = "|".join([l for l in no_datapoints_list])
878-
879879
table_output += (
880880
f" NO DATAPOINTS test regexp names: {no_datapoints_test_names_str}\n\n"
881881
)
882+
table_output += "\n</details>\n"
882883

883884
return (
884885
detected_regressions,

redis_benchmarks_specification/__runner__/args.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,4 +214,9 @@ def create_client_runner_args(project_name):
214214
action="store_true",
215215
help="Run client in cluster mode.",
216216
)
217+
parser.add_argument(
218+
"--unix-socket",
219+
default="",
220+
help="UNIX Domain socket name",
221+
)
217222
return parser

redis_benchmarks_specification/__runner__/runner.py

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,17 +220,26 @@ def prepare_memtier_benchmark_parameters(
220220
resp_version=None,
221221
override_memtier_test_time=0,
222222
override_test_runs=1,
223+
unix_socket="",
223224
):
224225
arbitrary_command = False
225226
benchmark_command = [
226227
full_benchmark_path,
227-
"--port",
228-
f"{port}",
229-
"--server",
230-
f"{server}",
231228
"--json-out-file",
232229
local_benchmark_output_filename,
233230
]
231+
if unix_socket != "":
232+
benchmark_command.extend(["--unix-socket", unix_socket])
233+
logging.info(f"Using UNIX SOCKET to connect {unix_socket}")
234+
else:
235+
benchmark_command.extend(
236+
[
237+
"--port",
238+
f"{port}",
239+
"--server",
240+
f"{server}",
241+
]
242+
)
234243
if password is not None:
235244
benchmark_command.extend(["--authenticate", password])
236245
if tls_enabled:
@@ -430,6 +439,7 @@ def delete_temporary_files(
430439

431440
port = args.db_server_port
432441
host = args.db_server_host
442+
unix_socket = args.unix_socket
433443
password = args.db_server_password
434444
oss_cluster_api_enabled = args.cluster_mode
435445
ssl_cert_reqs = "required"
@@ -606,7 +616,7 @@ def delete_temporary_files(
606616
)
607617
continue
608618
if "preload_tool" in benchmark_config["dbconfig"]:
609-
if args.skip_tests_with_preload_via_tool is False:
619+
if args.skip_tests_with_preload_via_tool is True:
610620
logging.warning(
611621
"Skipping test {} giving it implies dataset preload via tool".format(
612622
test_name
@@ -648,6 +658,7 @@ def delete_temporary_files(
648658
args.benchmark_local_install,
649659
password,
650660
oss_cluster_api_enabled,
661+
unix_socket,
651662
)
652663
if res is False:
653664
logging.warning(
@@ -748,6 +759,7 @@ def delete_temporary_files(
748759
resp_version,
749760
override_memtier_test_time,
750761
override_test_runs,
762+
unix_socket,
751763
)
752764

753765
if (
@@ -1151,6 +1163,7 @@ def data_prepopulation_step(
11511163
benchmark_local_install=False,
11521164
password=None,
11531165
oss_cluster_api_enabled=False,
1166+
unix_socket="",
11541167
):
11551168
result = True
11561169
# setup the benchmark
@@ -1193,6 +1206,8 @@ def data_prepopulation_step(
11931206
tls_cacert,
11941207
resp_version,
11951208
override_memtier_test_time_preload,
1209+
1,
1210+
unix_socket,
11961211
)
11971212
if arbitrary_command is True and oss_cluster_api_enabled:
11981213
logging.warning(

0 commit comments

Comments
 (0)