38 m = scmutil.match(repo[None], pats, {}) |
38 m = scmutil.match(repo[None], pats, {}) |
39 timer(lambda: len([b for a, b, c in repo.dirstate.statwalk([], m)])) |
39 timer(lambda: len([b for a, b, c in repo.dirstate.statwalk([], m)])) |
40 except Exception: |
40 except Exception: |
41 timer(lambda: len(list(cmdutil.walk(repo, pats, {})))) |
41 timer(lambda: len(list(cmdutil.walk(repo, pats, {})))) |
42 |
42 |
43 def perfstatus(ui, repo, *pats): |
43 def perfstatus(ui, repo, **opts): |
44 #m = match.always(repo.root, repo.getcwd()) |
44 #m = match.always(repo.root, repo.getcwd()) |
45 #timer(lambda: sum(map(len, repo.dirstate.status(m, [], False, False, |
45 #timer(lambda: sum(map(len, repo.dirstate.status(m, [], False, False, |
46 # False)))) |
46 # False)))) |
47 timer(lambda: sum(map(len, repo.status()))) |
47 timer(lambda: sum(map(len, repo.status(**opts)))) |
48 |
48 |
49 def clearcaches(cl): |
49 def clearcaches(cl): |
50 # behave somewhat consistently across internal API changes |
50 # behave somewhat consistently across internal API changes |
51 if util.safehasattr(cl, 'clearcaches'): |
51 if util.safehasattr(cl, 'clearcaches'): |
52 cl.clearcaches() |
52 cl.clearcaches() |
236 'perflookup': (perflookup, []), |
236 'perflookup': (perflookup, []), |
237 'perfrevrange': (perfrevrange, []), |
237 'perfrevrange': (perfrevrange, []), |
238 'perfnodelookup': (perfnodelookup, []), |
238 'perfnodelookup': (perfnodelookup, []), |
239 'perfparents': (perfparents, []), |
239 'perfparents': (perfparents, []), |
240 'perfstartup': (perfstartup, []), |
240 'perfstartup': (perfstartup, []), |
241 'perfstatus': (perfstatus, []), |
241 'perfstatus': (perfstatus, |
|
242 [('u', 'unknown', False, |
|
243 'ask status to look for unknown files')]), |
242 'perfwalk': (perfwalk, []), |
244 'perfwalk': (perfwalk, []), |
243 'perfmanifest': (perfmanifest, []), |
245 'perfmanifest': (perfmanifest, []), |
244 'perfchangeset': (perfchangeset, []), |
246 'perfchangeset': (perfchangeset, []), |
245 'perfindex': (perfindex, []), |
247 'perfindex': (perfindex, []), |
246 'perfheads': (perfheads, []), |
248 'perfheads': (perfheads, []), |