diff --git a/evals/benchmark/stresscli/commands/metrics.py b/evals/benchmark/stresscli/commands/metrics.py index cfe1948f..08474491 100644 --- a/evals/benchmark/stresscli/commands/metrics.py +++ b/evals/benchmark/stresscli/commands/metrics.py @@ -85,7 +85,7 @@ def start_collecting_data(self, namespace, services, output_dir="/data", restart pod_port = self.get_pod_port(pod_info) metrics = self.collect_metrics(pod_ip, pod_port, metrics_path) if metrics: - pod_output_path = os.path.join(output_dir, f"{service_name}_{pod_name}_{timestamp}.txt") + pod_output_path = os.path.join(output_dir, f"{service_name}@{pod_name}_{timestamp}.txt") logging.debug(f"Writing metrics to {pod_output_path}") with open(pod_output_path, "w") as f: f.write(metrics) diff --git a/evals/benchmark/stresscli/commands/metrics_docker.py b/evals/benchmark/stresscli/commands/metrics_docker.py index fd43eb2a..052b964d 100644 --- a/evals/benchmark/stresscli/commands/metrics_docker.py +++ b/evals/benchmark/stresscli/commands/metrics_docker.py @@ -76,7 +76,7 @@ def start_collecting_data(self, services, output_dir="/data"): for container_name in services: metrics = self.collect_metrics(container_name) if metrics: - output_path = os.path.join(output_dir, f"{container_name}_{timestamp}.txt") + output_path = os.path.join(output_dir, f"{container_name}@{timestamp}.txt") logging.debug(f"Writing Docker metrics to {output_path}") with open(output_path, "w") as f: f.write(metrics) diff --git a/evals/benchmark/stresscli/commands/metrics_util.py b/evals/benchmark/stresscli/commands/metrics_util.py index 1763eea5..73b17a95 100644 --- a/evals/benchmark/stresscli/commands/metrics_util.py +++ b/evals/benchmark/stresscli/commands/metrics_util.py @@ -116,8 +116,8 @@ def calculate_diff(start_dir, end_dir, output_dir, services=None): services = [services] for service_name in services: - # Create a regex pattern to match files starting with the service_name followed by a non-alphanumeric character - pattern = rf"^{re.escape(service_name)}[^a-zA-Z].*\.txt$" + # Create a regex pattern to match files starting with the service_name followed by symbol @ + pattern = rf'^{re.escape(service_name)}@.*\.txt$' start_service_files = [f for f in start_files if re.match(pattern, f)] end_service_files = [f for f in end_files if re.match(pattern, f)]