Skip to content

Commit 30e8287

Browse files
committed
use meaningful test plan names for timescale dashboard
1 parent 6a545bf commit 30e8287

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

chainbench/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,10 @@ def start(
274274
else:
275275
profile = "test_method"
276276
click.echo(f"Testing method: {method}")
277+
test_plan = method
277278
else:
278279
click.echo(f"Testing profile: {profile}")
280+
test_plan = profile
279281

280282
results_dir = Path(results_dir).resolve()
281283
results_path = ensure_results_dir(profile=profile, parent_dir=results_dir, run_id=run_id)
@@ -294,9 +296,6 @@ def start(
294296
for tag in exclude_tags:
295297
custom_exclude_tags.append(tag)
296298

297-
if not debug_trace_methods:
298-
custom_exclude_tags = custom_exclude_tags + ["trace", "debug"]
299-
300299
# Start the Locust master
301300
master_command = get_master_command(
302301
profile_path=profile_path,
@@ -316,6 +315,7 @@ def start(
316315
pg_port=pg_port,
317316
pg_username=pg_username,
318317
pg_password=pg_password,
318+
override_plan_name=test_plan,
319319
use_latest_blocks=use_latest_blocks,
320320
size=size,
321321
method=method,

chainbench/util/cli.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ def get_master_command(
7676
pg_port: int | None = None,
7777
pg_username: str | None = None,
7878
pg_password: str | None = None,
79+
override_plan_name: str | None = None,
7980
use_latest_blocks: bool = False,
8081
size: str | None = None,
8182
method: str | None = None,
@@ -95,6 +96,8 @@ def get_master_command(
9596

9697
if timescale:
9798
command += get_timescale_args(pg_host, pg_port, pg_username, pg_password)
99+
if override_plan_name is not None:
100+
command += f" --override-plan-name {override_plan_name}"
98101

99102
if target is not None:
100103
command += f" --host {target}"
@@ -131,6 +134,7 @@ def get_worker_command(
131134
pg_port: int | None = None,
132135
pg_username: str | None = None,
133136
pg_password: str | None = None,
137+
override_plan_name: str | None = None,
134138
use_latest_blocks: bool = False,
135139
method: str | None = None,
136140
) -> str:
@@ -142,6 +146,8 @@ def get_worker_command(
142146

143147
if timescale:
144148
command += get_timescale_args(pg_host, pg_port, pg_username, pg_password)
149+
if override_plan_name is not None:
150+
command += f" --override-plan-name {override_plan_name}"
145151

146152
if target is not None:
147153
command += f" --host {target}"

0 commit comments

Comments
 (0)