Update parse_trace.py

Tá an tiomantas seo le fáil i:
rkebichi údaraithe agus GitHub tiomanta 2020-02-03 17:25:28 -05:00
1 tuismitheoir 8cc21b7557
tiomantas 20051e559e
1 comhad athraithe
+3 -1
+3 -1
Féach ar an gComhad
@@ -9,10 +9,12 @@ events_order = []
def parse_trace(tracefile,cnt,order):
with open(tracefile) as f:
for line in f:
event_pattern = re.compile(r'<(\w+)\s+id\(\d+\)\s+.*')
event_pattern = re.compile(r'<(\w+)\s+id\(\d+\)\s+.*|\d+:\d+\s+\d+:\d+\s+(\w+).*')
m = event_pattern.match(line)
if m:
event = m.group(1)
if not event:
event = m.group(2)
if cnt:
if event in events_count:
events_count[event] = events_count[event] + 1