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