bexhoma.experiments.tpch module
Experiment class for TPC-H benchmarks.
Provides TpchExperiment, which extends
DbmsBenchmarkerExperiment to orchestrate TPC-H data generation,
loading, and query execution via the DBMSBenchmarker tool inside a Kubernetes
cluster.
Authors: Patrick K. Erdelt Copyright (C) 2020 Patrick K. Erdelt SPDX-License-Identifier: AGPL-3.0-or-later See LICENSE for details.
- bexhoma.experiments.tpch.DEFAULT_REFRESH_TEMPLATE = 'jobtemplate-benchmarking-tpch-refresh-PostgreSQL.yml'
Per-DBMS build defaults for the YAML-driven entry script (
bexhoma.experiments.tpch_builder), mirroring the per-DBMS branches intpch.py’s ownif "PostgreSQL" in args.dbms:-style loop as data instead of code. Only the DBMS variants with no per-DBMS logic (no worker-sharding, no container-tenancy) are covered here;Citusand multi-tenant container builds stay code-only, driven fromtpch.py. Fallbackrefresh_templatefor a DBMS entry that doesn’t declare its own (shares PostgreSQL’s dialect closely enough to reuse its refresh job).
- class bexhoma.experiments.tpch.TpchExperiment(cluster, code=None, queryfile='queries-tpch.config', SF='100', num_experiment_to_apply=1, timeout=7200, script=None)
Bases:
DbmsBenchmarkerExperimentTPC-H experiment: orchestrates data generation, loading, and DBMSBenchmarker query execution inside a Kubernetes cluster.
Registers a
TPCHbenchmark object and pre-populates the experiment dict template. Workload configuration (modes, info strings, indexing strategies) is delegated toconfigure_workload().Extends
DbmsBenchmarkerExperiment.- enable_refresh_stream(template: str = 'jobtemplate-benchmarking-tpch-refresh-PostgreSQL.yml') None
Add a TPC-H RF1/RF2 refresh stream that runs in parallel with the query stream.
The refresh stream becomes
benchmark_run=2within each client round. Callset_default_benchmarking_parameters()withTPCH_REFRESH_STREAMSandTPCH_REFRESH_STREAM_OFFSETbefore calling this method so those values reach both the generator initContainer and the loader main container.- Parameters:
template – k8s job-template file for the refresh benchmarker job. Choose the variant matching the target DBMS (
jobtemplate-benchmarking-tpch-refresh-PostgreSQL.ymlorjobtemplate-benchmarking-tpch-refresh-MySQL.yml).
- show_summary(write_report: bool = False) None
Print the TPC-H experiment summary, including the refresh stream section.
When
enable_refresh_stream()was called during the live run,RefreshStreamBenchmarkis already inself.benchmarksand the generic loop insidedbmsbenchmarker.show_summary()places the section right after### Execution → Per Phase.When called post-hoc via
bexhoma summary(noenable_refresh_stream()), a temporaryRefreshStreamBenchmarkis appended toself.benchmarksbefore delegating tosuper(), so the same loop positions it identically. The temporary entry is removed afterwards.- Parameters:
write_report – When
True, also write a tiered Markdown report (report/index.md+ detail files) to the result folder.