bexhoma.collectors package
Submodules
- bexhoma.collectors.base module
CollectorBaseCollectorBase.TEST_get_loading_per_run()CollectorBase.add_metadata()CollectorBase.get_connections()CollectorBase.get_evaluator()CollectorBase.get_loading_per_connection()CollectorBase.get_loading_per_pod()CollectorBase.get_loading_per_run()CollectorBase.get_loading_per_run_multitenant()CollectorBase.get_metrics()CollectorBase.get_metrics_metadata()CollectorBase.get_monitored_components()CollectorBase.get_monitoring_aggregated_per_job()CollectorBase.get_monitoring_aggregated_per_phase()CollectorBase.get_monitoring_aggregated_per_phase_multitenant()CollectorBase.get_monitoring_timeseries_all()CollectorBase.get_monitoring_timeseries_all_multitenant()CollectorBase.get_monitoring_timeseries_per_phase()CollectorBase.get_monitoring_timeseries_single()CollectorBase.get_performance_aggregated_per_job()CollectorBase.get_performance_aggregated_per_phase()CollectorBase.get_performance_aggregated_per_phase_multitenant()CollectorBase.get_performance_per_connection()CollectorBase.get_performance_single()CollectorBase.get_workload()CollectorBase.show_summary_monitoring_table()
get_non_constant()
- bexhoma.collectors.benchbase module
- bexhoma.collectors.dbmsbenchmarker module
- bexhoma.collectors.tpcc module
- bexhoma.collectors.ycsb module
Module contents
Public API of the bexhoma.collectors package.
Exports the collector classes (CollectorBase, BenchbaseCollector,
DbmsBenchmarkerCollector, MixedCollector, TpccCollector,
YcsbCollector) and the utility functions get_non_constant() and
map_index_to_queryname().
Backward-compatible aliases (base, benchbase, dbmsbenchmarker,
mixed, tpcc, ycsb) are provided so that existing code that imports
the old lowercase class names continues to work without modification.
Authors: Patrick K. Erdelt Copyright (C) 2020 Patrick K. Erdelt SPDX-License-Identifier: AGPL-3.0-or-later See LICENSE for details.
- class bexhoma.collectors.BenchbaseCollector(path, codes, benchmark_run: int = 0)
Bases:
CollectorBaseCollector for Benchbase experiments.
Overrides
get_evaluator()to return aevaluators.benchbaseinstance. All data collection and aggregation methods are inherited fromCollectorBase.- get_benchmark_timeseries_all(metric='throughput')
Collects long-format Benchbase time-series data for a given metric across all experiment codes.
For each code and each unique
(configuration, client, experiment_run)combination, callsevaluators.benchbase.get_benchmark_logs_timeseries_df_aggregated(), reshapes the result to long format, and annotates each row with its identifying fields. Connection metadata (e.g.type_tenants,num_tenants,vol_tenants) is joined in fromget_connections()for each code.- Parameters:
metric (str) – Benchbase metric to retrieve (default
'throughput').- Returns:
Long-format DataFrame with columns
second,code,configuration,client,experiment_run,metric,value, plus connection metadata columns.- Return type:
pandas.DataFrame
- get_benchmark_timeseries_per_phase(metric='throughput')
Combines aggregated Benchbase time-series per phase from all experiment codes into a wide-format DataFrame.
For each code and each unique
(configuration, client, experiment_run, benchmark_run)combination, callsevaluators.benchbase.get_benchmark_logs_timeseries_df_aggregated()and places the metric column as one column in the result. Each column is labelled{code}-{configuration}-{client}-{experiment_run}-{benchmark_run}.- Parameters:
metric (str) – Benchbase metric to retrieve (default
'throughput').- Returns:
Wide-format DataFrame indexed by second with one column per phase, or an empty DataFrame when no data is available.
- Return type:
pandas.DataFrame
- get_evaluator(code='')
Returns a
evaluators.benchbaseinstance for the given experiment code.- Parameters:
code (str) – Experiment identifier. Defaults to the first code in
self.codes.- Returns:
Benchbase evaluator for the specified experiment.
- Return type:
evaluators.benchbase
- class bexhoma.collectors.CollectorBase(path, codes)
Bases:
objectBase class for collecting and aggregating results from several experiments.
Subclasses override
get_evaluator()to return a benchmark-specific evaluator. All data retrieval and aggregation methods are defined here.- Date:
2025-07-22
- Version:
0.8.10
- TEST_get_loading_per_run()
Experimental: computes per-run loading throughput in SF/h from per-connection data.
Groups the per-connection loading result by
(code, configuration, experiment_run), takes the column-wise maximum, then derivesThroughput [SF/h]asSF * 3600 / time_load. Theconnection,phase, andclientcolumns are dropped from the result.- Returns:
DataFrame indexed by
code-configuration-experiment_runwith aThroughput [SF/h]column added.- Return type:
pandas.DataFrame
- add_metadata(df)
Joins connection metadata from
get_connections()onto a monitoring DataFrame.Attempts to merge
dfwith the connection metadata using one of several strategies, tried in order:Index × job column — when
df’s index intersectsdf_connections['job'](job-level monitoring DataFrames indexed by the code-prefixed 4-part job identifier).Index × phase column — when
df’s index intersectsdf_connections['phase'](phase-level timeseries DataFrames indexed by the code-prefixed 3-part phase identifier).Shared index — when both DataFrames share common index values.
Phase column join — when both DataFrames have a
phasecolumn (phase-aggregated DataFrames that carryphaseas a regular column).Multi-tenant key join — when both DataFrames have
(code, experiment_run, client, type_tenants, num_tenants)columns.
If none of the strategies match, a warning is printed and an empty DataFrame is returned.
- Parameters:
df (pandas.DataFrame) – Monitoring DataFrame to enrich with connection metadata.
- Returns:
Enriched DataFrame with connection metadata columns added, or empty on failure.
- Return type:
pandas.DataFrame
- get_connections(evaluation=None)
Returns connection metadata for all experiments in the collection.
When called without arguments, iterates over
self.codesand concatenates the result ofget_connections_of_experiment()for each code. When anevaluationis provided, returns only the connections for that experiment.Key columns in the returned DataFrame:
phase(code-prefixed job identifier:<code>-<configuration>-<experiment_run>-<client>-<benchmark_run>),code,connection,configuration,experiment_run,benchmark_run,client,type_tenants,num_tenants,vol_tenants.- Parameters:
evaluation (object, optional) – Evaluator instance. If provided, only that experiment is queried.
- Returns:
DataFrame of connection metadata.
- Return type:
pandas.DataFrame
- get_evaluator(code='')
Returns a benchmarking evaluator for the given experiment code.
Subclasses override this method to return the appropriate evaluator type. The base implementation returns a
evaluators.dbmsbenchmarkerinstance.- Parameters:
code (str) – Experiment identifier. Defaults to the first code in
self.codes.- Returns:
Evaluator instance for the specified experiment.
- Return type:
evaluators.dbmsbenchmarker
- get_loading_per_connection()
Combines loading metrics per connection from all experiment codes into one DataFrame.
Concatenates the per-connection loading DataFrames returned by each evaluator.
- Returns:
Combined DataFrame of per-connection loading metrics for all experiments.
- Return type:
pandas.DataFrame
- get_loading_per_pod()
Combines loading metrics per pod from all experiment codes into one DataFrame.
Concatenates the per-pod loading DataFrames returned by each evaluator. The
connection,phase, andclientcolumns are dropped from the result because they are not meaningful across experiments.- Returns:
Combined DataFrame of per-pod loading metrics for all experiments.
- Return type:
pandas.DataFrame
- get_loading_per_run()
Combines loading metrics per run from all experiment codes into one DataFrame.
Concatenates the per-run loading DataFrames returned by each evaluator.
- Returns:
Combined DataFrame of per-run loading metrics for all experiments.
- Return type:
pandas.DataFrame
- get_loading_per_run_multitenant()
Combines multi-tenant loading metrics per run from all experiment codes into one DataFrame.
Concatenates the per-run multi-tenant loading DataFrames returned by each evaluator.
- Returns:
Combined DataFrame of per-run multi-tenant loading metrics for all experiments.
- Return type:
pandas.DataFrame
- get_metrics(evaluation=None)
Returns metadata for the hardware metrics collected during the experiment.
Reads
connections.configfor the given evaluation and extracts the monitoring metric definitions. The returned DataFrame has one row per metric and the following columns:title: human-readable metric name,active: whether the metric was active (defaults to'True'),type: metric category, e.g.'cluster'(default),metric: raw metric identifier.
Sets
self.with_monitoring = Falseand returns an empty DataFrame when no'metrics'key is found in the first connection’s monitoring block.- Parameters:
evaluation (object) – Evaluator instance. Defaults to the first code’s evaluator.
- Returns:
DataFrame of metric metadata indexed by metric key.
- Return type:
pandas.DataFrame
- get_metrics_metadata()
Returns the metrics metadata DataFrame built during initialisation.
- Returns:
DataFrame listing monitored hardware metrics and their metadata.
- Return type:
pandas.DataFrame
- get_monitored_components(code='')
Returns a DataFrame of monitored components defined in the workload configuration.
- Parameters:
code (str) – Experiment identifier. Defaults to the first code in
self.codes.- Returns:
DataFrame indexed by component key with a
descriptioncolumn, or an empty DataFrame when monitoring is disabled.- Return type:
pandas.DataFrame
- get_monitoring_aggregated_per_job(type='stream')
Combines aggregated monitoring metrics from all experiment codes into one DataFrame.
For each code, calls
show_summary_monitoring_table()and concatenates the results. Theconnectioncolumn is dropped because it is no longer meaningful across experiments.The result index is the code-prefixed job identifier (
<code>-<configuration>-<experiment_run>-<client>-<benchmark_run>), producing one row per benchmark job.- Parameters:
type (str) – Component type to filter monitoring metrics (default
'stream').- Returns:
Combined DataFrame of aggregated monitoring metrics, one row per job, or an empty DataFrame when monitoring is disabled.
- Return type:
pandas.DataFrame
- get_monitoring_aggregated_per_phase(type='stream')
Combines aggregated monitoring metrics per phase from all experiment codes.
Builds on
get_monitoring_aggregated_per_job()and further aggregates by phase (configuration-experiment_run-client), collapsing parallel benchmark jobs within the same phase into a single row.Aggregation per metric type: ratio →
max, counter →sum, others →mean.'Total I/O Wait Time [s]'is always reduced withmax.The result index is the code-prefixed phase identifier (
<code>-<configuration>-<experiment_run>-<client>).- Parameters:
type (str) – Component type to filter monitoring metrics (default
'stream').- Returns:
Combined DataFrame of aggregated monitoring metrics, one row per phase, or an empty DataFrame when monitoring is disabled.
- Return type:
pandas.DataFrame
- get_monitoring_aggregated_per_phase_multitenant(type='stream')
Combines aggregated multi-tenant monitoring metrics from all experiment codes into one DataFrame.
Calls
get_monitoring_aggregated_per_job()to collect the per-job monitoring data, enriches it with connection metadata viaadd_metadata(), then groups by(code, experiment_run, client, type_tenants, num_tenants)and reduces each metric column using'max'for ratio metrics and'sum'for counter metrics.'Total I/O Wait Time [s]'is always reduced with'max'.- Parameters:
type (str) – Component type forwarded to
get_monitoring_aggregated_per_job().- Returns:
DataFrame of grouped multi-tenant monitoring metrics indexed by the underscore-joined group key.
- Return type:
pandas.DataFrame
- get_monitoring_timeseries_all(metric='pg_locks_count', component='stream')
Collects long-format time-series data for a given metric across all experiment codes.
For each code, fetches the wide-format time series, melts it to long format, merges connection metadata, and concatenates the results. The final DataFrame is grouped by
(timestamp, code, phase, experiment_run, client, type_tenants, vol_tenants, num_tenants, metric, component)and summed.
- get_monitoring_timeseries_all_multitenant(metric='pg_locks_count', component='stream')
Collects long-format multi-tenant time-series data for a given metric across all experiment codes.
Behaves like
get_monitoring_timeseries_all()but additionally annotates each row with tenant metadata (type_tenants,num_tenants,vol_tenants) from the workload configuration. For non-container tenancy, thetenant_idcolumn is set to"0"to indicate a single shared DBMS.The final DataFrame is grouped by
(timestamp, code, experiment_run, client, type_tenants, vol_tenants, num_tenants, metric, component)and summed.
- get_monitoring_timeseries_per_phase(code, metric='pg_locks_count', component='stream')
Returns a single monitoring metric as a transposed time-series DataFrame.
Compared to
get_monitoring_timeseries_single(), the result is transposed so that rows are monitored component instances and columns are timestamps.
- get_monitoring_timeseries_single(code, metric='pg_locks_count', component='stream')
Returns a single monitoring metric as a wide-format time-series DataFrame.
Rows are timestamps; columns are monitored component instances (e.g. pods).
- get_performance_aggregated_per_job(type='stream')
Combines aggregated performance results per job from all experiment codes.
Groups by the
jobcolumn (configuration-experiment_run-client-benchmark_run), keeping parallel benchmark jobs within the same phase as separate rows. Bothphase(code-prefixed phase identifier) andjob(code-prefixed job identifier) are included in the output.The result index is the code-prefixed job identifier (
<code>-<configuration>-<experiment_run>-<client>-<benchmark_run>).- Parameters:
type (str) – Component type passed to the aggregation call (currently unused).
- Returns:
Combined DataFrame of aggregated performance metrics, one row per job.
- Return type:
pandas.DataFrame
- get_performance_aggregated_per_phase(type='stream')
Combines aggregated performance results per phase from all experiment codes.
Groups by the
phasecolumn (configuration-experiment_run-client), aggregating all parallel benchmark jobs within the same phase into a single row. Thejobcolumn is dropped from the output. The result index is the code-prefixed phase identifier (<code>-<configuration>-<experiment_run>-<client>).- Parameters:
type (str) – Component type passed to the aggregation call (currently unused).
- Returns:
Combined DataFrame of aggregated performance metrics, one row per phase.
- Return type:
pandas.DataFrame
- get_performance_aggregated_per_phase_multitenant(type='stream')
Combines aggregated multi-tenant performance results from all experiment codes into one DataFrame.
Extends
get_performance_aggregated_per_phase()by annotating each row with tenant metadata (type_tenants,num_tenants,vol_tenants) read from the workload configuration before aggregation. Groups by(code, experiment_run, client, benchmark_run, type_tenants, num_tenants, tenant_id), producing one row per tenant per job.tenant_idis added to the per-connection DataFrame bybenchmarking_set_datatypes()(default-1for experiments without explicit tenant assignment).- Parameters:
type (str) – Component type passed to the aggregation call (currently unused in this method).
- Returns:
Combined DataFrame of aggregated multi-tenant performance metrics.
- Return type:
pandas.DataFrame
- get_performance_per_connection()
Combines unaggregated performance results per connection from all experiment codes.
For each code, retrieves the per-client performance data and prefixes the
phase,connection,configuration, and DataFrame index with the experiment code before concatenating.- Returns:
Combined DataFrame of unaggregated performance metrics for all experiments.
- Return type:
pandas.DataFrame
- get_performance_single(evaluation=None)
Returns unaggregated benchmarking performance metrics per client.
Retrieves the benchmarking DataFrame from the evaluator, sorts it by experiment run and client, and returns the result without further aggregation.
- Parameters:
evaluation (object) – Evaluator instance. Defaults to the first code’s evaluator.
- Returns:
DataFrame of per-client performance metrics sorted by
code,experiment_run, andclient.- Return type:
pandas.DataFrame
- get_workload(code='')
Returns the workload configuration of an experiment.
Reads the
queries.configfile for the given experiment code and returns its contents as a dictionary. Thetenant_perkey is normalised to the string'None'when absent or empty.
- show_summary_monitoring_table(evaluation, type='stream')
Collects all active monitoring metrics for a given component without aggregation.
Iterates over
self.df_metrics, skipping inactive metrics, and fetches the time-series data for each metric via the evaluator. Counter metrics are reduced bymax - min; ratio metrics bymax; all others bymean. Results are combined column-wise into a summary DataFrame.- Parameters:
- Returns:
Summary DataFrame of monitoring metrics rounded to two decimal places, or an empty DataFrame when monitoring is disabled.
- Return type:
pandas.DataFrame
- class bexhoma.collectors.DbmsBenchmarkerCollector(path, codes, benchmark_run: int = 0)
Bases:
CollectorBaseCollector for DBMSBenchmarker experiments.
Extends
CollectorBasewith query-level aggregation methods for warnings, errors, and latencies. Overridesget_evaluator()to return aevaluators.dbmsbenchmarkerinstance.- get_evaluator(code='')
Returns a
evaluators.dbmsbenchmarkerinstance for the given experiment code.- Parameters:
code (str) – Experiment identifier. Defaults to the first code in
self.codes.- Returns:
DBMSBenchmarker evaluator for the specified experiment.
- Return type:
evaluators.dbmsbenchmarker
- get_query_latencies(query_titles=False)
Aggregates query latency metrics across all experiment codes.
For each code, retrieves the per-query latency DataFrame from the evaluator and prefixes its index with the experiment code before concatenating.
- Parameters:
query_titles (bool) – If
True, use human-readable query titles as index labels.- Returns:
A combined DataFrame of query latencies for all experiments.
- Return type:
pandas.DataFrame
- get_total_errors(query_titles=False)
Aggregates error counts (failed queries) across all experiment codes.
For each code, retrieves the per-query error DataFrame from the evaluator and prefixes its index with the experiment code before concatenating.
Note
The current implementation delegates to
evaluation.get_total_warnings.- Parameters:
query_titles (bool) – If
True, use human-readable query titles as index labels.- Returns:
A combined DataFrame of error counts for all experiments.
- Return type:
pandas.DataFrame
- get_total_warnings(query_titles=False)
Aggregates warning counts (result mismatches) across all experiment codes.
For each code, retrieves the per-query warning DataFrame from the evaluator and prefixes its index with the experiment code before concatenating.
- Parameters:
query_titles (bool) – If
True, use human-readable query titles as index labels.- Returns:
A combined DataFrame of warning counts for all experiments.
- Return type:
pandas.DataFrame
- class bexhoma.collectors.MixedCollector(path: str, codes: list[str])
Bases:
CollectorBaseCollector for experiments that contain multiple benchmark types.
Reads the
benchmark_sequencekey fromqueries.config— written bystore_workflow_results()— to determine which benchmark tool ran at eachbenchmark_runindex. Exposes one typed sub-collector per benchmark-run index viaget_typed_collector(), and a convenience methodget_performance_per_benchmark()that returns a dict of aggregated-performance DataFrames keyed by benchmark type name.- Parameters:
path – Base filesystem path that contains the experiment directories.
codes – List of experiment codes to collect results for.
- get_performance_per_benchmark() dict
Returns aggregated performance results separated by benchmark type.
Iterates over
benchmark_sequence, creates a typed sub-collector for each entry viaget_typed_collector(), and callsget_performance_aggregated_per_phase()on it.
- get_typed_collector(benchmark_run: int) CollectorBase
Returns a typed sub-collector scoped to a single benchmark-run index.
The collector class is resolved from
_COLLECTOR_FOR_TYPEusing the'type'field of the matching entry inbenchmark_sequence.- Parameters:
benchmark_run (int) – 1-based benchmark-run index.
- Returns:
Typed collector instance filtered to
benchmark_run.- Return type:
- Raises:
StopIteration – If
benchmark_runis not found inbenchmark_sequence.KeyError – If the benchmark type is not registered in
_COLLECTOR_FOR_TYPE.
- class bexhoma.collectors.TpccCollector(path, codes, benchmark_run: int = 0)
Bases:
CollectorBaseCollector for HammerDB TPC-C experiments.
Overrides
get_evaluator()to return aevaluators.tpccinstance. All data collection and aggregation methods are inherited fromCollectorBase.- get_evaluator(code='')
Returns a
evaluators.tpccinstance for the given experiment code.- Parameters:
code (str) – Experiment identifier. Defaults to the first code in
self.codes.- Returns:
TPC-C evaluator for the specified experiment.
- Return type:
evaluators.tpcc
- class bexhoma.collectors.YcsbCollector(path, codes, benchmark_run: int = 0)
Bases:
CollectorBaseCollector for YCSB experiments.
Overrides
get_evaluator()to return aevaluators.ycsbinstance. All data collection and aggregation methods are inherited fromCollectorBase.- get_benchmark_timeseries_all(metric='current_ops_per_sec')
Collects long-format YCSB time-series data for a given metric across all experiment codes.
For each code and each unique
(configuration, client, experiment_run)combination, callsevaluators.ycsb.get_benchmark_logs_timeseries_df_aggregated(), reshapes the result to long format, and annotates each row with its identifying fields. Connection metadata (e.g.type_tenants,num_tenants,vol_tenants) is joined in fromget_connections()for each code.The YCSB evaluator uses
'sec'as the index name; this method normalises it to'second'for consistency with other time-series methods.- Parameters:
metric (str) – YCSB metric to retrieve (default
'current_ops_per_sec').- Returns:
Long-format DataFrame with columns
second,code,configuration,client,experiment_run,metric,value, plus connection metadata columns.- Return type:
pandas.DataFrame
- get_benchmark_timeseries_per_phase(metric='current_ops_per_sec')
Combines aggregated YCSB time-series per phase from all experiment codes into a wide-format DataFrame.
For each code and each unique
(configuration, client, experiment_run, benchmark_run)combination, callsevaluators.ycsb.get_benchmark_logs_timeseries_df_aggregated()and places the metric column as one column in the result. Each column is labelled{code}-{configuration}-{client}-{experiment_run}-{benchmark_run}.- Parameters:
metric (str) – YCSB metric to retrieve (default
'current_ops_per_sec').- Returns:
Wide-format DataFrame indexed by second with one column per phase, or an empty DataFrame when no data is available.
- Return type:
pandas.DataFrame
- get_evaluator(code='')
Returns a
evaluators.ycsbinstance for the given experiment code.- Parameters:
code (str) – Experiment identifier. Defaults to the first code in
self.codes.- Returns:
YCSB evaluator for the specified experiment.
- Return type:
evaluators.ycsb
- get_loading_timeseries_all(metric='current_ops_per_sec')
Collects long-format YCSB loading time-series data for a given metric across all experiment codes.
For each code and each unique
(configuration, experiment_run)combination, callsevaluators.ycsb.get_loading_logs_timeseries_df_aggregated(), reshapes the result to long format, and annotates each row with its identifying fields. Connection metadata (e.g.type_tenants,num_tenants,vol_tenants) is joined in fromget_connections()for each code.Unlike the benchmarking variant, the loading phase has no
clientdimension.The YCSB evaluator uses
'sec'as the index name; this method normalises it to'second'for consistency with other time-series methods.- Parameters:
metric (str) – YCSB metric to retrieve (default
'current_ops_per_sec').- Returns:
Long-format DataFrame with columns
second,code,configuration,experiment_run,metric,value, plus connection metadata columns.- Return type:
pandas.DataFrame
- get_loading_timeseries_per_phase(metric='current_ops_per_sec')
Combines aggregated YCSB loading time-series per phase from all experiment codes into a wide-format DataFrame.
For each code and each unique
(configuration, experiment_run)combination, callsevaluators.ycsb.get_loading_logs_timeseries_df_aggregated()and places the metric column as one column in the result. Each column is labelled{code}-{configuration}-{experiment_run}.Unlike the benchmarking variant, the loading phase has no
clientdimension.- Parameters:
metric (str) – YCSB metric to retrieve (default
'current_ops_per_sec').- Returns:
Wide-format DataFrame indexed by second with one column per phase, or an empty DataFrame when no data is available.
- Return type:
pandas.DataFrame
- bexhoma.collectors.base
alias of
CollectorBase
- bexhoma.collectors.benchbase
alias of
BenchbaseCollector
- bexhoma.collectors.dbmsbenchmarker
alias of
DbmsBenchmarkerCollector
- bexhoma.collectors.get_non_constant(df)
Filters a DataFrame to keep only columns whose values vary across rows.
- Parameters:
df (pandas.DataFrame) – Input DataFrame.
- Returns:
DataFrame containing only non-constant columns.
- Return type:
pandas.DataFrame
- bexhoma.collectors.map_index_to_queryname(numQuery)
Maps a query index string (e.g.,
'q1') to a human-readable title from the globalquery_propertiesdictionary.If the title cannot be resolved, the original input string is returned unchanged.
- bexhoma.collectors.mixed
alias of
MixedCollector
- bexhoma.collectors.tpcc
alias of
TpccCollector
- bexhoma.collectors.ycsb
alias of
YcsbCollector