@@ -185,25 +185,7 @@ def process_default_yaml_properties_file(
185185 default_config = yaml .safe_load (stream )
186186 default_specs = None
187187 cluster_config = None
188- if "exporter" in default_config :
189- default_metrics = parse_exporter_metrics_definition (default_config ["exporter" ])
190- if len (default_metrics ) > 0 :
191- logging .info (
192- "Found RedisTimeSeries default metrics specification."
193- " Will include the following metrics on all benchmarks {}" .format (
194- " " .join (default_metrics )
195- )
196- )
197- exporter_timemetric_path = parse_exporter_timemetric_definition (
198- default_config ["exporter" ]
199- )
200- if exporter_timemetric_path is not None :
201- logging .info (
202- "Found RedisTimeSeries default time metric specification."
203- " Will use the following JSON path to retrieve the test time {}" .format (
204- exporter_timemetric_path
205- )
206- )
188+ default_metrics , exporter_timemetric_path = extract_exporter_metrics (default_config )
207189 if "kpis" in default_config :
208190 logging .info (
209191 "Loading default KPIs specifications from file: {}" .format (
@@ -232,6 +214,29 @@ def process_default_yaml_properties_file(
232214 )
233215
234216
217+ def extract_exporter_metrics (default_config ):
218+ if "exporter" in default_config :
219+ default_metrics = parse_exporter_metrics_definition (default_config ["exporter" ])
220+ if len (default_metrics ) > 0 :
221+ logging .info (
222+ "Found RedisTimeSeries default metrics specification."
223+ " Will include the following metrics on all benchmarks {}" .format (
224+ " " .join (default_metrics )
225+ )
226+ )
227+ exporter_timemetric_path = parse_exporter_timemetric_definition (
228+ default_config ["exporter" ]
229+ )
230+ if exporter_timemetric_path is not None :
231+ logging .info (
232+ "Found RedisTimeSeries default time metric specification."
233+ " Will use the following JSON path to retrieve the test time {}" .format (
234+ exporter_timemetric_path
235+ )
236+ )
237+ return default_metrics , exporter_timemetric_path
238+
239+
235240def extract_benchmark_tool_settings (benchmark_config ):
236241 benchmark_tool = None
237242 benchmark_tool_source = None
0 commit comments