( )⚙ D6477 profiling: show actual time spent in hotpath display

This is an archive of the discontinued Mercurial Phabricator instance.

profiling: show actual time spent in hotpath display
ClosedPublic

Authored by valentin.gatienbaron on Jun 5 2019, 1:10 PM.

Details

Summary

To get, for instance:

...
\ 6.6% 4.08s lock.py: exit line 1566: ...

|  6.5%  4.01s  exchange.py:    close           line 1191: ...
|  6.5%  4.01s  transaction.py: _active         line 1443: ...
|  6.5%  4.01s  transaction.py: close           line 47:   ...
|  6.2%  3.84s  scmutil.py:     wrapped         line 529:  ...
|  6.2%  3.81s  localrepo.py:   wrapper         line 2114: ...
|  6.2%  3.81s  localrepo.py:   updatecaches    line 177:  ...
...

instead of:

...
\ 6.6% lock.py: exit line 1566: ...

|  6.5%  exchange.py:    close           line 1191: ...
|  6.5%  transaction.py: _active         line 1443: ...
|  6.5%  transaction.py: close           line 47:   ...
|  6.2%  scmutil.py:     wrapped         line 529:  ...
|  6.2%  localrepo.py:   wrapper         line 2114: ...
|  6.2%  localrepo.py:   updatecaches    line 177:  ...
...

I find that if it's not displayed, I frequently end up estimating the
numbers by hand.

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

pulkit added a subscriber: pulkit.Jun 5 2019, 3:45 PM

I find that if it's not displayed, I frequently end up estimating the
numbers by hand.

Mee too! I think we should enable this by default. What do you think?

Oh yeah, I didn't really consider the default. I clearly prefer "true", so I'll change it. Maybe it's not even worth having an option. I think the only advantage of not printing this column is to have 5 more columns available for the code excerpt at the end of lines.

valentin.gatienbaron retitled this revision from profiling: add an option to show actual time spent to profiling: show actual time spent in hotpath display.Jun 5 2019, 9:17 PM
valentin.gatienbaron updated this revision to Diff 15352.
pulkit accepted this revision.Jun 6 2019, 7:59 AM
This revision was automatically updated to reflect the committed changes.