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

login
register
mail settings
Submitter phabricator
Date April 19, 2021, 10:32 p.m.
Message ID <differential-rev-PHID-DREV-kczubi3c6pgrxgsnfujv-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48786/
State Superseded
Headers show

Comments

phabricator - April 19, 2021, 10:32 p.m.
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




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

Patch

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",