--- a/contrib/perf.py Wed Feb 15 13:17:45 2017 -0800
+++ b/contrib/perf.py Wed Feb 15 13:07:26 2017 -0800
@@ -1269,6 +1269,17 @@
timer(fn, title=title)
fm.end()
+@command('perfwrite', formatteropts)
+def perfwrite(ui, repo, **opts):
+ """microbenchmark ui.write
+ """
+ timer, fm = gettimer(ui, opts)
+ def write():
+ for i in range(100000):
+ ui.write(('Testing write performance\n'))
+ timer(write)
+ fm.end()
+
def uisetup(ui):
if (util.safehasattr(cmdutil, 'openrevlog') and
not util.safehasattr(commands, 'debugrevlogopts')):