Skip to content

Commit

Permalink
fix collection of network latency metrics (#410)
Browse files Browse the repository at this point in the history
  • Loading branch information
jshr-w authored Nov 26, 2024
1 parent e7867fd commit f0799ea
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions modules/python/clusterloader2/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"StatefulPodStartupLatency_PodStartupLatency_": "StatefulPodStartupLatency_PodStartupLatency",
"StatelessPodStartupLatency_PodStartupLatency_": "StatelessPodStartupLatency_PodStartupLatency",
}
API_RESPONSIVENESS_FILE_PREFIX = "APIResponsivenessPrometheus"
NETWORK_METRIC_PREFIXES = ["APIResponsivenessPrometheus", "InClusterNetworkLatency", "NetworkProgrammingLatency"]
PROM_QUERY_PREFIX = "GenericPrometheusQuery"

def run_cl2_command(kubeconfig, cl2_image, cl2_config_dir, cl2_report_dir, provider, cl2_config_file="config.yaml", overrides=False, enable_prometheus=False, enable_exec_service=False):
Expand Down Expand Up @@ -51,9 +51,10 @@ def get_measurement(file_path):
if file_name.startswith(file_prefix):
group_name = file_name.split("_")[2]
return measurement, group_name
if file_name.startswith(API_RESPONSIVENESS_FILE_PREFIX):
group_name = file_name.split("_")[1]
return API_RESPONSIVENESS_FILE_PREFIX, group_name
for file_prefix in NETWORK_METRIC_PREFIXES:
if file_name.startswith(file_prefix):
group_name = file_name.split("_")[1]
return file_prefix, group_name
if file_name.startswith(PROM_QUERY_PREFIX):
group_name = file_name.split("_")[1]
measurement_name = file_name.split("_")[0][len(PROM_QUERY_PREFIX)+1:]
Expand Down

0 comments on commit f0799ea

Please sign in to comment.