Patchwork [2,of,5] perf: move gettimer() call

login
register
mail settings
Submitter Gregory Szorc
Date May 6, 2017, 6:21 p.m.
Message ID <2f0c421e15eb86d4d45c.1494094918@ubuntu-vm-main>
Download mbox | patch
Permalink /patch/20487/
State Accepted
Headers show

Comments

Gregory Szorc - May 6, 2017, 6:21 p.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1494093662 25200
#      Sat May 06 11:01:02 2017 -0700
# Node ID 2f0c421e15eb86d4d45ce96d559052c919407afd
# Parent  7db6c2fc82c17780d28faeee73a8d776063fbb64
perf: move gettimer() call

This is more consistent with other perf* functions.

Patch

diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -851,7 +851,6 @@  def perfrevlog(ui, repo, file_=None, sta
 
     The start revision can be defined via ``-s/--startrev``.
     """
-    timer, fm = gettimer(ui, opts)
     _len = getlen(ui)
 
     def d():
@@ -868,6 +867,7 @@  def perfrevlog(ui, repo, file_=None, sta
         for x in xrange(beginrev, endrev, dist):
             r.revision(r.node(x))
 
+    timer, fm = gettimer(ui, opts)
     timer(d)
     fm.end()