From 52cbe325ae92fa3b1a8a5c91c45eee4f70e474f3 Mon Sep 17 00:00:00 2001 From: Anand Inguva Date: Fri, 22 Jul 2022 02:18:15 +0530 Subject: [PATCH] Remove stripping of step name. Replace removing only suffix step name --- .../testing/load_tests/load_test_metrics_utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sdks/python/apache_beam/testing/load_tests/load_test_metrics_utils.py b/sdks/python/apache_beam/testing/load_tests/load_test_metrics_utils.py index 0099d462af98..1f1a6980b46d 100644 --- a/sdks/python/apache_beam/testing/load_tests/load_test_metrics_utils.py +++ b/sdks/python/apache_beam/testing/load_tests/load_test_metrics_utils.py @@ -92,7 +92,12 @@ def parse_step(step_name): Returns: lower case step name without namespace and step label """ - return step_name.lower().replace(' ', '_').strip('step:_') + prefix = 'step' + step_name = step_name.lower().replace(' ', '_') + step_name = ( + step_name[len(prefix):] + if prefix and step_name.startswith(prefix) else step_name) + return step_name.strip(':_') def split_metrics_by_namespace_and_name(metrics, namespace, name):