contrib/perf.py
changeset 14322 a90131b85fd8
parent 13277 9f707b297b0f
child 14494 1ffeeb91c55d
--- a/contrib/perf.py	Fri May 13 14:48:48 2011 -0500
+++ b/contrib/perf.py	Fri May 13 14:58:24 2011 -0500
@@ -1,7 +1,7 @@
 # perf.py - performance test routines
 '''helper extension to measure performance'''
 
-from mercurial import cmdutil, match, commands
+from mercurial import cmdutil, scmutil, match, commands
 import time, os, sys
 
 def timer(func, title=None):
@@ -31,11 +31,11 @@
 
 def perfwalk(ui, repo, *pats):
     try:
-        m = cmdutil.match(repo, pats, {})
+        m = scmutil.match(repo, pats, {})
         timer(lambda: len(list(repo.dirstate.walk(m, [], True, False))))
     except:
         try:
-            m = cmdutil.match(repo, pats, {})
+            m = scmutil.match(repo, pats, {})
             timer(lambda: len([b for a, b, c in repo.dirstate.statwalk([], m)]))
         except:
             timer(lambda: len(list(cmdutil.walk(repo, pats, {}))))