Skip to content

Commit 70f4945

Browse files
Fixed formatting
1 parent 682b425 commit 70f4945

File tree

12 files changed

+734
-427
lines changed

12 files changed

+734
-427
lines changed

redis_benchmarks_specification/__cli__/stats.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,9 @@ def generate_stats_cli_command_logic(args, project_name, project_version):
272272
benchmark_config["tested-commands"] = tested_commands
273273
logging.warn(
274274
"there is a difference between specified test-commands in the yaml (name={}) and the ones we've detected {}!={}".format(
275-
test_name, sorted(origin_tested_commands), sorted(tested_commands)
275+
test_name,
276+
sorted(origin_tested_commands),
277+
sorted(tested_commands),
276278
)
277279
)
278280

@@ -333,7 +335,9 @@ def generate_stats_cli_command_logic(args, project_name, project_version):
333335
benchmark_config["tested-groups"] = tested_groups
334336
logging.warn(
335337
"there is a difference between specified test-groups in the yaml (name={}) and the ones we've detected {}!={}".format(
336-
test_name, sorted(origin_tested_groups), sorted(tested_groups)
338+
test_name,
339+
sorted(origin_tested_groups),
340+
sorted(tested_groups),
337341
)
338342
)
339343

redis_benchmarks_specification/__common__/runner.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ def execute_init_commands(benchmark_config, r, dbconfig_keyname="dbconfig"):
6767

6868
for lua_script in lua_scripts:
6969
try:
70-
logging.info("Executing Lua script (length: {} chars)".format(len(lua_script)))
70+
logging.info(
71+
"Executing Lua script (length: {} chars)".format(len(lua_script))
72+
)
7173
# Execute the Lua script using EVAL command with 0 keys
7274
stdout = r.execute_command("EVAL", lua_script, 0)
7375
logging.info("Lua script result: {}".format(stdout))
@@ -137,7 +139,6 @@ def extract_testsuites(args):
137139
return testsuite_spec_files
138140

139141

