Skip to content

Commit

Permalink
Bexhoma: config.monitoring_sut to deactivate monitoring of SUT for se…
Browse files Browse the repository at this point in the history
…rvices outside of K8s
  • Loading branch information
perdelt committed Nov 29, 2024
1 parent ec0f0d1 commit 03fe134
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bexhoma/experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -1565,6 +1565,12 @@ def end_benchmarking(self,
if len(endpoints_cluster)>0 or self.cluster.monitor_cluster_exists:
print("{:30s}: collecting metrics of benchmarker".format(connection))
metric_example = config.benchmark.dbms[config.current_benchmark_connection].connectiondata['monitoring']['metrics']['total_cpu_memory'].copy()
container = "dbmsbenchmarker"
if container is not None:
metric_example['query'] = metric_example['query'].replace('container_label_io_kubernetes_container_name="dbms"', 'container_label_io_kubernetes_container_name="{}"'.format(container))
metric_example['query'] = metric_example['query'].replace('container_label_io_kubernetes_container_name!="dbms"', 'container_label_io_kubernetes_container_name!="{}"'.format(container))
metric_example['query'] = metric_example['query'].replace('container="dbms"', 'container="{}"'.format(container))
metric_example['query'] = metric_example['query'].replace('container!="dbms"', 'container!="{}"'.format(container))
print("{:30s}: example metric {}".format(connection, metric_example))
cmd['fetch_benchmarker_metrics'] = 'python metrics.py -r /results/ -db -ct benchmarker -cn dbmsbenchmarker -c {} -cf {} -f {} -e {} -ts {} -te {}'.format(connection, connection+'.config', '/results/'+self.code, self.code, start_time, end_time)
#cmd['fetch_loading_metrics'] = 'python metrics.py -r /results/ -db -ct loading -c {} -cf {} -f {} -e {} -ts {} -te {}'.format(connection, c['name']+'.config', '/results/'+self.code, self.code, self.timeLoadingStart, self.timeLoadingEnd)
Expand Down

0 comments on commit 03fe134

Please sign in to comment.