contrib/perf.py
changeset 27307 f36dc0062b1a
parent 27306 bafb1235f505
child 27308 7bc52ac46172
equal deleted inserted replaced
27306:bafb1235f505 27307:f36dc0062b1a
     9 
     9 
    10 formatteropts = commands.formatteropts
    10 formatteropts = commands.formatteropts
    11 
    11 
    12 cmdtable = {}
    12 cmdtable = {}
    13 command = cmdutil.command(cmdtable)
    13 command = cmdutil.command(cmdtable)
       
    14 
       
    15 def getlen(ui):
       
    16     if ui.configbool("perf", "stub"):
       
    17         return lambda x: 1
       
    18     return len
    14 
    19 
    15 def gettimer(ui, opts=None):
    20 def gettimer(ui, opts=None):
    16     """return a timer function and formatter: (timer, formatter)
    21     """return a timer function and formatter: (timer, formatter)
    17 
    22 
    18     This function exists to gather the creation of formatter in a single
    23     This function exists to gather the creation of formatter in a single