140-
141142
def commandstats_latencystats_process_name(
142143
metric_name, prefix, setup_name, variant_labels_dict
143144
):
@@ -235,6 +236,7 @@ def collect_redis_metrics(
235236

236237
return start_time_ms, res, kv_overall
237238

239+
238240
def export_redis_metrics(
239241
artifact_version,
240242
end_time_ms,
@@ -274,9 +276,7 @@ def export_redis_metrics(
274276
"branch": tf_github_branch
275277
}
276278
if git_hash is not None and git_hash != "":
277-
by_variants["by.hash/{}".format(git_hash)] = {
278-
"hash": git_hash
279-
}
279+
by_variants["by.hash/{}".format(git_hash)] = {"hash": git_hash}
280280
if artifact_version is not None and artifact_version != "":
281281
by_variants["by.version/{}".format(artifact_version)] = {
282282
"version": artifact_version
@@ -339,8 +339,6 @@ def export_redis_metrics(
339339
return datapoint_errors, datapoint_inserts
340340

341341

342-
343-
344342
def reset_commandstats(redis_conns):
345343
for pos, redis_conn in enumerate(redis_conns):
346344
logging.info("Resetting commmandstats for shard {}".format(pos))
@@ -468,7 +466,9 @@ def exporter_datasink_common(
468466

469467
# Update deployment tracking sets
470468
deployment_type_and_name = f"{setup_type}_AND_{setup_name}"
471-
deployment_type_and_name_and_version = f"{setup_type}_AND_{setup_name}_AND_{git_version}"
469+
deployment_type_and_name_and_version = (
470+
f"{setup_type}_AND_{setup_name}_AND_{git_version}"
471+
)
472472

473473
# Add to deployment-specific set (only if datasink connection is available)
474474
if datasink_conn is not None:
@@ -483,4 +483,6 @@ def exporter_datasink_common(
483483

484484
# Add metadata fields to timeseries metadata
485485
metadata["deployment_type_AND_deployment_name"] = deployment_type_and_name
486-
metadata["deployment_type_AND_deployment_name_AND_version"] = deployment_type_and_name_and_version
486+
metadata["deployment_type_AND_deployment_name_AND_version"] = (
487+
deployment_type_and_name_and_version
488+
)

redis_benchmarks_specification/__compare__/args.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,7 @@ def create_compare_arguments(parser):
7676
parser.add_argument("--baseline_deployment_name", type=str, default="")
7777
parser.add_argument("--comparison_deployment_name", type=str, default="")
7878
parser.add_argument("--metric_name", type=str, default="ALL_STATS.Totals.Ops/sec")
79-
parser.add_argument(
80-
"--running_platform", type=str, default=None
81-
)
79+
parser.add_argument("--running_platform", type=str, default=None)
8280
parser.add_argument(
8381
"--running_platform_baseline",
8482
type=str,

redis_benchmarks_specification/__compare__/compare.py

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,7 +1179,9 @@ def from_rts_to_regression_table(
11791179
if baseline_str != "":
11801180
filters_baseline.append("{}={}".format(by_str_baseline, baseline_str))
11811181
if baseline_deployment_name != "":
1182-
filters_baseline.append("deployment_name={}".format(baseline_deployment_name))
1182+
filters_baseline.append(
1183+
"deployment_name={}".format(baseline_deployment_name)
1184+
)
11831185
if baseline_github_org != "":
11841186
filters_baseline.append(f"github_org={baseline_github_org}")
11851187
if running_platform_baseline is not None and running_platform_baseline != "":
@@ -1195,14 +1197,19 @@ def from_rts_to_regression_table(
11951197
if comparison_str != "":
11961198
filters_comparison.append("{}={}".format(by_str_comparison, comparison_str))
11971199
if comparison_deployment_name != "":
1198-
filters_comparison.append("deployment_name={}".format(comparison_deployment_name))
1200+
filters_comparison.append(
1201+
"deployment_name={}".format(comparison_deployment_name)
1202+
)
11991203
if comparison_github_org != "":
12001204
filters_comparison.append(f"github_org={comparison_github_org}")
12011205
if "hash" not in by_str_baseline:
12021206
filters_baseline.append("hash==")
12031207
if "hash" not in by_str_comparison:
12041208
filters_comparison.append("hash==")
1205-
if running_platform_comparison is not None and running_platform_comparison != "":
1209+
if (
1210+
running_platform_comparison is not None
1211+
and running_platform_comparison != ""
1212+
):
12061213
filters_comparison.append(
12071214
"running_platform={}".format(running_platform_comparison)
12081215
)
@@ -1538,7 +1545,9 @@ def from_rts_to_regression_table(
15381545

15391546
def get_only_Totals(baseline_timeseries):
15401547
logging.warning("\t\tTime-series: {}".format(", ".join(baseline_timeseries)))
1541-
logging.info(f"Checking if Totals will reduce timeseries. initial len={len(baseline_timeseries)}")
1548+
logging.info(
1549+
f"Checking if Totals will reduce timeseries. initial len={len(baseline_timeseries)}"
1550+
)
15421551
new_base = []
15431552
for ts_name in baseline_timeseries:
15441553
if "io-threads" in ts_name:
@@ -1548,8 +1557,10 @@ def get_only_Totals(baseline_timeseries):
15481557
if "Totals" in ts_name:
15491558
new_base.append(ts_name)
15501559
baseline_timeseries = new_base
1551-
logging.info(f" final len={len(baseline_timeseries)}")
1552-
1560+
logging.info(
1561+
f" final len={len(baseline_timeseries)}"
1562+
)
1563+
15531564
return baseline_timeseries
15541565

15551566

redis_benchmarks_specification/__runner__/args.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,19 @@ def create_client_runner_args(project_name):
4444
"--deployment_type",
4545
type=str,
4646
default="oss-standalone",
47-
help="Deployment type for the Redis instance (e.g., oss-standalone, oss-cluster, enterprise)"
47+
help="Deployment type for the Redis instance (e.g., oss-standalone, oss-cluster, enterprise)",
4848
)
4949
parser.add_argument(
5050
"--deployment_name",
5151
type=str,
5252
default="redis",
53-
help="Deployment name identifier for the Redis instance"
53+
help="Deployment name identifier for the Redis instance",
5454
)
5555
parser.add_argument(
5656
"--core_count",
5757
type=int,
5858
default=None,
59-
help="Number of CPU cores available to the Redis instance"
59+
help="Number of CPU cores available to the Redis instance",
6060
)
6161
parser.add_argument("--github_repo", type=str, default="redis")
6262
parser.add_argument("--github_org", type=str, default="redis")

redis_benchmarks_specification/__runner__/remote_profiling.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,9 @@ def extract_server_metadata_for_timeseries(redis_conn) -> Dict[str, str]:
238238
else:
239239
metadata["config_file"] = "none"
240240

241-
logging.info(f"Extracted {len(metadata)} server metadata fields for timeseries: {list(metadata.keys())}")
241+
logging.info(
242+
f"Extracted {len(metadata)} server metadata fields for timeseries: {list(metadata.keys())}"
243+
)
242244

243245
return metadata
244246

0 commit comments

Comments
 (0)