Show More
@@ -909,7 +909,8 b' def perfmoonwalk(ui, repo, **opts):' | |||
|
909 | 909 | @command('perftemplating', |
|
910 | 910 | [('r', 'rev', [], 'revisions to run the template on'), |
|
911 | 911 | ] + formatteropts) |
|
912 | def perftemplating(ui, repo, **opts): | |
|
912 | def perftemplating(ui, repo, testedtemplate=None, **opts): | |
|
913 | """test the rendering time of a given template""" | |
|
913 | 914 | if makelogtemplater is None: |
|
914 | 915 | ui.write_err('incompatible Mercurial version') |
|
915 | 916 | return 1 |
@@ -922,9 +923,11 b' def perftemplating(ui, repo, **opts):' | |||
|
922 | 923 | revs = ['all()'] |
|
923 | 924 | revs = list(scmutil.revrange(repo, revs)) |
|
924 | 925 | |
|
925 | template = ('{date|shortdate} [{rev}:{node|short}]' | |
|
926 | ' {author|person}: {desc|firstline}\n') | |
|
927 | displayer = makelogtemplater(nullui, repo, template) | |
|
926 | defaulttemplate = ('{date|shortdate} [{rev}:{node|short}]' | |
|
927 | ' {author|person}: {desc|firstline}\n') | |
|
928 | if testedtemplate is None: | |
|
929 | testedtemplate = defaulttemplate | |
|
930 | displayer = makelogtemplater(nullui, repo, testedtemplate) | |
|
928 | 931 | def format(): |
|
929 | 932 | for r in revs: |
|
930 | 933 | ctx = repo[r] |
@@ -113,7 +113,7 b' perfstatus' | |||
|
113 | 113 | perfstatus (no help text available) |
|
114 | 114 | perftags (no help text available) |
|
115 | 115 | perftemplating |
|
116 | (no help text available) | |
|
116 | test the rendering time of a given template | |
|
117 | 117 | perfunidiff benchmark a unified diff between revisions |
|
118 | 118 | perfvolatilesets |
|
119 | 119 | benchmark the computation of various volatile set |
General Comments 0
You need to be logged in to leave comments.
Login now