[PATCH 3 of 8 v3] contrib: add a write microbenchmark to perf.py

Bryan O'Sullivan bos at serpentine.com
Sat Feb 11 23:00:53 EST 2017


On Fri, Feb 10, 2017 at 1:06 PM, Simon Farnsworth <simonfar at fb.com> wrote:

> +    def write():
> +        ui.write(('Testing write performance\n'))
>

You'll want to do this in a loop 10,000 times or something instead of just
once, so that the numbers you get actually give you some idea of what's
going on. When you just measure one call, the cost of the call is probably
lower than the resolution of time.time().
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20170211/a021b7ad/attachment.html>


More information about the Mercurial-devel mailing list