comparison contrib/catapipe.py @ 39935:cb9b23ec093c

catapipe: fix bug introduced when switching to the timer api Differential Revision: https://phab.mercurial-scm.org/D4818
author Augie Fackler <augie@google.com>
date Mon, 01 Oct 2018 09:05:41 -0400
parents b29ec19748a7
children c311424ea579
comparison
equal deleted inserted replaced
39934:a24f4638d6c1 39935:cb9b23ec093c
69 print(ev) 69 print(ev)
70 verb, session, label = ev.split(' ', 2) 70 verb, session, label = ev.split(' ', 2)
71 if session not in _threadmap: 71 if session not in _threadmap:
72 _threadmap[session] = len(_threadmap) 72 _threadmap[session] = len(_threadmap)
73 pid = _threadmap[session] 73 pid = _threadmap[session]
74 ts_micros = (now - start).total_seconds() * 1000000 74 ts_micros = (now - start) * 1000000
75 out.write(json.dumps( 75 out.write(json.dumps(
76 { 76 {
77 "name": label, 77 "name": label,
78 "cat": "misc", 78 "cat": "misc",
79 "ph": _TYPEMAP[verb], 79 "ph": _TYPEMAP[verb],