Show More
@@ -370,15 +370,8 b' def clearfilecache(repo, attrname):' | |||||
370 | @command('perfwalk', formatteropts) |
|
370 | @command('perfwalk', formatteropts) | |
371 | def perfwalk(ui, repo, *pats, **opts): |
|
371 | def perfwalk(ui, repo, *pats, **opts): | |
372 | timer, fm = gettimer(ui, opts) |
|
372 | timer, fm = gettimer(ui, opts) | |
373 | try: |
|
373 | m = scmutil.match(repo[None], pats, {}) | |
374 | m = scmutil.match(repo[None], pats, {}) |
|
374 | timer(lambda: len(list(repo.dirstate.walk(m, [], True, False)))) | |
375 | timer(lambda: len(list(repo.dirstate.walk(m, [], True, False)))) |
|
|||
376 | except Exception: |
|
|||
377 | try: |
|
|||
378 | m = scmutil.match(repo[None], pats, {}) |
|
|||
379 | timer(lambda: len([b for a, b, c in repo.dirstate.statwalk([], m)])) |
|
|||
380 | except Exception: |
|
|||
381 | timer(lambda: len(list(cmdutil.walk(repo, pats, {})))) |
|
|||
382 | fm.end() |
|
375 | fm.end() | |
383 |
|
376 | |||
384 | @command('perfannotate', formatteropts) |
|
377 | @command('perfannotate', formatteropts) |
General Comments 0
You need to be logged in to leave comments.
Login now