contrib/perf.py
changeset 34494 bbb5687e5140
parent 34343 255c761a52db
child 34676 bfddc3d678ae
--- a/contrib/perf.py	Fri Jun 30 03:32:25 2017 +0200
+++ b/contrib/perf.py	Fri Jun 30 03:43:46 2017 +0200
@@ -139,6 +139,16 @@
             return func
         return decorator
 
+try:
+    import registrar
+    configtable = {}
+    configitem = registrar.configitem(configtable)
+    configitem('perf', 'stub',
+        default=False,
+    )
+except (ImportError, AttributeError):
+    pass
+
 def getlen(ui):
     if ui.configbool("perf", "stub"):
         return lambda x: 1