This is an archive of the discontinued Mercurial Phabricator instance.

chg: pass --no-profile to disable profiling when starting hg serve
ClosedPublic

Authored by spectral on Apr 19 2021, 6:32 PM.

Details

Summary

If profiling is enabled via global/user config (as far as I can tell, this
doesn't affect use of the --profile flag, but it probably does affect --config
profiling.enabled=1), then the profiling data can be *cumulative* for the
lifetime of the chg process.

This leads to some "interesting" results where hg claims the walltime is
something like 200s on a command that took only a second or two to run. Worse,
however, is that with at least some profilers (such as the default "stat"
profiler), this can cause a large slowdown while generating the profiler output.

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

spectral created this revision.Apr 19 2021, 6:32 PM
marmoute accepted this revision.Apr 20 2021, 6:08 AM
pulkit accepted this revision.Apr 28 2021, 6:40 AM
This revision is now accepted and ready to land.Apr 28 2021, 6:40 AM

This breaks the CI https://foss.heptapod.net/octobus/mercurial-devel/-/pipelines/21383.
Could you send a followup please?

Done in D10537, sorry about that, I clearly forgot to run the whole test suite with --chg. Again. :(

I also sent D10538 so that I could have caught the clang-format issue, and fixed my black installation (it was broken by my distro upgrading to py3.9), which triggered D10539.