comparison contrib/perf.py @ 32225:c68c400d0a2d

perf: move gettimer() call This is more consistent with other perf* functions.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 06 May 2017 11:01:02 -0700
parents 6b582f9b6e5e
children 112ba1c7d65d
comparison
equal deleted inserted replaced
32224:6b582f9b6e5e 32225:c68c400d0a2d
848 By default, we read every ``-d/--dist`` revision from 0 to tip of 848 By default, we read every ``-d/--dist`` revision from 0 to tip of
849 the specified revlog. 849 the specified revlog.
850 850
851 The start revision can be defined via ``-s/--startrev``. 851 The start revision can be defined via ``-s/--startrev``.
852 """ 852 """
853 timer, fm = gettimer(ui, opts)
854 _len = getlen(ui) 853 _len = getlen(ui)
855 854
856 def d(): 855 def d():
857 r = cmdutil.openrevlog(repo, 'perfrevlog', file_, opts) 856 r = cmdutil.openrevlog(repo, 'perfrevlog', file_, opts)
858 857
865 dist = -1 * dist 864 dist = -1 * dist
866 865
867 for x in xrange(beginrev, endrev, dist): 866 for x in xrange(beginrev, endrev, dist):
868 r.revision(r.node(x)) 867 r.revision(r.node(x))
869 868
869 timer, fm = gettimer(ui, opts)
870 timer(d) 870 timer(d)
871 fm.end() 871 fm.end()
872 872
873 @command('perfrevlogchunks', revlogopts + formatteropts + 873 @command('perfrevlogchunks', revlogopts + formatteropts +
874 [('e', 'engines', '', 'compression engines to use'), 874 [('e', 'engines', '', 'compression engines to use'),