Show More
@@ -1,483 +1,483 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 | 35 | > perf=$CONTRIBDIR/perf.py |
|
36 | 36 | > [perf] |
|
37 | 37 | > presleep=0 |
|
38 | 38 | > stub=on |
|
39 | 39 | > parentscount=1 |
|
40 | 40 | > EOF |
|
41 | 41 | $ hg help -e perf |
|
42 | 42 | perf extension - helper extension to measure performance |
|
43 | 43 | |
|
44 | 44 | Configurations |
|
45 | 45 | ============== |
|
46 | 46 | |
|
47 | 47 | "perf" |
|
48 | 48 | ------ |
|
49 | 49 | |
|
50 | 50 | "all-timing" |
|
51 | 51 | When set, additional statistics will be reported for each benchmark: best, |
|
52 | 52 | worst, median average. If not set only the best timing is reported |
|
53 | 53 | (default: off). |
|
54 | 54 | |
|
55 | 55 | "presleep" |
|
56 | 56 | number of second to wait before any group of runs (default: 1) |
|
57 | 57 | |
|
58 | 58 | "pre-run" |
|
59 | 59 | number of run to perform before starting measurement. |
|
60 | 60 | |
|
61 | 61 | "profile-benchmark" |
|
62 | 62 | Enable profiling for the benchmarked section. (The first iteration is |
|
63 | 63 | benchmarked) |
|
64 | 64 | |
|
65 | 65 | "run-limits" |
|
66 | 66 | Control the number of runs each benchmark will perform. The option value |
|
67 | 67 | should be a list of '<time>-<numberofrun>' pairs. After each run the |
|
68 | 68 | conditions are considered in order with the following logic: |
|
69 | 69 | |
|
70 | 70 | If benchmark has been running for <time> seconds, and we have performed |
|
71 | 71 | <numberofrun> iterations, stop the benchmark, |
|
72 | 72 | |
|
73 | 73 | The default value is: '3.0-100, 10.0-3' |
|
74 | 74 | |
|
75 | 75 | "stub" |
|
76 | 76 | When set, benchmarks will only be run once, useful for testing (default: |
|
77 | 77 | off) |
|
78 | 78 | |
|
79 | 79 | list of commands: |
|
80 | 80 | |
|
81 | 81 | perf::addremove |
|
82 | 82 | (no help text available) |
|
83 | 83 | perf::ancestors |
|
84 | 84 | (no help text available) |
|
85 | 85 | perf::ancestorset |
|
86 | 86 | (no help text available) |
|
87 | 87 | perf::annotate |
|
88 | 88 | (no help text available) |
|
89 | 89 | perf::bdiff benchmark a bdiff between revisions |
|
90 | 90 | perf::bookmarks |
|
91 | 91 | benchmark parsing bookmarks from disk to memory |
|
92 | 92 | perf::branchmap |
|
93 | 93 | benchmark the update of a branchmap |
|
94 | 94 | perf::branchmapload |
|
95 | 95 | benchmark reading the branchmap |
|
96 | 96 | perf::branchmapupdate |
|
97 | 97 | benchmark branchmap update from for <base> revs to <target> |
|
98 | 98 | revs |
|
99 | 99 | perf::bundle benchmark the creation of a bundle from a repository |
|
100 | 100 | perf::bundleread |
|
101 | 101 | Benchmark reading of bundle files. |
|
102 | 102 | perf::cca (no help text available) |
|
103 | 103 | perf::changegroupchangelog |
|
104 | 104 | Benchmark producing a changelog group for a changegroup. |
|
105 | 105 | perf::changeset |
|
106 | 106 | (no help text available) |
|
107 | 107 | perf::ctxfiles |
|
108 | 108 | (no help text available) |
|
109 | 109 | perf::delta-find |
|
110 | 110 | benchmark the process of finding a valid delta for a revlog |
|
111 | 111 | revision |
|
112 | 112 | perf::diffwd Profile diff of working directory changes |
|
113 | 113 | perf::dirfoldmap |
|
114 | 114 | benchmap a 'dirstate._map.dirfoldmap.get()' request |
|
115 | 115 | perf::dirs (no help text available) |
|
116 | 116 | perf::dirstate |
|
117 | 117 | benchmap the time of various distate operations |
|
118 | 118 | perf::dirstatedirs |
|
119 | 119 | benchmap a 'dirstate.hasdir' call from an empty 'dirs' cache |
|
120 | 120 | perf::dirstatefoldmap |
|
121 | 121 | benchmap a 'dirstate._map.filefoldmap.get()' request |
|
122 | 122 | perf::dirstatewrite |
|
123 | 123 | benchmap the time it take to write a dirstate on disk |
|
124 | 124 | perf::discovery |
|
125 | 125 | benchmark discovery between local repo and the peer at given |
|
126 | 126 | path |
|
127 | 127 | perf::fncacheencode |
|
128 | 128 | (no help text available) |
|
129 | 129 | perf::fncacheload |
|
130 | 130 | (no help text available) |
|
131 | 131 | perf::fncachewrite |
|
132 | 132 | (no help text available) |
|
133 | 133 | perf::heads benchmark the computation of a changelog heads |
|
134 | 134 | perf::helper-mergecopies |
|
135 | 135 | find statistics about potential parameters for |
|
136 | 136 | 'perfmergecopies' |
|
137 | 137 | perf::helper-pathcopies |
|
138 | 138 | find statistic about potential parameters for the |
|
139 | 139 | 'perftracecopies' |
|
140 | 140 | perf::ignore benchmark operation related to computing ignore |
|
141 | 141 | perf::index benchmark index creation time followed by a lookup |
|
142 | 142 | perf::linelogedits |
|
143 | 143 | (no help text available) |
|
144 | 144 | perf::loadmarkers |
|
145 | 145 | benchmark the time to parse the on-disk markers for a repo |
|
146 | 146 | perf::log (no help text available) |
|
147 | 147 | perf::lookup (no help text available) |
|
148 | 148 | perf::lrucachedict |
|
149 | 149 | (no help text available) |
|
150 | 150 | perf::manifest |
|
151 | 151 | benchmark the time to read a manifest from disk and return a |
|
152 | 152 | usable |
|
153 | 153 | perf::mergecalculate |
|
154 | 154 | (no help text available) |
|
155 | 155 | perf::mergecopies |
|
156 | 156 | measure runtime of 'copies.mergecopies' |
|
157 | 157 | perf::moonwalk |
|
158 | 158 | benchmark walking the changelog backwards |
|
159 | 159 | perf::nodelookup |
|
160 | 160 | (no help text available) |
|
161 | 161 | perf::nodemap |
|
162 | 162 | benchmark the time necessary to look up revision from a cold |
|
163 | 163 | nodemap |
|
164 | 164 | perf::parents |
|
165 | 165 | benchmark the time necessary to fetch one changeset's parents. |
|
166 | 166 | perf::pathcopies |
|
167 | 167 | benchmark the copy tracing logic |
|
168 | 168 | perf::phases benchmark phasesets computation |
|
169 | 169 | perf::phasesremote |
|
170 | 170 | benchmark time needed to analyse phases of the remote server |
|
171 | 171 | perf::progress |
|
172 | 172 | printing of progress bars |
|
173 | 173 | perf::rawfiles |
|
174 | 174 | (no help text available) |
|
175 | 175 | perf::revlogchunks |
|
176 | 176 | Benchmark operations on revlog chunks. |
|
177 | 177 | perf::revlogindex |
|
178 | 178 | Benchmark operations against a revlog index. |
|
179 | 179 | perf::revlogrevision |
|
180 | 180 | Benchmark obtaining a revlog revision. |
|
181 | 181 | perf::revlogrevisions |
|
182 | 182 | Benchmark reading a series of revisions from a revlog. |
|
183 | 183 | perf::revlogwrite |
|
184 | 184 | Benchmark writing a series of revisions to a revlog. |
|
185 | 185 | perf::revrange |
|
186 | 186 | (no help text available) |
|
187 | 187 | perf::revset benchmark the execution time of a revset |
|
188 | 188 | perf::startup |
|
189 | 189 | (no help text available) |
|
190 | 190 | perf::status benchmark the performance of a single status call |
|
191 | 191 | perf::stream-consume |
|
192 | 192 | benchmark the full application of a stream clone |
|
193 | 193 | perf::stream-generate |
|
194 | 194 | benchmark the full generation of a stream clone |
|
195 | 195 | perf::stream-locked-section |
|
196 | 196 | benchmark the initial, repo-locked, section of a stream-clone |
|
197 | 197 | perf::tags Benchmark tags retrieval in various situation |
|
198 | 198 | perf::templating |
|
199 | 199 | test the rendering time of a given template |
|
200 | 200 | perf::unbundle |
|
201 | 201 | benchmark application of a bundle in a repository. |
|
202 | 202 | perf::unidiff |
|
203 | 203 | benchmark a unified diff between revisions |
|
204 | 204 | perf::volatilesets |
|
205 | 205 | benchmark the computation of various volatile set |
|
206 | 206 | perf::walk (no help text available) |
|
207 | 207 | perf::write microbenchmark ui.write (and others) |
|
208 | 208 | |
|
209 | 209 | (use 'hg help -v perf' to show built-in aliases and global options) |
|
210 | 210 | |
|
211 | 211 | $ hg help perfaddremove |
|
212 | 212 | hg perf::addremove |
|
213 | 213 | |
|
214 | 214 | aliases: perfaddremove |
|
215 | 215 | |
|
216 | 216 | (no help text available) |
|
217 | 217 | |
|
218 | 218 | options: |
|
219 | 219 | |
|
220 | 220 | -T --template TEMPLATE display with template |
|
221 | 221 | |
|
222 | 222 | (some details hidden, use --verbose to show complete help) |
|
223 | 223 | |
|
224 | 224 | $ hg perfaddremove |
|
225 | 225 | $ hg perfancestors |
|
226 | 226 | $ hg perfancestorset 2 |
|
227 | 227 | $ hg perfannotate a |
|
228 | 228 | $ hg perfbdiff -c 1 |
|
229 | 229 | $ hg perfbdiff --alldata 1 |
|
230 | 230 | $ hg perfunidiff -c 1 |
|
231 | 231 | $ hg perfunidiff --alldata 1 |
|
232 | 232 | $ hg perfbookmarks |
|
233 | 233 | $ hg perfbranchmap |
|
234 | 234 | $ hg perfbranchmapload |
|
235 | 235 | $ hg perfbranchmapupdate --base "not tip" --target "tip" |
|
236 | 236 | benchmark of branchmap with 3 revisions with 1 new ones |
|
237 | 237 | $ hg perfcca |
|
238 | 238 | $ hg perfchangegroupchangelog |
|
239 | 239 | $ hg perfchangegroupchangelog --cgversion 01 |
|
240 | 240 | $ hg perfchangeset 2 |
|
241 | 241 | $ hg perfctxfiles 2 |
|
242 | 242 | $ hg perfdiffwd |
|
243 | 243 | $ hg perfdirfoldmap |
|
244 | 244 | $ hg perfdirs |
|
245 | 245 | $ hg perfdirstate |
|
246 | 246 | $ hg perfdirstate --contains |
|
247 | 247 | $ hg perfdirstate --iteration |
|
248 | 248 | $ hg perfdirstatedirs |
|
249 | 249 | $ hg perfdirstatefoldmap |
|
250 | 250 | $ hg perfdirstatewrite |
|
251 | 251 | #if repofncache |
|
252 | 252 | $ hg perffncacheencode |
|
253 | 253 | $ hg perffncacheload |
|
254 | 254 | $ hg debugrebuildfncache |
|
255 | 255 | fncache already up to date |
|
256 | 256 | $ hg perffncachewrite |
|
257 | 257 | $ hg debugrebuildfncache |
|
258 | 258 | fncache already up to date |
|
259 | 259 | #endif |
|
260 | 260 | $ hg perfheads |
|
261 | 261 | $ hg perfignore |
|
262 | 262 | $ hg perfindex |
|
263 | 263 | $ hg perflinelogedits -n 1 |
|
264 | 264 | $ hg perfloadmarkers |
|
265 | 265 | $ hg perflog |
|
266 | 266 | $ hg perflookup 2 |
|
267 | 267 | $ hg perflrucache |
|
268 | 268 | $ hg perfmanifest 2 |
|
269 | 269 | $ hg perfmanifest -m 44fe2c8352bb3a478ffd7d8350bbc721920134d1 |
|
270 | 270 | $ hg perfmanifest -m 44fe2c8352bb |
|
271 | 271 | abort: manifest revision must be integer or full node |
|
272 | 272 | [255] |
|
273 | 273 | $ hg perfmergecalculate -r 3 |
|
274 | 274 | $ hg perfmoonwalk |
|
275 | 275 | $ hg perfnodelookup 2 |
|
276 | 276 | $ hg perfpathcopies 1 2 |
|
277 | 277 | $ hg perfprogress --total 1000 |
|
278 | 278 | $ hg perfrawfiles 2 |
|
279 | 279 | $ hg perfrevlogindex -c |
|
280 | 280 | #if reporevlogstore |
|
281 | 281 | $ hg perfrevlogrevisions .hg/store/data/a.i |
|
282 | 282 | #endif |
|
283 | 283 | $ hg perfrevlogrevision -m 0 |
|
284 | 284 | $ hg perfrevlogchunks -c |
|
285 | 285 | $ hg perfrevrange |
|
286 | 286 | $ hg perfrevset 'all()' |
|
287 | 287 | $ hg perfstartup |
|
288 | 288 | $ hg perfstatus |
|
289 | 289 | $ hg perfstatus --dirstate |
|
290 | 290 | $ hg perftags |
|
291 | 291 | $ hg perftemplating |
|
292 | 292 | $ hg perfvolatilesets |
|
293 | 293 | $ hg perfwalk |
|
294 | 294 | $ hg perfparents |
|
295 | 295 | $ hg perfdiscovery -q . |
|
296 | 296 | |
|
297 | 297 | Test run control |
|
298 | 298 | ---------------- |
|
299 | 299 | |
|
300 | 300 | Simple single entry |
|
301 | 301 | |
|
302 | 302 | $ hg perfparents --config perf.stub=no --config perf.run-limits='0.000000001-15' |
|
303 | 303 | ! wall * comb * user * sys * (best of 15) (glob) |
|
304 | 304 | ! wall * comb * user * sys * (max of 15) (glob) |
|
305 | 305 | ! wall * comb * user * sys * (avg of 15) (glob) |
|
306 | 306 | ! wall * comb * user * sys * (median of 15) (glob) |
|
307 | 307 | |
|
308 | 308 | Multiple entries |
|
309 | 309 | |
|
310 | 310 | $ hg perfparents --config perf.stub=no --config perf.run-limits='500000-1, 0.000000001-50' |
|
311 | 311 | ! wall * comb * user * sys * (best of 50) (glob) |
|
312 |
! wall * comb * user * sys |
|
|
313 |
! wall * comb * user * sys |
|
|
314 |
! wall * comb * user * sys |
|
|
312 | ! wall * comb * user * sys * (max of 50) (glob) | |
|
313 | ! wall * comb * user * sys * (avg of 50) (glob) | |
|
314 | ! wall * comb * user * sys * (median of 50) (glob) | |
|
315 | 315 | |
|
316 | 316 | error case are ignored |
|
317 | 317 | |
|
318 | 318 | $ hg perfparents --config perf.stub=no --config perf.run-limits='500, 0.000000001-50' |
|
319 | 319 | malformatted run limit entry, missing "-": 500 |
|
320 | 320 | ! wall * comb * user * sys * (best of 50) (glob) |
|
321 | 321 | ! wall * comb * user * sys * (max of 50) (glob) |
|
322 | 322 | ! wall * comb * user * sys * (avg of 50) (glob) |
|
323 | 323 | ! wall * comb * user * sys * (median of 50) (glob) |
|
324 | 324 | $ hg perfparents --config perf.stub=no --config perf.run-limits='aaa-120, 0.000000001-50' |
|
325 | 325 | malformatted run limit entry, could not convert string to float: 'aaa': aaa-120 |
|
326 | 326 | ! wall * comb * user * sys * (best of 50) (glob) |
|
327 | 327 | ! wall * comb * user * sys * (max of 50) (glob) |
|
328 | 328 | ! wall * comb * user * sys * (avg of 50) (glob) |
|
329 | 329 | ! wall * comb * user * sys * (median of 50) (glob) |
|
330 | 330 | $ hg perfparents --config perf.stub=no --config perf.run-limits='120-aaaaaa, 0.000000001-50' |
|
331 | 331 | malformatted run limit entry, invalid literal for int() with base 10: 'aaaaaa': 120-aaaaaa |
|
332 | 332 | ! wall * comb * user * sys * (best of 50) (glob) |
|
333 | 333 | ! wall * comb * user * sys * (max of 50) (glob) |
|
334 | 334 | ! wall * comb * user * sys * (avg of 50) (glob) |
|
335 | 335 | ! wall * comb * user * sys * (median of 50) (glob) |
|
336 | 336 | |
|
337 | 337 | test actual output |
|
338 | 338 | ------------------ |
|
339 | 339 | |
|
340 | 340 | normal output: |
|
341 | 341 | |
|
342 | 342 | $ hg perfheads --config perf.stub=no |
|
343 | 343 | ! wall * comb * user * sys * (best of *) (glob) |
|
344 | 344 | ! wall * comb * user * sys * (max of *) (glob) |
|
345 | 345 | ! wall * comb * user * sys * (avg of *) (glob) |
|
346 | 346 | ! wall * comb * user * sys * (median of *) (glob) |
|
347 | 347 | |
|
348 | 348 | detailed output: |
|
349 | 349 | |
|
350 | 350 | $ hg perfheads --config perf.all-timing=yes --config perf.stub=no |
|
351 | 351 | ! wall * comb * user * sys * (best of *) (glob) |
|
352 | 352 | ! wall * comb * user * sys * (max of *) (glob) |
|
353 | 353 | ! wall * comb * user * sys * (avg of *) (glob) |
|
354 | 354 | ! wall * comb * user * sys * (median of *) (glob) |
|
355 | 355 | |
|
356 | 356 | test json output |
|
357 | 357 | ---------------- |
|
358 | 358 | |
|
359 | 359 | normal output: |
|
360 | 360 | |
|
361 | 361 | $ hg perfheads --template json --config perf.stub=no |
|
362 | 362 | [ |
|
363 | 363 | { |
|
364 | 364 | "avg.comb": *, (glob) |
|
365 | 365 | "avg.count": *, (glob) |
|
366 | 366 | "avg.sys": *, (glob) |
|
367 | 367 | "avg.user": *, (glob) |
|
368 | 368 | "avg.wall": *, (glob) |
|
369 | 369 | "comb": *, (glob) |
|
370 | 370 | "count": *, (glob) |
|
371 | 371 | "max.comb": *, (glob) |
|
372 | 372 | "max.count": *, (glob) |
|
373 | 373 | "max.sys": *, (glob) |
|
374 | 374 | "max.user": *, (glob) |
|
375 | 375 | "max.wall": *, (glob) |
|
376 | 376 | "median.comb": *, (glob) |
|
377 | 377 | "median.count": *, (glob) |
|
378 | 378 | "median.sys": *, (glob) |
|
379 | 379 | "median.user": *, (glob) |
|
380 | 380 | "median.wall": *, (glob) |
|
381 | 381 | "sys": *, (glob) |
|
382 | 382 | "user": *, (glob) |
|
383 | 383 | "wall": * (glob) |
|
384 | 384 | } |
|
385 | 385 | ] |
|
386 | 386 | |
|
387 | 387 | detailed output: |
|
388 | 388 | |
|
389 | 389 | $ hg perfheads --template json --config perf.all-timing=yes --config perf.stub=no |
|
390 | 390 | [ |
|
391 | 391 | { |
|
392 | 392 | "avg.comb": *, (glob) |
|
393 | 393 | "avg.count": *, (glob) |
|
394 | 394 | "avg.sys": *, (glob) |
|
395 | 395 | "avg.user": *, (glob) |
|
396 | 396 | "avg.wall": *, (glob) |
|
397 | 397 | "comb": *, (glob) |
|
398 | 398 | "count": *, (glob) |
|
399 | 399 | "max.comb": *, (glob) |
|
400 | 400 | "max.count": *, (glob) |
|
401 | 401 | "max.sys": *, (glob) |
|
402 | 402 | "max.user": *, (glob) |
|
403 | 403 | "max.wall": *, (glob) |
|
404 | 404 | "median.comb": *, (glob) |
|
405 | 405 | "median.count": *, (glob) |
|
406 | 406 | "median.sys": *, (glob) |
|
407 | 407 | "median.user": *, (glob) |
|
408 | 408 | "median.wall": *, (glob) |
|
409 | 409 | "sys": *, (glob) |
|
410 | 410 | "user": *, (glob) |
|
411 | 411 | "wall": * (glob) |
|
412 | 412 | } |
|
413 | 413 | ] |
|
414 | 414 | |
|
415 | 415 | Test pre-run feature |
|
416 | 416 | -------------------- |
|
417 | 417 | |
|
418 | 418 | (perf discovery has some spurious output) |
|
419 | 419 | |
|
420 | 420 | $ hg perfdiscovery . --config perf.stub=no --config perf.run-limits='0.000000001-1' --config perf.pre-run=0 |
|
421 | 421 | ! wall * comb * user * sys * (best of 1) (glob) |
|
422 | 422 | ! wall * comb * user * sys * (max of 1) (glob) |
|
423 | 423 | ! wall * comb * user * sys * (avg of 1) (glob) |
|
424 | 424 | ! wall * comb * user * sys * (median of 1) (glob) |
|
425 | 425 | searching for changes |
|
426 | 426 | $ hg perfdiscovery . --config perf.stub=no --config perf.run-limits='0.000000001-1' --config perf.pre-run=1 |
|
427 | 427 | ! wall * comb * user * sys * (best of 1) (glob) |
|
428 | 428 | ! wall * comb * user * sys * (max of 1) (glob) |
|
429 | 429 | ! wall * comb * user * sys * (avg of 1) (glob) |
|
430 | 430 | ! wall * comb * user * sys * (median of 1) (glob) |
|
431 | 431 | searching for changes |
|
432 | 432 | searching for changes |
|
433 | 433 | $ hg perfdiscovery . --config perf.stub=no --config perf.run-limits='0.000000001-1' --config perf.pre-run=3 |
|
434 | 434 | ! wall * comb * user * sys * (best of 1) (glob) |
|
435 | 435 | ! wall * comb * user * sys * (max of 1) (glob) |
|
436 | 436 | ! wall * comb * user * sys * (avg of 1) (glob) |
|
437 | 437 | ! wall * comb * user * sys * (median of 1) (glob) |
|
438 | 438 | searching for changes |
|
439 | 439 | searching for changes |
|
440 | 440 | searching for changes |
|
441 | 441 | searching for changes |
|
442 | 442 | $ hg perf::bundle 'last(all(), 5)' |
|
443 | 443 | $ hg bundle --exact --rev 'last(all(), 5)' last-5.hg |
|
444 | 444 | 4 changesets found |
|
445 | 445 | $ hg perf::unbundle last-5.hg |
|
446 | 446 | |
|
447 | 447 | |
|
448 | 448 | test profile-benchmark option |
|
449 | 449 | ------------------------------ |
|
450 | 450 | |
|
451 | 451 | Function to check that statprof ran |
|
452 | 452 | $ statprofran () { |
|
453 | 453 | > grep -E 'Sample count:|No samples recorded' > /dev/null |
|
454 | 454 | > } |
|
455 | 455 | $ hg perfdiscovery . --config perf.stub=no --config perf.run-limits='0.000000001-1' --config perf.profile-benchmark=yes 2>&1 | statprofran |
|
456 | 456 | |
|
457 | 457 | Check perf.py for historical portability |
|
458 | 458 | ---------------------------------------- |
|
459 | 459 | |
|
460 | 460 | $ cd "$TESTDIR/.." |
|
461 | 461 | |
|
462 | 462 | $ (testrepohg files -r 1.2 glob:mercurial/*.c glob:mercurial/*.py; |
|
463 | 463 | > testrepohg files -r tip glob:mercurial/*.c glob:mercurial/*.py) | |
|
464 | 464 | > "$TESTDIR"/check-perf-code.py contrib/perf.py |
|
465 | 465 | contrib/perf.py:\d+: (re) |
|
466 | 466 | > from mercurial import ( |
|
467 | 467 | import newer module separately in try clause for early Mercurial |
|
468 | 468 | contrib/perf.py:\d+: (re) |
|
469 | 469 | > from mercurial import ( |
|
470 | 470 | import newer module separately in try clause for early Mercurial |
|
471 | 471 | contrib/perf.py:\d+: (re) |
|
472 | 472 | > origindexpath = orig.opener.join(indexfile) |
|
473 | 473 | use getvfs()/getsvfs() for early Mercurial |
|
474 | 474 | contrib/perf.py:\d+: (re) |
|
475 | 475 | > origdatapath = orig.opener.join(datafile) |
|
476 | 476 | use getvfs()/getsvfs() for early Mercurial |
|
477 | 477 | contrib/perf.py:\d+: (re) |
|
478 | 478 | > vfs = vfsmod.vfs(tmpdir) |
|
479 | 479 | use getvfs()/getsvfs() for early Mercurial |
|
480 | 480 | contrib/perf.py:\d+: (re) |
|
481 | 481 | > vfs.options = getattr(orig.opener, 'options', None) |
|
482 | 482 | use getvfs()/getsvfs() for early Mercurial |
|
483 | 483 | [1] |
General Comments 0
You need to be logged in to leave comments.
Login now