aboutsummaryrefslogtreecommitdiffstats
path: root/build/plugins/lib/_metric_resolvers.py
diff options
context:
space:
mode:
authoralexv-smirnov <alex@ydb.tech>2023-03-15 19:59:12 +0300
committeralexv-smirnov <alex@ydb.tech>2023-03-15 19:59:12 +0300
commit056bb284ccf8dd6793ec3a54ffa36c4fb2b9ad11 (patch)
tree4740980126f32e3af7937ba0ca5f83e59baa4ab0 /build/plugins/lib/_metric_resolvers.py
parent269126dcced1cc8b53eb4398b4a33e5142f10290 (diff)
downloadydb-056bb284ccf8dd6793ec3a54ffa36c4fb2b9ad11.tar.gz
add library/cpp/actors, ymake build to ydb oss export
Diffstat (limited to 'build/plugins/lib/_metric_resolvers.py')
-rw-r--r--build/plugins/lib/_metric_resolvers.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/build/plugins/lib/_metric_resolvers.py b/build/plugins/lib/_metric_resolvers.py
new file mode 100644
index 0000000000..270eb78345
--- /dev/null
+++ b/build/plugins/lib/_metric_resolvers.py
@@ -0,0 +1,11 @@
+import re
+
+VALUE_PATTERN = re.compile(r"^\s*(?P<value>\d+)\s*$")
+
+
+def resolve_value(val):
+ match = VALUE_PATTERN.match(val)
+ if not match:
+ return None
+ val = match.group('value')
+ return int(val)