[PATCH 1 of 2] perfbranchmap: display 'unfiltered' for unfiltered performance
Boris Feld
boris.feld at octobus.net
Wed Feb 21 14:38:11 UTC 2018
# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1519211596 -3600
# Wed Feb 21 12:13:16 2018 +0100
# Node ID f40e09835c645bbc0b535228ac743d84e952f866
# Parent 428de1a59f2df3d6d07ff1d7164c8ee56cbb7825
# EXP-Topic filter-perfbranchmap
# Available At https://bitbucket.org/octobus/mercurial-devel/
# hg pull https://bitbucket.org/octobus/mercurial-devel/ -r f40e09835c64
perfbranchmap: display 'unfiltered' for unfiltered performance
This is slightly clearer than "None" and will help with coming changes to select
the filter level we want timing for.
diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -1616,7 +1616,10 @@ def perfbranchmap(ui, repo, full=False,
branchcachewrite.set(lambda bc, repo: None)
try:
for name in allfilters:
- timer(getbranchmap(name), title=str(name))
+ printname = name
+ if name is None:
+ printname = 'unfiltered'
+ timer(getbranchmap(name), title=str(printname))
finally:
branchcacheread.restore()
branchcachewrite.restore()
More information about the Mercurial-devel
mailing list