aboutsummaryrefslogtreecommitdiffstats
path: root/build/plugins/lib/_metric_resolvers.py
blob: 7c5ea4a9ea81f9bf690ca6eaf0a131eef32b601e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
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)