Show More
@@ -1,411 +1,425 | |||||
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--bundleread |
|
99 | perf--bundleread | |
100 | Benchmark reading of bundle files. |
|
100 | Benchmark reading of bundle files. | |
101 | perf--cca (no help text available) |
|
101 | perf--cca (no help text available) | |
102 | perf--changegroupchangelog |
|
102 | perf--changegroupchangelog | |
103 | Benchmark producing a changelog group for a changegroup. |
|
103 | Benchmark producing a changelog group for a changegroup. | |
104 | perf--changeset |
|
104 | perf--changeset | |
105 | (no help text available) |
|
105 | (no help text available) | |
106 | perf--ctxfiles |
|
106 | perf--ctxfiles | |
107 | (no help text available) |
|
107 | (no help text available) | |
108 | perf--diffwd Profile diff of working directory changes |
|
108 | perf--diffwd Profile diff of working directory changes | |
109 | perf--dirfoldmap |
|
109 | perf--dirfoldmap | |
110 | benchmap a 'dirstate._map.dirfoldmap.get()' request |
|
110 | benchmap a 'dirstate._map.dirfoldmap.get()' request | |
111 | perf--dirs (no help text available) |
|
111 | perf--dirs (no help text available) | |
112 | perf--dirstate |
|
112 | perf--dirstate | |
113 | benchmap the time of various distate operations |
|
113 | benchmap the time of various distate operations | |
114 | perf--dirstatedirs |
|
114 | perf--dirstatedirs | |
115 | benchmap a 'dirstate.hasdir' call from an empty 'dirs' cache |
|
115 | benchmap a 'dirstate.hasdir' call from an empty 'dirs' cache | |
116 | perf--dirstatefoldmap |
|
116 | perf--dirstatefoldmap | |
117 | benchmap a 'dirstate._map.filefoldmap.get()' request |
|
117 | benchmap a 'dirstate._map.filefoldmap.get()' request | |
118 | perf--dirstatewrite |
|
118 | perf--dirstatewrite | |
119 | benchmap the time it take to write a dirstate on disk |
|
119 | benchmap the time it take to write a dirstate on disk | |
120 | perf--discovery |
|
120 | perf--discovery | |
121 | benchmark discovery between local repo and the peer at given |
|
121 | benchmark discovery between local repo and the peer at given | |
122 | path |
|
122 | path | |
123 | perf--fncacheencode |
|
123 | perf--fncacheencode | |
124 | (no help text available) |
|
124 | (no help text available) | |
125 | perf--fncacheload |
|
125 | perf--fncacheload | |
126 | (no help text available) |
|
126 | (no help text available) | |
127 | perf--fncachewrite |
|
127 | perf--fncachewrite | |
128 | (no help text available) |
|
128 | (no help text available) | |
129 | perf--heads benchmark the computation of a changelog heads |
|
129 | perf--heads benchmark the computation of a changelog heads | |
130 | perf--helper-mergecopies |
|
130 | perf--helper-mergecopies | |
131 | find statistics about potential parameters for |
|
131 | find statistics about potential parameters for | |
132 | 'perfmergecopies' |
|
132 | 'perfmergecopies' | |
133 | perf--helper-pathcopies |
|
133 | perf--helper-pathcopies | |
134 | find statistic about potential parameters for the |
|
134 | find statistic about potential parameters for the | |
135 | 'perftracecopies' |
|
135 | 'perftracecopies' | |
136 | perf--ignore benchmark operation related to computing ignore |
|
136 | perf--ignore benchmark operation related to computing ignore | |
137 | perf--index benchmark index creation time followed by a lookup |
|
137 | perf--index benchmark index creation time followed by a lookup | |
138 | perf--linelogedits |
|
138 | perf--linelogedits | |
139 | (no help text available) |
|
139 | (no help text available) | |
140 | perf--loadmarkers |
|
140 | perf--loadmarkers | |
141 | benchmark the time to parse the on-disk markers for a repo |
|
141 | benchmark the time to parse the on-disk markers for a repo | |
142 | perf--log (no help text available) |
|
142 | perf--log (no help text available) | |
143 | perf--lookup (no help text available) |
|
143 | perf--lookup (no help text available) | |
144 | perf--lrucachedict |
|
144 | perf--lrucachedict | |
145 | (no help text available) |
|
145 | (no help text available) | |
146 | perf--manifest |
|
146 | perf--manifest | |
147 | benchmark the time to read a manifest from disk and return a |
|
147 | benchmark the time to read a manifest from disk and return a | |
148 | usable |
|
148 | usable | |
149 | perf--mergecalculate |
|
149 | perf--mergecalculate | |
150 | (no help text available) |
|
150 | (no help text available) | |
151 | perf--mergecopies |
|
151 | perf--mergecopies | |
152 | measure runtime of 'copies.mergecopies' |
|
152 | measure runtime of 'copies.mergecopies' | |
153 | perf--moonwalk |
|
153 | perf--moonwalk | |
154 | benchmark walking the changelog backwards |
|
154 | benchmark walking the changelog backwards | |
155 | perf--nodelookup |
|
155 | perf--nodelookup | |
156 | (no help text available) |
|
156 | (no help text available) | |
157 | perf--nodemap |
|
157 | perf--nodemap | |
158 | benchmark the time necessary to look up revision from a cold |
|
158 | benchmark the time necessary to look up revision from a cold | |
159 | nodemap |
|
159 | nodemap | |
160 | perf--parents |
|
160 | perf--parents | |
161 | benchmark the time necessary to fetch one changeset's parents. |
|
161 | benchmark the time necessary to fetch one changeset's parents. | |
162 | perf--pathcopies |
|
162 | perf--pathcopies | |
163 | benchmark the copy tracing logic |
|
163 | benchmark the copy tracing logic | |
164 | perf--phases benchmark phasesets computation |
|
164 | perf--phases benchmark phasesets computation | |
165 | perf--phasesremote |
|
165 | perf--phasesremote | |
166 | benchmark time needed to analyse phases of the remote server |
|
166 | benchmark time needed to analyse phases of the remote server | |
167 | perf--progress |
|
167 | perf--progress | |
168 | printing of progress bars |
|
168 | printing of progress bars | |
169 | perf--rawfiles |
|
169 | perf--rawfiles | |
170 | (no help text available) |
|
170 | (no help text available) | |
171 | perf--revlogchunks |
|
171 | perf--revlogchunks | |
172 | Benchmark operations on revlog chunks. |
|
172 | Benchmark operations on revlog chunks. | |
173 | perf--revlogindex |
|
173 | perf--revlogindex | |
174 | Benchmark operations against a revlog index. |
|
174 | Benchmark operations against a revlog index. | |
175 | perf--revlogrevision |
|
175 | perf--revlogrevision | |
176 | Benchmark obtaining a revlog revision. |
|
176 | Benchmark obtaining a revlog revision. | |
177 | perf--revlogrevisions |
|
177 | perf--revlogrevisions | |
178 | Benchmark reading a series of revisions from a revlog. |
|
178 | Benchmark reading a series of revisions from a revlog. | |
179 | perf--revlogwrite |
|
179 | perf--revlogwrite | |
180 | Benchmark writing a series of revisions to a revlog. |
|
180 | Benchmark writing a series of revisions to a revlog. | |
181 | perf--revrange |
|
181 | perf--revrange | |
182 | (no help text available) |
|
182 | (no help text available) | |
183 | perf--revset benchmark the execution time of a revset |
|
183 | perf--revset benchmark the execution time of a revset | |
184 | perf--startup |
|
184 | perf--startup | |
185 | (no help text available) |
|
185 | (no help text available) | |
186 | perf--status benchmark the performance of a single status call |
|
186 | perf--status benchmark the performance of a single status call | |
187 | perf--tags (no help text available) |
|
187 | perf--tags (no help text available) | |
188 | perf--templating |
|
188 | perf--templating | |
189 | test the rendering time of a given template |
|
189 | test the rendering time of a given template | |
190 | perf--unidiff |
|
190 | perf--unidiff | |
191 | benchmark a unified diff between revisions |
|
191 | benchmark a unified diff between revisions | |
192 | perf--volatilesets |
|
192 | perf--volatilesets | |
193 | benchmark the computation of various volatile set |
|
193 | benchmark the computation of various volatile set | |
194 | perf--walk (no help text available) |
|
194 | perf--walk (no help text available) | |
195 | perf--write microbenchmark ui.write (and others) |
|
195 | perf--write microbenchmark ui.write (and others) | |
196 |
|
196 | |||
197 | (use 'hg help -v perf' to show built-in aliases and global options) |
|
197 | (use 'hg help -v perf' to show built-in aliases and global options) | |
|
198 | ||||
|
199 | $ hg help perfaddremove | |||
|
200 | hg perf--addremove | |||
|
201 | ||||
|
202 | aliases: perfaddremove | |||
|
203 | ||||
|
204 | (no help text available) | |||
|
205 | ||||
|
206 | options: | |||
|
207 | ||||
|
208 | -T --template TEMPLATE display with template | |||
|
209 | ||||
|
210 | (some details hidden, use --verbose to show complete help) | |||
|
211 | ||||
198 | $ hg perfaddremove |
|
212 | $ hg perfaddremove | |
199 | $ hg perfancestors |
|
213 | $ hg perfancestors | |
200 | $ hg perfancestorset 2 |
|
214 | $ hg perfancestorset 2 | |
201 | $ hg perfannotate a |
|
215 | $ hg perfannotate a | |
202 | $ hg perfbdiff -c 1 |
|
216 | $ hg perfbdiff -c 1 | |
203 | $ hg perfbdiff --alldata 1 |
|
217 | $ hg perfbdiff --alldata 1 | |
204 | $ hg perfunidiff -c 1 |
|
218 | $ hg perfunidiff -c 1 | |
205 | $ hg perfunidiff --alldata 1 |
|
219 | $ hg perfunidiff --alldata 1 | |
206 | $ hg perfbookmarks |
|
220 | $ hg perfbookmarks | |
207 | $ hg perfbranchmap |
|
221 | $ hg perfbranchmap | |
208 | $ hg perfbranchmapload |
|
222 | $ hg perfbranchmapload | |
209 | $ hg perfbranchmapupdate --base "not tip" --target "tip" |
|
223 | $ hg perfbranchmapupdate --base "not tip" --target "tip" | |
210 | benchmark of branchmap with 3 revisions with 1 new ones |
|
224 | benchmark of branchmap with 3 revisions with 1 new ones | |
211 | $ hg perfcca |
|
225 | $ hg perfcca | |
212 | $ hg perfchangegroupchangelog |
|
226 | $ hg perfchangegroupchangelog | |
213 | $ hg perfchangegroupchangelog --cgversion 01 |
|
227 | $ hg perfchangegroupchangelog --cgversion 01 | |
214 | $ hg perfchangeset 2 |
|
228 | $ hg perfchangeset 2 | |
215 | $ hg perfctxfiles 2 |
|
229 | $ hg perfctxfiles 2 | |
216 | $ hg perfdiffwd |
|
230 | $ hg perfdiffwd | |
217 | $ hg perfdirfoldmap |
|
231 | $ hg perfdirfoldmap | |
218 | $ hg perfdirs |
|
232 | $ hg perfdirs | |
219 | $ hg perfdirstate |
|
233 | $ hg perfdirstate | |
220 | $ hg perfdirstate --contains |
|
234 | $ hg perfdirstate --contains | |
221 | $ hg perfdirstate --iteration |
|
235 | $ hg perfdirstate --iteration | |
222 | $ hg perfdirstatedirs |
|
236 | $ hg perfdirstatedirs | |
223 | $ hg perfdirstatefoldmap |
|
237 | $ hg perfdirstatefoldmap | |
224 | $ hg perfdirstatewrite |
|
238 | $ hg perfdirstatewrite | |
225 | #if repofncache |
|
239 | #if repofncache | |
226 | $ hg perffncacheencode |
|
240 | $ hg perffncacheencode | |
227 | $ hg perffncacheload |
|
241 | $ hg perffncacheload | |
228 | $ hg debugrebuildfncache |
|
242 | $ hg debugrebuildfncache | |
229 | fncache already up to date |
|
243 | fncache already up to date | |
230 | $ hg perffncachewrite |
|
244 | $ hg perffncachewrite | |
231 | $ hg debugrebuildfncache |
|
245 | $ hg debugrebuildfncache | |
232 | fncache already up to date |
|
246 | fncache already up to date | |
233 | #endif |
|
247 | #endif | |
234 | $ hg perfheads |
|
248 | $ hg perfheads | |
235 | $ hg perfignore |
|
249 | $ hg perfignore | |
236 | $ hg perfindex |
|
250 | $ hg perfindex | |
237 | $ hg perflinelogedits -n 1 |
|
251 | $ hg perflinelogedits -n 1 | |
238 | $ hg perfloadmarkers |
|
252 | $ hg perfloadmarkers | |
239 | $ hg perflog |
|
253 | $ hg perflog | |
240 | $ hg perflookup 2 |
|
254 | $ hg perflookup 2 | |
241 | $ hg perflrucache |
|
255 | $ hg perflrucache | |
242 | $ hg perfmanifest 2 |
|
256 | $ hg perfmanifest 2 | |
243 | $ hg perfmanifest -m 44fe2c8352bb3a478ffd7d8350bbc721920134d1 |
|
257 | $ hg perfmanifest -m 44fe2c8352bb3a478ffd7d8350bbc721920134d1 | |
244 | $ hg perfmanifest -m 44fe2c8352bb |
|
258 | $ hg perfmanifest -m 44fe2c8352bb | |
245 | abort: manifest revision must be integer or full node |
|
259 | abort: manifest revision must be integer or full node | |
246 | [255] |
|
260 | [255] | |
247 | $ hg perfmergecalculate -r 3 |
|
261 | $ hg perfmergecalculate -r 3 | |
248 | $ hg perfmoonwalk |
|
262 | $ hg perfmoonwalk | |
249 | $ hg perfnodelookup 2 |
|
263 | $ hg perfnodelookup 2 | |
250 | $ hg perfpathcopies 1 2 |
|
264 | $ hg perfpathcopies 1 2 | |
251 | $ hg perfprogress --total 1000 |
|
265 | $ hg perfprogress --total 1000 | |
252 | $ hg perfrawfiles 2 |
|
266 | $ hg perfrawfiles 2 | |
253 | $ hg perfrevlogindex -c |
|
267 | $ hg perfrevlogindex -c | |
254 | #if reporevlogstore |
|
268 | #if reporevlogstore | |
255 | $ hg perfrevlogrevisions .hg/store/data/a.i |
|
269 | $ hg perfrevlogrevisions .hg/store/data/a.i | |
256 | #endif |
|
270 | #endif | |
257 | $ hg perfrevlogrevision -m 0 |
|
271 | $ hg perfrevlogrevision -m 0 | |
258 | $ hg perfrevlogchunks -c |
|
272 | $ hg perfrevlogchunks -c | |
259 | $ hg perfrevrange |
|
273 | $ hg perfrevrange | |
260 | $ hg perfrevset 'all()' |
|
274 | $ hg perfrevset 'all()' | |
261 | $ hg perfstartup |
|
275 | $ hg perfstartup | |
262 | $ hg perfstatus |
|
276 | $ hg perfstatus | |
263 | $ hg perfstatus --dirstate |
|
277 | $ hg perfstatus --dirstate | |
264 | $ hg perftags |
|
278 | $ hg perftags | |
265 | $ hg perftemplating |
|
279 | $ hg perftemplating | |
266 | $ hg perfvolatilesets |
|
280 | $ hg perfvolatilesets | |
267 | $ hg perfwalk |
|
281 | $ hg perfwalk | |
268 | $ hg perfparents |
|
282 | $ hg perfparents | |
269 | $ hg perfdiscovery -q . |
|
283 | $ hg perfdiscovery -q . | |
270 |
|
284 | |||
271 | Test run control |
|
285 | Test run control | |
272 | ---------------- |
|
286 | ---------------- | |
273 |
|
287 | |||
274 | Simple single entry |
|
288 | Simple single entry | |
275 |
|
289 | |||
276 | $ hg perfparents --config perf.stub=no --config perf.run-limits='0.000000001-15' |
|
290 | $ hg perfparents --config perf.stub=no --config perf.run-limits='0.000000001-15' | |
277 | ! wall * comb * user * sys * (best of 15) (glob) |
|
291 | ! wall * comb * user * sys * (best of 15) (glob) | |
278 |
|
292 | |||
279 | Multiple entries |
|
293 | Multiple entries | |
280 |
|
294 | |||
281 | $ hg perfparents --config perf.stub=no --config perf.run-limits='500000-1, 0.000000001-5' |
|
295 | $ hg perfparents --config perf.stub=no --config perf.run-limits='500000-1, 0.000000001-5' | |
282 | ! wall * comb * user * sys * (best of 5) (glob) |
|
296 | ! wall * comb * user * sys * (best of 5) (glob) | |
283 |
|
297 | |||
284 | error case are ignored |
|
298 | error case are ignored | |
285 |
|
299 | |||
286 | $ hg perfparents --config perf.stub=no --config perf.run-limits='500, 0.000000001-5' |
|
300 | $ hg perfparents --config perf.stub=no --config perf.run-limits='500, 0.000000001-5' | |
287 | malformatted run limit entry, missing "-": 500 |
|
301 | malformatted run limit entry, missing "-": 500 | |
288 | ! wall * comb * user * sys * (best of 5) (glob) |
|
302 | ! wall * comb * user * sys * (best of 5) (glob) | |
289 | $ hg perfparents --config perf.stub=no --config perf.run-limits='aaa-12, 0.000000001-5' |
|
303 | $ hg perfparents --config perf.stub=no --config perf.run-limits='aaa-12, 0.000000001-5' | |
290 | malformatted run limit entry, could not convert string to float: aaa: aaa-12 (no-py3 !) |
|
304 | malformatted run limit entry, could not convert string to float: aaa: aaa-12 (no-py3 !) | |
291 | malformatted run limit entry, could not convert string to float: 'aaa': aaa-12 (py3 !) |
|
305 | malformatted run limit entry, could not convert string to float: 'aaa': aaa-12 (py3 !) | |
292 | ! wall * comb * user * sys * (best of 5) (glob) |
|
306 | ! wall * comb * user * sys * (best of 5) (glob) | |
293 | $ hg perfparents --config perf.stub=no --config perf.run-limits='12-aaaaaa, 0.000000001-5' |
|
307 | $ hg perfparents --config perf.stub=no --config perf.run-limits='12-aaaaaa, 0.000000001-5' | |
294 | malformatted run limit entry, invalid literal for int() with base 10: 'aaaaaa': 12-aaaaaa |
|
308 | malformatted run limit entry, invalid literal for int() with base 10: 'aaaaaa': 12-aaaaaa | |
295 | ! wall * comb * user * sys * (best of 5) (glob) |
|
309 | ! wall * comb * user * sys * (best of 5) (glob) | |
296 |
|
310 | |||
297 | test actual output |
|
311 | test actual output | |
298 | ------------------ |
|
312 | ------------------ | |
299 |
|
313 | |||
300 | normal output: |
|
314 | normal output: | |
301 |
|
315 | |||
302 | $ hg perfheads --config perf.stub=no |
|
316 | $ hg perfheads --config perf.stub=no | |
303 | ! wall * comb * user * sys * (best of *) (glob) |
|
317 | ! wall * comb * user * sys * (best of *) (glob) | |
304 |
|
318 | |||
305 | detailed output: |
|
319 | detailed output: | |
306 |
|
320 | |||
307 | $ hg perfheads --config perf.all-timing=yes --config perf.stub=no |
|
321 | $ hg perfheads --config perf.all-timing=yes --config perf.stub=no | |
308 | ! wall * comb * user * sys * (best of *) (glob) |
|
322 | ! wall * comb * user * sys * (best of *) (glob) | |
309 | ! wall * comb * user * sys * (max of *) (glob) |
|
323 | ! wall * comb * user * sys * (max of *) (glob) | |
310 | ! wall * comb * user * sys * (avg of *) (glob) |
|
324 | ! wall * comb * user * sys * (avg of *) (glob) | |
311 | ! wall * comb * user * sys * (median of *) (glob) |
|
325 | ! wall * comb * user * sys * (median of *) (glob) | |
312 |
|
326 | |||
313 | test json output |
|
327 | test json output | |
314 | ---------------- |
|
328 | ---------------- | |
315 |
|
329 | |||
316 | normal output: |
|
330 | normal output: | |
317 |
|
331 | |||
318 | $ hg perfheads --template json --config perf.stub=no |
|
332 | $ hg perfheads --template json --config perf.stub=no | |
319 | [ |
|
333 | [ | |
320 | { |
|
334 | { | |
321 | "comb": *, (glob) |
|
335 | "comb": *, (glob) | |
322 | "count": *, (glob) |
|
336 | "count": *, (glob) | |
323 | "sys": *, (glob) |
|
337 | "sys": *, (glob) | |
324 | "user": *, (glob) |
|
338 | "user": *, (glob) | |
325 | "wall": * (glob) |
|
339 | "wall": * (glob) | |
326 | } |
|
340 | } | |
327 | ] |
|
341 | ] | |
328 |
|
342 | |||
329 | detailed output: |
|
343 | detailed output: | |
330 |
|
344 | |||
331 | $ hg perfheads --template json --config perf.all-timing=yes --config perf.stub=no |
|
345 | $ hg perfheads --template json --config perf.all-timing=yes --config perf.stub=no | |
332 | [ |
|
346 | [ | |
333 | { |
|
347 | { | |
334 | "avg.comb": *, (glob) |
|
348 | "avg.comb": *, (glob) | |
335 | "avg.count": *, (glob) |
|
349 | "avg.count": *, (glob) | |
336 | "avg.sys": *, (glob) |
|
350 | "avg.sys": *, (glob) | |
337 | "avg.user": *, (glob) |
|
351 | "avg.user": *, (glob) | |
338 | "avg.wall": *, (glob) |
|
352 | "avg.wall": *, (glob) | |
339 | "comb": *, (glob) |
|
353 | "comb": *, (glob) | |
340 | "count": *, (glob) |
|
354 | "count": *, (glob) | |
341 | "max.comb": *, (glob) |
|
355 | "max.comb": *, (glob) | |
342 | "max.count": *, (glob) |
|
356 | "max.count": *, (glob) | |
343 | "max.sys": *, (glob) |
|
357 | "max.sys": *, (glob) | |
344 | "max.user": *, (glob) |
|
358 | "max.user": *, (glob) | |
345 | "max.wall": *, (glob) |
|
359 | "max.wall": *, (glob) | |
346 | "median.comb": *, (glob) |
|
360 | "median.comb": *, (glob) | |
347 | "median.count": *, (glob) |
|
361 | "median.count": *, (glob) | |
348 | "median.sys": *, (glob) |
|
362 | "median.sys": *, (glob) | |
349 | "median.user": *, (glob) |
|
363 | "median.user": *, (glob) | |
350 | "median.wall": *, (glob) |
|
364 | "median.wall": *, (glob) | |
351 | "sys": *, (glob) |
|
365 | "sys": *, (glob) | |
352 | "user": *, (glob) |
|
366 | "user": *, (glob) | |
353 | "wall": * (glob) |
|
367 | "wall": * (glob) | |
354 | } |
|
368 | } | |
355 | ] |
|
369 | ] | |
356 |
|
370 | |||
357 | Test pre-run feature |
|
371 | Test pre-run feature | |
358 | -------------------- |
|
372 | -------------------- | |
359 |
|
373 | |||
360 | (perf discovery has some spurious output) |
|
374 | (perf discovery has some spurious output) | |
361 |
|
375 | |||
362 | $ hg perfdiscovery . --config perf.stub=no --config perf.run-limits='0.000000001-1' --config perf.pre-run=0 |
|
376 | $ hg perfdiscovery . --config perf.stub=no --config perf.run-limits='0.000000001-1' --config perf.pre-run=0 | |
363 | ! wall * comb * user * sys * (best of 1) (glob) |
|
377 | ! wall * comb * user * sys * (best of 1) (glob) | |
364 | searching for changes |
|
378 | searching for changes | |
365 | $ hg perfdiscovery . --config perf.stub=no --config perf.run-limits='0.000000001-1' --config perf.pre-run=1 |
|
379 | $ hg perfdiscovery . --config perf.stub=no --config perf.run-limits='0.000000001-1' --config perf.pre-run=1 | |
366 | ! wall * comb * user * sys * (best of 1) (glob) |
|
380 | ! wall * comb * user * sys * (best of 1) (glob) | |
367 | searching for changes |
|
381 | searching for changes | |
368 | searching for changes |
|
382 | searching for changes | |
369 | $ hg perfdiscovery . --config perf.stub=no --config perf.run-limits='0.000000001-1' --config perf.pre-run=3 |
|
383 | $ hg perfdiscovery . --config perf.stub=no --config perf.run-limits='0.000000001-1' --config perf.pre-run=3 | |
370 | ! wall * comb * user * sys * (best of 1) (glob) |
|
384 | ! wall * comb * user * sys * (best of 1) (glob) | |
371 | searching for changes |
|
385 | searching for changes | |
372 | searching for changes |
|
386 | searching for changes | |
373 | searching for changes |
|
387 | searching for changes | |
374 | searching for changes |
|
388 | searching for changes | |
375 |
|
389 | |||
376 | test profile-benchmark option |
|
390 | test profile-benchmark option | |
377 | ------------------------------ |
|
391 | ------------------------------ | |
378 |
|
392 | |||
379 | Function to check that statprof ran |
|
393 | Function to check that statprof ran | |
380 | $ statprofran () { |
|
394 | $ statprofran () { | |
381 | > egrep 'Sample count:|No samples recorded' > /dev/null |
|
395 | > egrep 'Sample count:|No samples recorded' > /dev/null | |
382 | > } |
|
396 | > } | |
383 | $ hg perfdiscovery . --config perf.stub=no --config perf.run-limits='0.000000001-1' --config perf.profile-benchmark=yes 2>&1 | statprofran |
|
397 | $ hg perfdiscovery . --config perf.stub=no --config perf.run-limits='0.000000001-1' --config perf.profile-benchmark=yes 2>&1 | statprofran | |
384 |
|
398 | |||
385 | Check perf.py for historical portability |
|
399 | Check perf.py for historical portability | |
386 | ---------------------------------------- |
|
400 | ---------------------------------------- | |
387 |
|
401 | |||
388 | $ cd "$TESTDIR/.." |
|
402 | $ cd "$TESTDIR/.." | |
389 |
|
403 | |||
390 | $ (testrepohg files -r 1.2 glob:mercurial/*.c glob:mercurial/*.py; |
|
404 | $ (testrepohg files -r 1.2 glob:mercurial/*.c glob:mercurial/*.py; | |
391 | > testrepohg files -r tip glob:mercurial/*.c glob:mercurial/*.py) | |
|
405 | > testrepohg files -r tip glob:mercurial/*.c glob:mercurial/*.py) | | |
392 | > "$TESTDIR"/check-perf-code.py contrib/perf.py |
|
406 | > "$TESTDIR"/check-perf-code.py contrib/perf.py | |
393 | contrib/perf.py:\d+: (re) |
|
407 | contrib/perf.py:\d+: (re) | |
394 | > from mercurial import ( |
|
408 | > from mercurial import ( | |
395 | import newer module separately in try clause for early Mercurial |
|
409 | import newer module separately in try clause for early Mercurial | |
396 | contrib/perf.py:\d+: (re) |
|
410 | contrib/perf.py:\d+: (re) | |
397 | > from mercurial import ( |
|
411 | > from mercurial import ( | |
398 | import newer module separately in try clause for early Mercurial |
|
412 | import newer module separately in try clause for early Mercurial | |
399 | contrib/perf.py:\d+: (re) |
|
413 | contrib/perf.py:\d+: (re) | |
400 | > origindexpath = orig.opener.join(orig.indexfile) |
|
414 | > origindexpath = orig.opener.join(orig.indexfile) | |
401 | use getvfs()/getsvfs() for early Mercurial |
|
415 | use getvfs()/getsvfs() for early Mercurial | |
402 | contrib/perf.py:\d+: (re) |
|
416 | contrib/perf.py:\d+: (re) | |
403 | > origdatapath = orig.opener.join(orig.datafile) |
|
417 | > origdatapath = orig.opener.join(orig.datafile) | |
404 | use getvfs()/getsvfs() for early Mercurial |
|
418 | use getvfs()/getsvfs() for early Mercurial | |
405 | contrib/perf.py:\d+: (re) |
|
419 | contrib/perf.py:\d+: (re) | |
406 | > vfs = vfsmod.vfs(tmpdir) |
|
420 | > vfs = vfsmod.vfs(tmpdir) | |
407 | use getvfs()/getsvfs() for early Mercurial |
|
421 | use getvfs()/getsvfs() for early Mercurial | |
408 | contrib/perf.py:\d+: (re) |
|
422 | contrib/perf.py:\d+: (re) | |
409 | > vfs.options = getattr(orig.opener, 'options', None) |
|
423 | > vfs.options = getattr(orig.opener, 'options', None) | |
410 | use getvfs()/getsvfs() for early Mercurial |
|
424 | use getvfs()/getsvfs() for early Mercurial | |
411 | [1] |
|
425 | [1] |
General Comments 0
You need to be logged in to leave comments.
Login now