Show More
@@ -1,302 +1,302 b'' | |||
|
1 | 1 | #require test-repo |
|
2 | 2 | |
|
3 | 3 | Set vars: |
|
4 | 4 | |
|
5 | 5 | $ . "$TESTDIR/helpers-testrepo.sh" |
|
6 | 6 | $ CONTRIBDIR="$TESTDIR/../contrib" |
|
7 | 7 | |
|
8 | 8 | Prepare repo: |
|
9 | 9 | |
|
10 | 10 | $ hg init |
|
11 | 11 | |
|
12 | 12 | $ echo this is file a > a |
|
13 | 13 | $ hg add a |
|
14 | 14 | $ hg commit -m first |
|
15 | 15 | |
|
16 | 16 | $ echo adding to file a >> a |
|
17 | 17 | $ hg commit -m second |
|
18 | 18 | |
|
19 | 19 | $ echo adding more to file a >> a |
|
20 | 20 | $ hg commit -m third |
|
21 | 21 | |
|
22 | 22 | $ hg up -r 0 |
|
23 | 23 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
24 | 24 | $ echo merge-this >> a |
|
25 | 25 | $ hg commit -m merge-able |
|
26 | 26 | created new head |
|
27 | 27 | |
|
28 | 28 | $ hg up -r 2 |
|
29 | 29 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
30 | 30 | |
|
31 | 31 | perfstatus |
|
32 | 32 | |
|
33 | 33 | $ cat >> $HGRCPATH << EOF |
|
34 | 34 | > [extensions] |
|
35 |
> perf |
|
|
35 | > perf=$CONTRIBDIR/perf.py | |
|
36 | 36 | > [perf] |
|
37 | 37 | > presleep=0 |
|
38 | 38 | > stub=on |
|
39 | 39 | > parentscount=1 |
|
40 | 40 | > EOF |
|
41 |
$ hg help perf |
|
|
42 |
perf |
|
|
41 | $ hg help -e perf | |
|
42 | perf extension - helper extension to measure performance | |
|
43 | 43 | |
|
44 | 44 | list of commands: |
|
45 | 45 | |
|
46 | 46 | perfaddremove |
|
47 | 47 | (no help text available) |
|
48 | 48 | perfancestors |
|
49 | 49 | (no help text available) |
|
50 | 50 | perfancestorset |
|
51 | 51 | (no help text available) |
|
52 | 52 | perfannotate (no help text available) |
|
53 | 53 | perfbdiff benchmark a bdiff between revisions |
|
54 | 54 | perfbookmarks |
|
55 | 55 | benchmark parsing bookmarks from disk to memory |
|
56 | 56 | perfbranchmap |
|
57 | 57 | benchmark the update of a branchmap |
|
58 | 58 | perfbranchmapload |
|
59 | 59 | benchmark reading the branchmap |
|
60 | 60 | perfbranchmapupdate |
|
61 | 61 | benchmark branchmap update from for <base> revs to <target> |
|
62 | 62 | revs |
|
63 | 63 | perfbundleread |
|
64 | 64 | Benchmark reading of bundle files. |
|
65 | 65 | perfcca (no help text available) |
|
66 | 66 | perfchangegroupchangelog |
|
67 | 67 | Benchmark producing a changelog group for a changegroup. |
|
68 | 68 | perfchangeset |
|
69 | 69 | (no help text available) |
|
70 | 70 | perfctxfiles (no help text available) |
|
71 | 71 | perfdiffwd Profile diff of working directory changes |
|
72 | 72 | perfdirfoldmap |
|
73 | 73 | (no help text available) |
|
74 | 74 | perfdirs (no help text available) |
|
75 | 75 | perfdirstate (no help text available) |
|
76 | 76 | perfdirstatedirs |
|
77 | 77 | (no help text available) |
|
78 | 78 | perfdirstatefoldmap |
|
79 | 79 | (no help text available) |
|
80 | 80 | perfdirstatewrite |
|
81 | 81 | (no help text available) |
|
82 | 82 | perfdiscovery |
|
83 | 83 | benchmark discovery between local repo and the peer at given |
|
84 | 84 | path |
|
85 | 85 | perffncacheencode |
|
86 | 86 | (no help text available) |
|
87 | 87 | perffncacheload |
|
88 | 88 | (no help text available) |
|
89 | 89 | perffncachewrite |
|
90 | 90 | (no help text available) |
|
91 | 91 | perfheads benchmark the computation of a changelog heads |
|
92 | 92 | perfhelper-pathcopies |
|
93 | 93 | find statistic about potential parameters for the |
|
94 | 94 | 'perftracecopies' |
|
95 | 95 | perfignore benchmark operation related to computing ignore |
|
96 | 96 | perfindex benchmark index creation time followed by a lookup |
|
97 | 97 | perflinelogedits |
|
98 | 98 | (no help text available) |
|
99 | 99 | perfloadmarkers |
|
100 | 100 | benchmark the time to parse the on-disk markers for a repo |
|
101 | 101 | perflog (no help text available) |
|
102 | 102 | perflookup (no help text available) |
|
103 | 103 | perflrucachedict |
|
104 | 104 | (no help text available) |
|
105 | 105 | perfmanifest benchmark the time to read a manifest from disk and return a |
|
106 | 106 | usable |
|
107 | 107 | perfmergecalculate |
|
108 | 108 | (no help text available) |
|
109 | 109 | perfmoonwalk benchmark walking the changelog backwards |
|
110 | 110 | perfnodelookup |
|
111 | 111 | (no help text available) |
|
112 | 112 | perfnodemap benchmark the time necessary to look up revision from a cold |
|
113 | 113 | nodemap |
|
114 | 114 | perfparents (no help text available) |
|
115 | 115 | perfpathcopies |
|
116 | 116 | benchmark the copy tracing logic |
|
117 | 117 | perfphases benchmark phasesets computation |
|
118 | 118 | perfphasesremote |
|
119 | 119 | benchmark time needed to analyse phases of the remote server |
|
120 | 120 | perfprogress printing of progress bars |
|
121 | 121 | perfrawfiles (no help text available) |
|
122 | 122 | perfrevlogchunks |
|
123 | 123 | Benchmark operations on revlog chunks. |
|
124 | 124 | perfrevlogindex |
|
125 | 125 | Benchmark operations against a revlog index. |
|
126 | 126 | perfrevlogrevision |
|
127 | 127 | Benchmark obtaining a revlog revision. |
|
128 | 128 | perfrevlogrevisions |
|
129 | 129 | Benchmark reading a series of revisions from a revlog. |
|
130 | 130 | perfrevlogwrite |
|
131 | 131 | Benchmark writing a series of revisions to a revlog. |
|
132 | 132 | perfrevrange (no help text available) |
|
133 | 133 | perfrevset benchmark the execution time of a revset |
|
134 | 134 | perfstartup (no help text available) |
|
135 | 135 | perfstatus (no help text available) |
|
136 | 136 | perftags (no help text available) |
|
137 | 137 | perftemplating |
|
138 | 138 | test the rendering time of a given template |
|
139 | 139 | perfunidiff benchmark a unified diff between revisions |
|
140 | 140 | perfvolatilesets |
|
141 | 141 | benchmark the computation of various volatile set |
|
142 | 142 | perfwalk (no help text available) |
|
143 | 143 | perfwrite microbenchmark ui.write |
|
144 | 144 | |
|
145 |
(use 'hg help -v perf |
|
|
145 | (use 'hg help -v perf' to show built-in aliases and global options) | |
|
146 | 146 | $ hg perfaddremove |
|
147 | 147 | $ hg perfancestors |
|
148 | 148 | $ hg perfancestorset 2 |
|
149 | 149 | $ hg perfannotate a |
|
150 | 150 | $ hg perfbdiff -c 1 |
|
151 | 151 | $ hg perfbdiff --alldata 1 |
|
152 | 152 | $ hg perfunidiff -c 1 |
|
153 | 153 | $ hg perfunidiff --alldata 1 |
|
154 | 154 | $ hg perfbookmarks |
|
155 | 155 | $ hg perfbranchmap |
|
156 | 156 | $ hg perfbranchmapload |
|
157 | 157 | $ hg perfbranchmapupdate --base "not tip" --target "tip" |
|
158 | 158 | benchmark of branchmap with 3 revisions with 1 new ones |
|
159 | 159 | $ hg perfcca |
|
160 | 160 | $ hg perfchangegroupchangelog |
|
161 | 161 | $ hg perfchangegroupchangelog --cgversion 01 |
|
162 | 162 | $ hg perfchangeset 2 |
|
163 | 163 | $ hg perfctxfiles 2 |
|
164 | 164 | $ hg perfdiffwd |
|
165 | 165 | $ hg perfdirfoldmap |
|
166 | 166 | $ hg perfdirs |
|
167 | 167 | $ hg perfdirstate |
|
168 | 168 | $ hg perfdirstatedirs |
|
169 | 169 | $ hg perfdirstatefoldmap |
|
170 | 170 | $ hg perfdirstatewrite |
|
171 | 171 | #if repofncache |
|
172 | 172 | $ hg perffncacheencode |
|
173 | 173 | $ hg perffncacheload |
|
174 | 174 | $ hg debugrebuildfncache |
|
175 | 175 | fncache already up to date |
|
176 | 176 | $ hg perffncachewrite |
|
177 | 177 | $ hg debugrebuildfncache |
|
178 | 178 | fncache already up to date |
|
179 | 179 | #endif |
|
180 | 180 | $ hg perfheads |
|
181 | 181 | $ hg perfignore |
|
182 | 182 | $ hg perfindex |
|
183 | 183 | $ hg perflinelogedits -n 1 |
|
184 | 184 | $ hg perfloadmarkers |
|
185 | 185 | $ hg perflog |
|
186 | 186 | $ hg perflookup 2 |
|
187 | 187 | $ hg perflrucache |
|
188 | 188 | $ hg perfmanifest 2 |
|
189 | 189 | $ hg perfmanifest -m 44fe2c8352bb3a478ffd7d8350bbc721920134d1 |
|
190 | 190 | $ hg perfmanifest -m 44fe2c8352bb |
|
191 | 191 | abort: manifest revision must be integer or full node |
|
192 | 192 | [255] |
|
193 | 193 | $ hg perfmergecalculate -r 3 |
|
194 | 194 | $ hg perfmoonwalk |
|
195 | 195 | $ hg perfnodelookup 2 |
|
196 | 196 | $ hg perfpathcopies 1 2 |
|
197 | 197 | $ hg perfprogress --total 1000 |
|
198 | 198 | $ hg perfrawfiles 2 |
|
199 | 199 | $ hg perfrevlogindex -c |
|
200 | 200 | #if reporevlogstore |
|
201 | 201 | $ hg perfrevlogrevisions .hg/store/data/a.i |
|
202 | 202 | #endif |
|
203 | 203 | $ hg perfrevlogrevision -m 0 |
|
204 | 204 | $ hg perfrevlogchunks -c |
|
205 | 205 | $ hg perfrevrange |
|
206 | 206 | $ hg perfrevset 'all()' |
|
207 | 207 | $ hg perfstartup |
|
208 | 208 | $ hg perfstatus |
|
209 | 209 | $ hg perftags |
|
210 | 210 | $ hg perftemplating |
|
211 | 211 | $ hg perfvolatilesets |
|
212 | 212 | $ hg perfwalk |
|
213 | 213 | $ hg perfparents |
|
214 | 214 | $ hg perfdiscovery -q . |
|
215 | 215 | |
|
216 | 216 | test actual output |
|
217 | 217 | ------------------ |
|
218 | 218 | |
|
219 | 219 | normal output: |
|
220 | 220 | |
|
221 | 221 | $ hg perfheads --config perf.stub=no |
|
222 | 222 | ! wall * comb * user * sys * (best of *) (glob) |
|
223 | 223 | |
|
224 | 224 | detailed output: |
|
225 | 225 | |
|
226 | 226 | $ hg perfheads --config perf.all-timing=yes --config perf.stub=no |
|
227 | 227 | ! wall * comb * user * sys * (best of *) (glob) |
|
228 | 228 | ! wall * comb * user * sys * (max of *) (glob) |
|
229 | 229 | ! wall * comb * user * sys * (avg of *) (glob) |
|
230 | 230 | ! wall * comb * user * sys * (median of *) (glob) |
|
231 | 231 | |
|
232 | 232 | test json output |
|
233 | 233 | ---------------- |
|
234 | 234 | |
|
235 | 235 | normal output: |
|
236 | 236 | |
|
237 | 237 | $ hg perfheads --template json --config perf.stub=no |
|
238 | 238 | [ |
|
239 | 239 | { |
|
240 | 240 | "comb": *, (glob) |
|
241 | 241 | "count": *, (glob) |
|
242 | 242 | "sys": *, (glob) |
|
243 | 243 | "user": *, (glob) |
|
244 | 244 | "wall": * (glob) |
|
245 | 245 | } |
|
246 | 246 | ] |
|
247 | 247 | |
|
248 | 248 | detailed output: |
|
249 | 249 | |
|
250 | 250 | $ hg perfheads --template json --config perf.all-timing=yes --config perf.stub=no |
|
251 | 251 | [ |
|
252 | 252 | { |
|
253 | 253 | "avg.comb": *, (glob) |
|
254 | 254 | "avg.count": *, (glob) |
|
255 | 255 | "avg.sys": *, (glob) |
|
256 | 256 | "avg.user": *, (glob) |
|
257 | 257 | "avg.wall": *, (glob) |
|
258 | 258 | "comb": *, (glob) |
|
259 | 259 | "count": *, (glob) |
|
260 | 260 | "max.comb": *, (glob) |
|
261 | 261 | "max.count": *, (glob) |
|
262 | 262 | "max.sys": *, (glob) |
|
263 | 263 | "max.user": *, (glob) |
|
264 | 264 | "max.wall": *, (glob) |
|
265 | 265 | "median.comb": *, (glob) |
|
266 | 266 | "median.count": *, (glob) |
|
267 | 267 | "median.sys": *, (glob) |
|
268 | 268 | "median.user": *, (glob) |
|
269 | 269 | "median.wall": *, (glob) |
|
270 | 270 | "sys": *, (glob) |
|
271 | 271 | "user": *, (glob) |
|
272 | 272 | "wall": * (glob) |
|
273 | 273 | } |
|
274 | 274 | ] |
|
275 | 275 | |
|
276 | 276 | Check perf.py for historical portability |
|
277 | 277 | ---------------------------------------- |
|
278 | 278 | |
|
279 | 279 | $ cd "$TESTDIR/.." |
|
280 | 280 | |
|
281 | 281 | $ (testrepohg files -r 1.2 glob:mercurial/*.c glob:mercurial/*.py; |
|
282 | 282 | > testrepohg files -r tip glob:mercurial/*.c glob:mercurial/*.py) | |
|
283 | 283 | > "$TESTDIR"/check-perf-code.py contrib/perf.py |
|
284 | 284 | contrib/perf.py:\d+: (re) |
|
285 | 285 | > from mercurial import ( |
|
286 | 286 | import newer module separately in try clause for early Mercurial |
|
287 | 287 | contrib/perf.py:\d+: (re) |
|
288 | 288 | > from mercurial import ( |
|
289 | 289 | import newer module separately in try clause for early Mercurial |
|
290 | 290 | contrib/perf.py:\d+: (re) |
|
291 | 291 | > origindexpath = orig.opener.join(orig.indexfile) |
|
292 | 292 | use getvfs()/getsvfs() for early Mercurial |
|
293 | 293 | contrib/perf.py:\d+: (re) |
|
294 | 294 | > origdatapath = orig.opener.join(orig.datafile) |
|
295 | 295 | use getvfs()/getsvfs() for early Mercurial |
|
296 | 296 | contrib/perf.py:\d+: (re) |
|
297 | 297 | > vfs = vfsmod.vfs(tmpdir) |
|
298 | 298 | use getvfs()/getsvfs() for early Mercurial |
|
299 | 299 | contrib/perf.py:\d+: (re) |
|
300 | 300 | > vfs.options = getattr(orig.opener, 'options', None) |
|
301 | 301 | use getvfs()/getsvfs() for early Mercurial |
|
302 | 302 | [1] |
General Comments 0
You need to be logged in to leave comments.
Login now