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

spectral (Kyle Lippincott) phabricator at mercurial-scm.org
Mon Apr 19 22:32:45 UTC 2021


spectral created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION 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.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  contrib/chg/chg.c
  tests/test-chg.t

CHANGE DETAILS

diff --git a/tests/test-chg.t b/tests/test-chg.t
--- a/tests/test-chg.t
+++ b/tests/test-chg.t
@@ -529,7 +529,7 @@
   > EOF
   Run 1: * samples (glob)
   Run 4: * samples (glob)
-  Run 4 > 3 * Run 1: True
+  Run 4 > 3 * Run 1: False
 (Disabling with --no-profile on the commandline still works, but isn't permanent)
   $ newchg log -r . --no-profile
   $ filteredchg log -r .
diff --git a/contrib/chg/chg.c b/contrib/chg/chg.c
--- a/contrib/chg/chg.c
+++ b/contrib/chg/chg.c
@@ -242,6 +242,7 @@
 	const char *baseargv[] = {
 	    hgcmd,
 	    "serve",
+	    "--no-profile",
 	    "--cmdserver",
 	    "chgunix",
 	    "--address",



To: spectral, #hg-reviewers
Cc: mercurial-patches, mercurial-devel


More information about the Mercurial-devel mailing list