Skip to content
Snippets Groups Projects
Commit e658ac39fe41 authored by Augie Fackler's avatar Augie Fackler
Browse files

tracing: add support for emitting counters

Differential Revision: https://phab.mercurial-scm.org/D6526
parent d0b8a3cfd732
No related branches found
No related tags found
No related merge requests found
......@@ -46,3 +46,13 @@
_pipe.write('END %s %s\n' % (_session, whence))
except IOError:
pass
def counter(label, amount, *labelargs):
if not _isactive():
return
l = label % labelargs
# See above in log() for why this is in a try/except.
try:
_pipe.write('COUNTER %s %d %s\n' % (_session, amount, l))
except IOError:
pass
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment