Mercurial > hg
comparison contrib/perf.py @ 41434:48394923fbdc
perf: document perfheads
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Fri, 25 Jan 2019 14:52:31 -0500 |
parents | 876494fd967d |
children | ab6d1f82be32 |
comparison
equal
deleted
inserted
replaced
41433:3757a968d63a | 41434:48394923fbdc |
---|---|
533 cl._nodecache = {nullid: nullrev} | 533 cl._nodecache = {nullid: nullrev} |
534 cl._nodepos = None | 534 cl._nodepos = None |
535 | 535 |
536 @command(b'perfheads', formatteropts) | 536 @command(b'perfheads', formatteropts) |
537 def perfheads(ui, repo, **opts): | 537 def perfheads(ui, repo, **opts): |
538 """benchmark the computation of a changelog heads""" | |
538 opts = _byteskwargs(opts) | 539 opts = _byteskwargs(opts) |
539 timer, fm = gettimer(ui, opts) | 540 timer, fm = gettimer(ui, opts) |
540 cl = repo.changelog | 541 cl = repo.changelog |
541 def d(): | 542 def d(): |
542 len(cl.headrevs()) | 543 len(cl.headrevs()) |