Patchwork [1,of,2] perfbranchmap: display 'unfiltered' for unfiltered performance

login
register
mail settings
Submitter Boris Feld
Date Feb. 21, 2018, 2:38 p.m.
Message ID <f40e09835c645bbc0b53.1519223891@FB>
Download mbox | patch
Permalink /patch/28188/
State Accepted
Headers show

Comments

Boris Feld - Feb. 21, 2018, 2:38 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@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.

Patch

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()