99 timer(d) |
99 timer(d) |
100 |
100 |
101 def perflookup(ui, repo, rev): |
101 def perflookup(ui, repo, rev): |
102 timer(lambda: len(repo.lookup(rev))) |
102 timer(lambda: len(repo.lookup(rev))) |
103 |
103 |
|
104 def perflog(ui, repo): |
|
105 ui.pushbuffer() |
|
106 timer(lambda: commands.log(ui, repo, rev=[], date='', user='')) |
|
107 ui.popbuffer() |
|
108 |
|
109 def perftemplating(ui, repo): |
|
110 ui.pushbuffer() |
|
111 timer(lambda: commands.log(ui, repo, rev=[], date='', user='', |
|
112 template='{date|shortdate} [{rev}:{node|short}]' |
|
113 ' {author|person}: {desc|firstline}\n')) |
|
114 ui.popbuffer() |
|
115 |
104 cmdtable = { |
116 cmdtable = { |
105 'perflookup': (perflookup, []), |
117 'perflookup': (perflookup, []), |
106 'perfparents': (perfparents, []), |
118 'perfparents': (perfparents, []), |
107 'perfstartup': (perfstartup, []), |
119 'perfstartup': (perfstartup, []), |
108 'perfstatus': (perfstatus, []), |
120 'perfstatus': (perfstatus, []), |
111 'perfindex': (perfindex, []), |
123 'perfindex': (perfindex, []), |
112 'perfheads': (perfheads, []), |
124 'perfheads': (perfheads, []), |
113 'perftags': (perftags, []), |
125 'perftags': (perftags, []), |
114 'perfdirstate': (perfdirstate, []), |
126 'perfdirstate': (perfdirstate, []), |
115 'perfdirstatedirs': (perfdirstate, []), |
127 'perfdirstatedirs': (perfdirstate, []), |
|
128 'perflog': (perflog, []), |
|
129 'perftemplating': (perftemplating, []), |
116 } |
130 } |
117 |
131 |