D4344: tracing: new module to make tracing events in hg easier

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Tue Aug 28 13:52:26 EDT 2018


durin42 added a comment.


  > Per my comment in https://phab.mercurial-scm.org/D4342 https://phab.mercurial-scm.org/D4342, I think we should consider recording the timing from here so times aren't skewed due to the presence of pipe I/O. That will introduce some overhead in the traced process. But such is the price to be paid for accurate time reporting, I suppose.
  
  My thinking on that was to avoid the syscall overhead for getting timestamps in the main hg process, which we’ve seen be a huge drag on performance. I couldn’t think of anything cheaper than a single string interpolation and a write to a named pipe, so that’s what we’ve got for now - we can always pursue more in the future if we want, but I want this tracing to be cheap enough that I could plausibly turn it on for 1% of invocations )or whatever) and not have users notice.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4344

To: durin42, #hg-reviewers
Cc: indygreg, mercurial-devel


More information about the Mercurial-devel mailing list