Skip to content

feature-benchmark: Reset source systems too #33191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
3 changes: 1 addition & 2 deletions misc/python/materialize/feature_benchmark/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ def run(self) -> list[Aggregation]:
)
start_time = time.time()

# Run the shared() section once for both Mzs under measurement
self.run_shared(scenario)

# Run the init() section once for each Mz
Expand Down Expand Up @@ -110,7 +109,7 @@ def run(self) -> list[Aggregation]:

def run_shared(self, scenario: Scenario) -> None:
shared = scenario.shared()
if self._mz_id == 0 and shared is not None:
if shared is not None:
print(
f"Running the shared() section for scenario {scenario.name()} with {self._mz_version} ..."
)
Expand Down
14 changes: 10 additions & 4 deletions test/feature-benchmark/mzcompose.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@ def make_aggregation_class() -> type[Aggregation]:


def run_one_scenario(
c: Composition, scenario_class: type[Scenario], args: argparse.Namespace
c: Composition,
scenario_class: type[Scenario],
args: argparse.Namespace,
dependencies: list[str],
) -> BenchmarkScenarioResult:
scenario_name = scenario_class.__name__
print(f"--- Now benchmarking {scenario_name} ...")
Expand Down Expand Up @@ -295,9 +298,10 @@ def run_one_scenario(
aggregation.name(),
)

c.kill("cockroach", "materialized", "clusterd", "testdrive")
c.rm("cockroach", "materialized", "clusterd", "testdrive")
c.kill("cockroach", "materialized", "clusterd", "testdrive", *dependencies)
c.rm("cockroach", "materialized", "clusterd", "testdrive", *dependencies)
c.rm_volumes("mzdata")
c.up(*dependencies)

if early_abort:
result.empty()
Expand Down Expand Up @@ -554,7 +558,9 @@ def workflow_default(c: Composition, parser: WorkflowArgumentParser) -> None:

for scenario_class in scenario_classes_scheduled_to_run:
try:
scenario_result = run_one_scenario(c, scenario_class, args)
scenario_result = run_one_scenario(
c, scenario_class, args, dependencies
)
except RuntimeError as e:
if (
"No image found for commit hash" in str(e)
Expand Down