You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by bh...@apache.org on 2022/07/28 00:14:47 UTC
[beam] branch master updated: Remove stripping of step name. Replace removing only suffix step name (#22415)
This is an automated email from the ASF dual-hosted git repository.
bhulette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new b0b9c680255 Remove stripping of step name. Replace removing only suffix step name (#22415)
b0b9c680255 is described below
commit b0b9c6802552f06e506a4a78e68a3a3ddfbef343
Author: Anand Inguva <34...@users.noreply.github.com>
AuthorDate: Thu Jul 28 05:44:42 2022 +0530
Remove stripping of step name. Replace removing only suffix step name (#22415)
---
.../apache_beam/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 6e79ff19421..86c5005ab24 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):