This lives in hgdemandimport because I want to instrument a bunch of
low-level stuff including the bare hg script and demandimport, so it
can't live at a higher layer.
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHG284440041141: tracing: new module to make tracing events in hg easier
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
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.