contrib/perf.py
changeset 27307 f36dc0062b1a
parent 27306 bafb1235f505
child 27308 7bc52ac46172
--- a/contrib/perf.py	Fri Dec 04 18:08:50 2015 +0000
+++ b/contrib/perf.py	Fri Dec 04 19:05:32 2015 +0000
@@ -12,6 +12,11 @@
 cmdtable = {}
 command = cmdutil.command(cmdtable)
 
+def getlen(ui):
+    if ui.configbool("perf", "stub"):
+        return lambda x: 1
+    return len
+
 def gettimer(ui, opts=None):
     """return a timer function and formatter: (timer, formatter)