fix: accumulate_profile: accept category names containing digits (e.g. hygiened decl names)

This commit is contained in:
Sebastian Ullrich 2023-02-06 13:31:54 +01:00
parent 75252d2b85
commit 3146aa477d

View file

@ -6,7 +6,7 @@ import sys
data = sys.stdin.read()
cats = collections.defaultdict(lambda: 0)
for m in re.findall("^([^\n\d]+)([\d.]+)(m?)s$", data, re.MULTILINE):
for m in re.findall("^(.+?) ([\d.]+)(m?)s$", data, re.MULTILINE):
cats[m[0].strip()] += float(m[1]) * (1e-3 if m[2] else 1)
for cat in sorted(cats.keys()):