|
36 | 36 | parser.add_argument('-f', '--config-folder', help='folder containing query and connection config files. If set, the names connections.config and queries.config are assumed automatically.', default=None) |
37 | 37 | parser.add_argument('-c', '--connection', help='Name of the connection (dbms) to use', default=None) |
38 | 38 | parser.add_argument('-mt', '--metrics-type', help='Type of metrics definitions (metrics, metrics_special, metrics_custom)', default='') |
39 | | - #parser.add_argument('-co', '--component', help='Component name', default='sut') |
| 39 | + parser.add_argument('-com', '--component', help='Component name', default='') |
40 | 40 | parser.add_argument('-ct', '--component-type', help='Type of the component (loading or stream)', default='loading') |
41 | 41 | parser.add_argument('-cn', '--container-name', help='Name of the container (if not dbms for sut/workers: datagenerator, sensor, dbmsbenchmarker)', default=None) |
42 | 42 | parser.add_argument('-cf', '--connection-file', help='name of connection config file', default='connections.config') |
|
54 | 54 | connection = args.connection |
55 | 55 | query = args.component_type |
56 | 56 | metrics_type = args.metrics_type |
57 | | - #component = args.component |
| 57 | + component = args.component |
58 | 58 | container_name = args.container_name |
59 | 59 | time_start = int(args.time_start)#1616083225 |
60 | 60 | time_end = int(args.time_end)#1616083310 |
|
92 | 92 | for m, metric in connection_data.connectiondata['monitoring'][metrics_type].items(): |
93 | 93 | print("Metric", m) |
94 | 94 | path = '{result_path}/{code}/'.format(result_path=result_path, code=code) |
95 | | - monitor.metrics.fetchMetric(query, m, connection_name, connection_data.connectiondata, time_start, time_end, path, container=container_name, metrics_query_path=metrics_type) |
| 95 | + monitor.metrics.fetchMetric(query, m, connection_name, connection_data.connectiondata, time_start, time_end, path, container=container_name, metrics_query_path=metrics_type, component=component) |
96 | 96 | # do not use replacement anymore (SUT deployment replaced by SUT worker) |
97 | 97 | #elif 'metrics_special' in connection_data.connectiondata['monitoring'] and (query == 'loading' or query == 'stream'): |
98 | 98 | # print("Use special metrics for SUT not managed by bexhoma: component type = {}".format(query)) |
|
105 | 105 | for m, metric in connection_data.connectiondata['monitoring']['metrics'].items(): |
106 | 106 | print("Metric", m) |
107 | 107 | path = '{result_path}/{code}/'.format(result_path=result_path, code=code) |
108 | | - monitor.metrics.fetchMetric(query, m, connection_name, connection_data.connectiondata, time_start, time_end, path, container=container_name, metrics_query_path='metrics') |
| 108 | + monitor.metrics.fetchMetric(query, m, connection_name, connection_data.connectiondata, time_start, time_end, path, container=container_name, metrics_query_path='metrics', component=component) |
109 | 109 | #metrics = monitor.metrics(experiments) |
110 | 110 | #df = metrics.dfHardwareMetricsLoading(m) |
111 | 111 | #print(df) |
|
0 commit comments