Show More
@@ -1,483 +1,483 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::stream-consume |
|
191 | perf::stream-consume | |
192 | benchmark the full application of a stream clone |
|
192 | benchmark the full application of a stream clone | |
193 | perf::stream-generate |
|
193 | perf::stream-generate | |
194 | benchmark the full generation of a stream clone |
|
194 | benchmark the full generation of a stream clone | |
195 | perf::stream-locked-section |
|
195 | perf::stream-locked-section | |
196 | benchmark the initial, repo-locked, section of a stream-clone |
|
196 | benchmark the initial, repo-locked, section of a stream-clone | |
197 | perf::tags Benchmark tags retrieval in various situation |
|
197 | perf::tags Benchmark tags retrieval in various situation | |
198 | perf::templating |
|
198 | perf::templating | |
199 | test the rendering time of a given template |
|
199 | test the rendering time of a given template | |
200 | perf::unbundle |
|
200 | perf::unbundle | |
201 | benchmark application of a bundle in a repository. |
|
201 | benchmark application of a bundle in a repository. | |
202 | perf::unidiff |
|
202 | perf::unidiff | |
203 | benchmark a unified diff between revisions |
|
203 | benchmark a unified diff between revisions | |
204 | perf::volatilesets |
|
204 | perf::volatilesets | |
205 | benchmark the computation of various volatile set |
|
205 | benchmark the computation of various volatile set | |
206 | perf::walk (no help text available) |
|
206 | perf::walk (no help text available) | |
207 | perf::write microbenchmark ui.write (and others) |
|
207 | perf::write microbenchmark ui.write (and others) | |
208 |
|
208 | |||
209 | (use 'hg help -v perf' to show built-in aliases and global options) |
|
209 | (use 'hg help -v perf' to show built-in aliases and global options) | |
210 |
|
210 | |||
211 | $ hg help perfaddremove |
|
211 | $ hg help perfaddremove | |
212 | hg perf::addremove |
|
212 | hg perf::addremove | |
213 |
|
213 | |||
214 | aliases: perfaddremove |
|
214 | aliases: perfaddremove | |
215 |
|
215 | |||
216 | (no help text available) |
|
216 | (no help text available) | |
217 |
|
217 | |||
218 | options: |
|
218 | options: | |
219 |
|
219 | |||
220 | -T --template TEMPLATE display with template |
|
220 | -T --template TEMPLATE display with template | |
221 |
|
221 | |||
222 | (some details hidden, use --verbose to show complete help) |
|
222 | (some details hidden, use --verbose to show complete help) | |
223 |
|
223 | |||
224 | $ hg perfaddremove |
|
224 | $ hg perfaddremove | |
225 | $ hg perfancestors |
|
225 | $ hg perfancestors | |
226 | $ hg perfancestorset 2 |
|
226 | $ hg perfancestorset 2 | |
227 | $ hg perfannotate a |
|
227 | $ hg perfannotate a | |
228 | $ hg perfbdiff -c 1 |
|
228 | $ hg perfbdiff -c 1 | |
229 | $ hg perfbdiff --alldata 1 |
|
229 | $ hg perfbdiff --alldata 1 | |
230 | $ hg perfunidiff -c 1 |
|
230 | $ hg perfunidiff -c 1 | |
231 | $ hg perfunidiff --alldata 1 |
|
231 | $ hg perfunidiff --alldata 1 | |
232 | $ hg perfbookmarks |
|
232 | $ hg perfbookmarks | |
233 | $ hg perfbranchmap |
|
233 | $ hg perfbranchmap | |
234 | $ hg perfbranchmapload |
|
234 | $ hg perfbranchmapload | |
235 | $ hg perfbranchmapupdate --base "not tip" --target "tip" |
|
235 | $ hg perfbranchmapupdate --base "not tip" --target "tip" | |
236 | benchmark of branchmap with 3 revisions with 1 new ones |
|
236 | benchmark of branchmap with 3 revisions with 1 new ones | |
237 | $ hg perfcca |
|
237 | $ hg perfcca | |
238 | $ hg perfchangegroupchangelog |
|
238 | $ hg perfchangegroupchangelog | |
239 | $ hg perfchangegroupchangelog --cgversion 01 |
|
239 | $ hg perfchangegroupchangelog --cgversion 01 | |
240 | $ hg perfchangeset 2 |
|
240 | $ hg perfchangeset 2 | |
241 | $ hg perfctxfiles 2 |
|
241 | $ hg perfctxfiles 2 | |
242 | $ hg perfdiffwd |
|
242 | $ hg perfdiffwd | |
243 | $ hg perfdirfoldmap |
|
243 | $ hg perfdirfoldmap | |
244 | $ hg perfdirs |
|
244 | $ hg perfdirs | |
245 | $ hg perfdirstate |
|
245 | $ hg perfdirstate | |
246 | $ hg perfdirstate --contains |
|
246 | $ hg perfdirstate --contains | |
247 | $ hg perfdirstate --iteration |
|
247 | $ hg perfdirstate --iteration | |
248 | $ hg perfdirstatedirs |
|
248 | $ hg perfdirstatedirs | |
249 | $ hg perfdirstatefoldmap |
|
249 | $ hg perfdirstatefoldmap | |
250 | $ hg perfdirstatewrite |
|
250 | $ hg perfdirstatewrite | |
251 | #if repofncache |
|
251 | #if repofncache | |
252 | $ hg perffncacheencode |
|
252 | $ hg perffncacheencode | |
253 | $ hg perffncacheload |
|
253 | $ hg perffncacheload | |
254 | $ hg debugrebuildfncache |
|
254 | $ hg debugrebuildfncache | |
255 | fncache already up to date |
|
255 | fncache already up to date | |
256 | $ hg perffncachewrite |
|
256 | $ hg perffncachewrite | |
257 | $ hg debugrebuildfncache |
|
257 | $ hg debugrebuildfncache | |
258 | fncache already up to date |
|
258 | fncache already up to date | |
259 | #endif |
|
259 | #endif | |
260 | $ hg perfheads |
|
260 | $ hg perfheads | |
261 | $ hg perfignore |
|
261 | $ hg perfignore | |
262 | $ hg perfindex |
|
262 | $ hg perfindex | |
263 | $ hg perflinelogedits -n 1 |
|
263 | $ hg perflinelogedits -n 1 | |
264 | $ hg perfloadmarkers |
|
264 | $ hg perfloadmarkers | |
265 | $ hg perflog |
|
265 | $ hg perflog | |
266 | $ hg perflookup 2 |
|
266 | $ hg perflookup 2 | |
267 | $ hg perflrucache |
|
267 | $ hg perflrucache | |
268 | $ hg perfmanifest 2 |
|
268 | $ hg perfmanifest 2 | |
269 | $ hg perfmanifest -m 44fe2c8352bb3a478ffd7d8350bbc721920134d1 |
|
269 | $ hg perfmanifest -m 44fe2c8352bb3a478ffd7d8350bbc721920134d1 | |
270 | $ hg perfmanifest -m 44fe2c8352bb |
|
270 | $ hg perfmanifest -m 44fe2c8352bb | |
271 | abort: manifest revision must be integer or full node |
|
271 | abort: manifest revision must be integer or full node | |
272 | [255] |
|
272 | [255] | |
273 | $ hg perfmergecalculate -r 3 |
|
273 | $ hg perfmergecalculate -r 3 | |
274 | $ hg perfmoonwalk |
|
274 | $ hg perfmoonwalk | |
275 | $ hg perfnodelookup 2 |
|
275 | $ hg perfnodelookup 2 | |
276 | $ hg perfpathcopies 1 2 |
|
276 | $ hg perfpathcopies 1 2 | |
277 | $ hg perfprogress --total 1000 |
|
277 | $ hg perfprogress --total 1000 | |
278 | $ hg perfrawfiles 2 |
|
278 | $ hg perfrawfiles 2 | |
279 | $ hg perfrevlogindex -c |
|
279 | $ hg perfrevlogindex -c | |
280 | #if reporevlogstore |
|
280 | #if reporevlogstore | |
281 | $ hg perfrevlogrevisions .hg/store/data/a.i |
|
281 | $ hg perfrevlogrevisions .hg/store/data/a.i | |
282 | #endif |
|
282 | #endif | |
283 | $ hg perfrevlogrevision -m 0 |
|
283 | $ hg perfrevlogrevision -m 0 | |
284 | $ hg perfrevlogchunks -c |
|
284 | $ hg perfrevlogchunks -c | |
285 | $ hg perfrevrange |
|
285 | $ hg perfrevrange | |
286 | $ hg perfrevset 'all()' |
|
286 | $ hg perfrevset 'all()' | |
287 | $ hg perfstartup |
|
287 | $ hg perfstartup | |
288 | $ hg perfstatus |
|
288 | $ hg perfstatus | |
289 | $ hg perfstatus --dirstate |
|
289 | $ hg perfstatus --dirstate | |
290 | $ hg perftags |
|
290 | $ hg perftags | |
291 | $ hg perftemplating |
|
291 | $ hg perftemplating | |
292 | $ hg perfvolatilesets |
|
292 | $ hg perfvolatilesets | |
293 | $ hg perfwalk |
|
293 | $ hg perfwalk | |
294 | $ hg perfparents |
|
294 | $ hg perfparents | |
295 | $ hg perfdiscovery -q . |
|
295 | $ hg perfdiscovery -q . | |
296 |
|
296 | |||
297 | Test run control |
|
297 | Test run control | |
298 | ---------------- |
|
298 | ---------------- | |
299 |
|
299 | |||
300 | Simple single entry |
|
300 | Simple single entry | |
301 |
|
301 | |||
302 | $ hg perfparents --config perf.stub=no --config perf.run-limits='0.000000001-15' |
|
302 | $ hg perfparents --config perf.stub=no --config perf.run-limits='0.000000001-15' | |
303 | ! wall * comb * user * sys * (best of 15) (glob) |
|
303 | ! wall * comb * user * sys * (best of 15) (glob) | |
304 | ! wall * comb * user * sys * (max of 15) (glob) |
|
304 | ! wall * comb * user * sys * (max of 15) (glob) | |
305 | ! wall * comb * user * sys * (avg of 15) (glob) |
|
305 | ! wall * comb * user * sys * (avg of 15) (glob) | |
306 | ! wall * comb * user * sys * (median of 15) (glob) |
|
306 | ! wall * comb * user * sys * (median of 15) (glob) | |
307 |
|
307 | |||
308 | Multiple entries |
|
308 | Multiple entries | |
309 |
|
309 | |||
310 | $ hg perfparents --config perf.stub=no --config perf.run-limits='500000-1, 0.000000001-50' |
|
310 | $ hg perfparents --config perf.stub=no --config perf.run-limits='500000-1, 0.000000001-50' | |
311 | ! wall * comb * user * sys * (best of 50) (glob) |
|
311 | ! wall * comb * user * sys * (best of 50) (glob) | |
312 |
! wall * comb * user * sys |
|
312 | ! wall * comb * user * sys * (max of 50) (glob) | |
313 |
! wall * comb * user * sys |
|
313 | ! wall * comb * user * sys * (avg of 50) (glob) | |
314 |
! wall * comb * user * sys |
|
314 | ! wall * comb * user * sys * (median of 50) (glob) | |
315 |
|
315 | |||
316 | error case are ignored |
|
316 | error case are ignored | |
317 |
|
317 | |||
318 | $ hg perfparents --config perf.stub=no --config perf.run-limits='500, 0.000000001-50' |
|
318 | $ hg perfparents --config perf.stub=no --config perf.run-limits='500, 0.000000001-50' | |
319 | malformatted run limit entry, missing "-": 500 |
|
319 | malformatted run limit entry, missing "-": 500 | |
320 | ! wall * comb * user * sys * (best of 50) (glob) |
|
320 | ! wall * comb * user * sys * (best of 50) (glob) | |
321 | ! wall * comb * user * sys * (max of 50) (glob) |
|
321 | ! wall * comb * user * sys * (max of 50) (glob) | |
322 | ! wall * comb * user * sys * (avg of 50) (glob) |
|
322 | ! wall * comb * user * sys * (avg of 50) (glob) | |
323 | ! wall * comb * user * sys * (median of 50) (glob) |
|
323 | ! wall * comb * user * sys * (median of 50) (glob) | |
324 | $ hg perfparents --config perf.stub=no --config perf.run-limits='aaa-120, 0.000000001-50' |
|
324 | $ hg perfparents --config perf.stub=no --config perf.run-limits='aaa-120, 0.000000001-50' | |
325 | malformatted run limit entry, could not convert string to float: 'aaa': aaa-120 |
|
325 | malformatted run limit entry, could not convert string to float: 'aaa': aaa-120 | |
326 | ! wall * comb * user * sys * (best of 50) (glob) |
|
326 | ! wall * comb * user * sys * (best of 50) (glob) | |
327 | ! wall * comb * user * sys * (max of 50) (glob) |
|
327 | ! wall * comb * user * sys * (max of 50) (glob) | |
328 | ! wall * comb * user * sys * (avg of 50) (glob) |
|
328 | ! wall * comb * user * sys * (avg of 50) (glob) | |
329 | ! wall * comb * user * sys * (median of 50) (glob) |
|
329 | ! wall * comb * user * sys * (median of 50) (glob) | |
330 | $ hg perfparents --config perf.stub=no --config perf.run-limits='120-aaaaaa, 0.000000001-50' |
|
330 | $ hg perfparents --config perf.stub=no --config perf.run-limits='120-aaaaaa, 0.000000001-50' | |
331 | malformatted run limit entry, invalid literal for int() with base 10: 'aaaaaa': 120-aaaaaa |
|
331 | malformatted run limit entry, invalid literal for int() with base 10: 'aaaaaa': 120-aaaaaa | |
332 | ! wall * comb * user * sys * (best of 50) (glob) |
|
332 | ! wall * comb * user * sys * (best of 50) (glob) | |
333 | ! wall * comb * user * sys * (max of 50) (glob) |
|
333 | ! wall * comb * user * sys * (max of 50) (glob) | |
334 | ! wall * comb * user * sys * (avg of 50) (glob) |
|
334 | ! wall * comb * user * sys * (avg of 50) (glob) | |
335 | ! wall * comb * user * sys * (median of 50) (glob) |
|
335 | ! wall * comb * user * sys * (median of 50) (glob) | |
336 |
|
336 | |||
337 | test actual output |
|
337 | test actual output | |
338 | ------------------ |
|
338 | ------------------ | |
339 |
|
339 | |||
340 | normal output: |
|
340 | normal output: | |
341 |
|
341 | |||
342 | $ hg perfheads --config perf.stub=no |
|
342 | $ hg perfheads --config perf.stub=no | |
343 | ! wall * comb * user * sys * (best of *) (glob) |
|
343 | ! wall * comb * user * sys * (best of *) (glob) | |
344 | ! wall * comb * user * sys * (max of *) (glob) |
|
344 | ! wall * comb * user * sys * (max of *) (glob) | |
345 | ! wall * comb * user * sys * (avg of *) (glob) |
|
345 | ! wall * comb * user * sys * (avg of *) (glob) | |
346 | ! wall * comb * user * sys * (median of *) (glob) |
|
346 | ! wall * comb * user * sys * (median of *) (glob) | |
347 |
|
347 | |||
348 | detailed output: |
|
348 | detailed output: | |
349 |
|
349 | |||
350 | $ hg perfheads --config perf.all-timing=yes --config perf.stub=no |
|
350 | $ hg perfheads --config perf.all-timing=yes --config perf.stub=no | |
351 | ! wall * comb * user * sys * (best of *) (glob) |
|
351 | ! wall * comb * user * sys * (best of *) (glob) | |
352 | ! wall * comb * user * sys * (max of *) (glob) |
|
352 | ! wall * comb * user * sys * (max of *) (glob) | |
353 | ! wall * comb * user * sys * (avg of *) (glob) |
|
353 | ! wall * comb * user * sys * (avg of *) (glob) | |
354 | ! wall * comb * user * sys * (median of *) (glob) |
|
354 | ! wall * comb * user * sys * (median of *) (glob) | |
355 |
|
355 | |||
356 | test json output |
|
356 | test json output | |
357 | ---------------- |
|
357 | ---------------- | |
358 |
|
358 | |||
359 | normal output: |
|
359 | normal output: | |
360 |
|
360 | |||
361 | $ hg perfheads --template json --config perf.stub=no |
|
361 | $ hg perfheads --template json --config perf.stub=no | |
362 | [ |
|
362 | [ | |
363 | { |
|
363 | { | |
364 | "avg.comb": *, (glob) |
|
364 | "avg.comb": *, (glob) | |
365 | "avg.count": *, (glob) |
|
365 | "avg.count": *, (glob) | |
366 | "avg.sys": *, (glob) |
|
366 | "avg.sys": *, (glob) | |
367 | "avg.user": *, (glob) |
|
367 | "avg.user": *, (glob) | |
368 | "avg.wall": *, (glob) |
|
368 | "avg.wall": *, (glob) | |
369 | "comb": *, (glob) |
|
369 | "comb": *, (glob) | |
370 | "count": *, (glob) |
|
370 | "count": *, (glob) | |
371 | "max.comb": *, (glob) |
|
371 | "max.comb": *, (glob) | |
372 | "max.count": *, (glob) |
|
372 | "max.count": *, (glob) | |
373 | "max.sys": *, (glob) |
|
373 | "max.sys": *, (glob) | |
374 | "max.user": *, (glob) |
|
374 | "max.user": *, (glob) | |
375 | "max.wall": *, (glob) |
|
375 | "max.wall": *, (glob) | |
376 | "median.comb": *, (glob) |
|
376 | "median.comb": *, (glob) | |
377 | "median.count": *, (glob) |
|
377 | "median.count": *, (glob) | |
378 | "median.sys": *, (glob) |
|
378 | "median.sys": *, (glob) | |
379 | "median.user": *, (glob) |
|
379 | "median.user": *, (glob) | |
380 | "median.wall": *, (glob) |
|
380 | "median.wall": *, (glob) | |
381 | "sys": *, (glob) |
|
381 | "sys": *, (glob) | |
382 | "user": *, (glob) |
|
382 | "user": *, (glob) | |
383 | "wall": * (glob) |
|
383 | "wall": * (glob) | |
384 | } |
|
384 | } | |
385 | ] |
|
385 | ] | |
386 |
|
386 | |||
387 | detailed output: |
|
387 | detailed output: | |
388 |
|
388 | |||
389 | $ hg perfheads --template json --config perf.all-timing=yes --config perf.stub=no |
|
389 | $ hg perfheads --template json --config perf.all-timing=yes --config perf.stub=no | |
390 | [ |
|
390 | [ | |
391 | { |
|
391 | { | |
392 | "avg.comb": *, (glob) |
|
392 | "avg.comb": *, (glob) | |
393 | "avg.count": *, (glob) |
|
393 | "avg.count": *, (glob) | |
394 | "avg.sys": *, (glob) |
|
394 | "avg.sys": *, (glob) | |
395 | "avg.user": *, (glob) |
|
395 | "avg.user": *, (glob) | |
396 | "avg.wall": *, (glob) |
|
396 | "avg.wall": *, (glob) | |
397 | "comb": *, (glob) |
|
397 | "comb": *, (glob) | |
398 | "count": *, (glob) |
|
398 | "count": *, (glob) | |
399 | "max.comb": *, (glob) |
|
399 | "max.comb": *, (glob) | |
400 | "max.count": *, (glob) |
|
400 | "max.count": *, (glob) | |
401 | "max.sys": *, (glob) |
|
401 | "max.sys": *, (glob) | |
402 | "max.user": *, (glob) |
|
402 | "max.user": *, (glob) | |
403 | "max.wall": *, (glob) |
|
403 | "max.wall": *, (glob) | |
404 | "median.comb": *, (glob) |
|
404 | "median.comb": *, (glob) | |
405 | "median.count": *, (glob) |
|
405 | "median.count": *, (glob) | |
406 | "median.sys": *, (glob) |
|
406 | "median.sys": *, (glob) | |
407 | "median.user": *, (glob) |
|
407 | "median.user": *, (glob) | |
408 | "median.wall": *, (glob) |
|
408 | "median.wall": *, (glob) | |
409 | "sys": *, (glob) |
|
409 | "sys": *, (glob) | |
410 | "user": *, (glob) |
|
410 | "user": *, (glob) | |
411 | "wall": * (glob) |
|
411 | "wall": * (glob) | |
412 | } |
|
412 | } | |
413 | ] |
|
413 | ] | |
414 |
|
414 | |||
415 | Test pre-run feature |
|
415 | Test pre-run feature | |
416 | -------------------- |
|
416 | -------------------- | |
417 |
|
417 | |||
418 | (perf discovery has some spurious output) |
|
418 | (perf discovery has some spurious output) | |
419 |
|
419 | |||
420 | $ hg perfdiscovery . --config perf.stub=no --config perf.run-limits='0.000000001-1' --config perf.pre-run=0 |
|
420 | $ hg perfdiscovery . --config perf.stub=no --config perf.run-limits='0.000000001-1' --config perf.pre-run=0 | |
421 | ! wall * comb * user * sys * (best of 1) (glob) |
|
421 | ! wall * comb * user * sys * (best of 1) (glob) | |
422 | ! wall * comb * user * sys * (max of 1) (glob) |
|
422 | ! wall * comb * user * sys * (max of 1) (glob) | |
423 | ! wall * comb * user * sys * (avg of 1) (glob) |
|
423 | ! wall * comb * user * sys * (avg of 1) (glob) | |
424 | ! wall * comb * user * sys * (median of 1) (glob) |
|
424 | ! wall * comb * user * sys * (median of 1) (glob) | |
425 | searching for changes |
|
425 | searching for changes | |
426 | $ hg perfdiscovery . --config perf.stub=no --config perf.run-limits='0.000000001-1' --config perf.pre-run=1 |
|
426 | $ hg perfdiscovery . --config perf.stub=no --config perf.run-limits='0.000000001-1' --config perf.pre-run=1 | |
427 | ! wall * comb * user * sys * (best of 1) (glob) |
|
427 | ! wall * comb * user * sys * (best of 1) (glob) | |
428 | ! wall * comb * user * sys * (max of 1) (glob) |
|
428 | ! wall * comb * user * sys * (max of 1) (glob) | |
429 | ! wall * comb * user * sys * (avg of 1) (glob) |
|
429 | ! wall * comb * user * sys * (avg of 1) (glob) | |
430 | ! wall * comb * user * sys * (median of 1) (glob) |
|
430 | ! wall * comb * user * sys * (median of 1) (glob) | |
431 | searching for changes |
|
431 | searching for changes | |
432 | searching for changes |
|
432 | searching for changes | |
433 | $ hg perfdiscovery . --config perf.stub=no --config perf.run-limits='0.000000001-1' --config perf.pre-run=3 |
|
433 | $ hg perfdiscovery . --config perf.stub=no --config perf.run-limits='0.000000001-1' --config perf.pre-run=3 | |
434 | ! wall * comb * user * sys * (best of 1) (glob) |
|
434 | ! wall * comb * user * sys * (best of 1) (glob) | |
435 | ! wall * comb * user * sys * (max of 1) (glob) |
|
435 | ! wall * comb * user * sys * (max of 1) (glob) | |
436 | ! wall * comb * user * sys * (avg of 1) (glob) |
|
436 | ! wall * comb * user * sys * (avg of 1) (glob) | |
437 | ! wall * comb * user * sys * (median of 1) (glob) |
|
437 | ! wall * comb * user * sys * (median of 1) (glob) | |
438 | searching for changes |
|
438 | searching for changes | |
439 | searching for changes |
|
439 | searching for changes | |
440 | searching for changes |
|
440 | searching for changes | |
441 | searching for changes |
|
441 | searching for changes | |
442 | $ hg perf::bundle 'last(all(), 5)' |
|
442 | $ hg perf::bundle 'last(all(), 5)' | |
443 | $ hg bundle --exact --rev 'last(all(), 5)' last-5.hg |
|
443 | $ hg bundle --exact --rev 'last(all(), 5)' last-5.hg | |
444 | 4 changesets found |
|
444 | 4 changesets found | |
445 | $ hg perf::unbundle last-5.hg |
|
445 | $ hg perf::unbundle last-5.hg | |
446 |
|
446 | |||
447 |
|
447 | |||
448 | test profile-benchmark option |
|
448 | test profile-benchmark option | |
449 | ------------------------------ |
|
449 | ------------------------------ | |
450 |
|
450 | |||
451 | Function to check that statprof ran |
|
451 | Function to check that statprof ran | |
452 | $ statprofran () { |
|
452 | $ statprofran () { | |
453 | > grep -E 'Sample count:|No samples recorded' > /dev/null |
|
453 | > grep -E 'Sample count:|No samples recorded' > /dev/null | |
454 | > } |
|
454 | > } | |
455 | $ hg perfdiscovery . --config perf.stub=no --config perf.run-limits='0.000000001-1' --config perf.profile-benchmark=yes 2>&1 | statprofran |
|
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 | Check perf.py for historical portability |
|
457 | Check perf.py for historical portability | |
458 | ---------------------------------------- |
|
458 | ---------------------------------------- | |
459 |
|
459 | |||
460 | $ cd "$TESTDIR/.." |
|
460 | $ cd "$TESTDIR/.." | |
461 |
|
461 | |||
462 | $ (testrepohg files -r 1.2 glob:mercurial/*.c glob:mercurial/*.py; |
|
462 | $ (testrepohg files -r 1.2 glob:mercurial/*.c glob:mercurial/*.py; | |
463 | > testrepohg files -r tip glob:mercurial/*.c glob:mercurial/*.py) | |
|
463 | > testrepohg files -r tip glob:mercurial/*.c glob:mercurial/*.py) | | |
464 | > "$TESTDIR"/check-perf-code.py contrib/perf.py |
|
464 | > "$TESTDIR"/check-perf-code.py contrib/perf.py | |
465 | contrib/perf.py:\d+: (re) |
|
465 | contrib/perf.py:\d+: (re) | |
466 | > from mercurial import ( |
|
466 | > from mercurial import ( | |
467 | import newer module separately in try clause for early Mercurial |
|
467 | import newer module separately in try clause for early Mercurial | |
468 | contrib/perf.py:\d+: (re) |
|
468 | contrib/perf.py:\d+: (re) | |
469 | > from mercurial import ( |
|
469 | > from mercurial import ( | |
470 | import newer module separately in try clause for early Mercurial |
|
470 | import newer module separately in try clause for early Mercurial | |
471 | contrib/perf.py:\d+: (re) |
|
471 | contrib/perf.py:\d+: (re) | |
472 | > origindexpath = orig.opener.join(indexfile) |
|
472 | > origindexpath = orig.opener.join(indexfile) | |
473 | use getvfs()/getsvfs() for early Mercurial |
|
473 | use getvfs()/getsvfs() for early Mercurial | |
474 | contrib/perf.py:\d+: (re) |
|
474 | contrib/perf.py:\d+: (re) | |
475 | > origdatapath = orig.opener.join(datafile) |
|
475 | > origdatapath = orig.opener.join(datafile) | |
476 | use getvfs()/getsvfs() for early Mercurial |
|
476 | use getvfs()/getsvfs() for early Mercurial | |
477 | contrib/perf.py:\d+: (re) |
|
477 | contrib/perf.py:\d+: (re) | |
478 | > vfs = vfsmod.vfs(tmpdir) |
|
478 | > vfs = vfsmod.vfs(tmpdir) | |
479 | use getvfs()/getsvfs() for early Mercurial |
|
479 | use getvfs()/getsvfs() for early Mercurial | |
480 | contrib/perf.py:\d+: (re) |
|
480 | contrib/perf.py:\d+: (re) | |
481 | > vfs.options = getattr(orig.opener, 'options', None) |
|
481 | > vfs.options = getattr(orig.opener, 'options', None) | |
482 | use getvfs()/getsvfs() for early Mercurial |
|
482 | use getvfs()/getsvfs() for early Mercurial | |
483 | [1] |
|
483 | [1] |
General Comments 0
You need to be logged in to leave comments.
Login now