contrib/benchmarks/__init__.py
changeset 44452 9d2b2df2c2ba
parent 43076 2372284d9457
child 47437 7a430116f639
equal deleted inserted replaced
44449:ff72bd52d56a 44452:9d2b2df2c2ba
    79     ui.pushbuffer()
    79     ui.pushbuffer()
    80     cmd(ui, repo, *args, **kwargs)
    80     cmd(ui, repo, *args, **kwargs)
    81     output = ui.popbuffer()
    81     output = ui.popbuffer()
    82     match = outputre.search(output)
    82     match = outputre.search(output)
    83     if not match:
    83     if not match:
    84         raise ValueError("Invalid output {0}".format(output))
    84         raise ValueError("Invalid output {}".format(output))
    85     return float(match.group(1))
    85     return float(match.group(1))
    86 
    86 
    87 
    87 
    88 def perfbench(repos=reposnames, name=None, params=None):
    88 def perfbench(repos=reposnames, name=None, params=None):
    89     """decorator to declare ASV benchmark based on contrib/perf.py extension
    89     """decorator to declare ASV benchmark based on contrib/perf.py extension