Mercurial > hg
comparison tests/test-contrib-perf.t @ 27101:61fbf5dc12b2
test-contrib-perf: add smoke tests for perf.py
author | timeless <timeless@mozdev.org> |
---|---|
date | Tue, 24 Nov 2015 21:41:12 +0000 |
parents | |
children | 528cf1a73ae5 |
comparison
equal
deleted
inserted
replaced
27100:8d5dba93aa4f | 27101:61fbf5dc12b2 |
---|---|
1 #require test-repo slow | |
2 | |
3 Set vars: | |
4 | |
5 $ CONTRIBDIR="$TESTDIR/../contrib" | |
6 | |
7 Prepare repo-a: | |
8 | |
9 $ hg init repo-a | |
10 $ cd repo-a | |
11 | |
12 $ echo this is file a > a | |
13 $ hg add a | |
14 $ hg commit -m first | |
15 | |
16 $ echo adding to file a >> a | |
17 $ hg commit -m second | |
18 | |
19 $ echo adding more to file a >> a | |
20 $ hg commit -m third | |
21 | |
22 $ hg up -r 0 | |
23 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
24 $ echo merge-this >> a | |
25 $ hg commit -m merge-able | |
26 created new head | |
27 | |
28 $ hg up -r 2 | |
29 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
30 | |
31 perfstatus | |
32 | |
33 $ cat > .hg/hgrc << EOF | |
34 > [extensions] | |
35 > perfstatusext=$CONTRIBDIR/perf.py | |
36 > EOF | |
37 $ hg help perfstatusext | |
38 perfstatusext extension - helper extension to measure performance | |
39 | |
40 list of commands: | |
41 | |
42 perfaddremove | |
43 (no help text available) | |
44 perfancestors | |
45 (no help text available) | |
46 perfancestorset | |
47 (no help text available) | |
48 perfannotate (no help text available) | |
49 perfbranchmap | |
50 benchmark the update of a branchmap | |
51 perfcca (no help text available) | |
52 perfchangeset | |
53 (no help text available) | |
54 perfctxfiles (no help text available) | |
55 perfdiffwd Profile diff of working directory changes | |
56 perfdirfoldmap | |
57 (no help text available) | |
58 perfdirs (no help text available) | |
59 perfdirstate (no help text available) | |
60 perfdirstatedirs | |
61 (no help text available) | |
62 perfdirstatefoldmap | |
63 (no help text available) | |
64 perfdirstatewrite | |
65 (no help text available) | |
66 perffncacheencode | |
67 (no help text available) | |
68 perffncacheload | |
69 (no help text available) | |
70 perffncachewrite | |
71 (no help text available) | |
72 perfheads (no help text available) | |
73 perfindex (no help text available) | |
74 perfloadmarkers | |
75 benchmark the time to parse the on-disk markers for a repo | |
76 perflog (no help text available) | |
77 perflookup (no help text available) | |
78 perfmanifest (no help text available) | |
79 perfmergecalculate | |
80 (no help text available) | |
81 perfmoonwalk benchmark walking the changelog backwards | |
82 perfnodelookup | |
83 (no help text available) | |
84 perfparents (no help text available) | |
85 perfpathcopies | |
86 (no help text available) | |
87 perfrawfiles (no help text available) | |
88 perfrevlog (no help text available) | |
89 perfrevrange (no help text available) | |
90 perfrevset benchmark the execution time of a revset | |
91 perfstartup (no help text available) | |
92 perfstatus (no help text available) | |
93 perftags (no help text available) | |
94 perftemplating | |
95 (no help text available) | |
96 perfvolatilesets | |
97 benchmark the computation of various volatile set | |
98 perfwalk (no help text available) | |
99 | |
100 (use "hg help -v perfstatusext" to show built-in aliases and global options) | |
101 $ filter_perf_output () { | |
102 > egrep -v 'wall' || true | |
103 > } | |
104 $ hg perfaddremove 2>&1 | filter_perf_output | |
105 $ hg perfancestors 2>&1 | filter_perf_output | |
106 $ hg perfancestorset 2 2>&1 | filter_perf_output | |
107 $ hg perfannotate a 2>&1 | filter_perf_output | |
108 ! result: 3 | |
109 $ hg perfbranchmap 2>&1 | filter_perf_output | |
110 ! base | |
111 ! immutable | |
112 ! served | |
113 ! visible | |
114 ! None | |
115 $ hg perfcca 2>&1 | filter_perf_output | |
116 ! result: <mercurial.scmutil.casecollisionauditor object at 0x*> (glob) | |
117 $ hg perfchangeset 2 2>&1 | filter_perf_output | |
118 $ hg perfctxfiles 2 2>&1 | filter_perf_output | |
119 $ hg perfdiffwd 2>&1 | filter_perf_output | |
120 ! diffopts: none | |
121 ! diffopts: -w | |
122 ! diffopts: -b | |
123 ! diffopts: -B | |
124 ! diffopts: -wB | |
125 $ hg perfdirfoldmap 2>&1 | filter_perf_output | |
126 $ hg perfdirs 2>&1 | filter_perf_output | |
127 $ hg perfdirstate 2>&1 | filter_perf_output | |
128 $ hg perfdirstatedirs 2>&1 | filter_perf_output | |
129 $ hg perfdirstatefoldmap 2>&1 | filter_perf_output | |
130 $ hg perfdirstatewrite 2>&1 | filter_perf_output | |
131 $ hg perffncacheencode 2>&1 | filter_perf_output | |
132 $ hg perffncacheload 2>&1 | filter_perf_output | |
133 $ hg perffncachewrite 2>&1 | filter_perf_output | |
134 transaction abort! | |
135 rollback completed | |
136 $ hg perfheads 2>&1 | filter_perf_output | |
137 $ hg perfindex 2>&1 | filter_perf_output | |
138 $ hg perfloadmarkers 2>&1 | filter_perf_output | |
139 $ hg perflog 2>&1 | filter_perf_output | |
140 $ hg perflookup 2 2>&1 | filter_perf_output | |
141 ! result: 20 | |
142 $ hg perfmanifest 2 2>&1 | filter_perf_output | |
143 $ hg perfmergecalculate -r 3 2>&1 | filter_perf_output | |
144 $ hg perfmoonwalk 2>&1 | filter_perf_output | |
145 $ hg perfnodelookup 2 2>&1 | filter_perf_output | |
146 $ hg perfpathcopies 1 2 2>&1 | filter_perf_output | |
147 $ hg perfrawfiles 2 2>&1 | filter_perf_output | |
148 $ hg perfrevlog .hg/store/data/a.i 2>&1 | filter_perf_output | |
149 $ hg perfrevrange 2>&1 | filter_perf_output | |
150 $ hg perfrevset 'all()' 2>&1 | filter_perf_output | |
151 $ hg perfstartup 2>&1 | filter_perf_output | |
152 $ hg perfstatus 2>&1 | filter_perf_output | |
153 $ hg perftags 2>&1 | filter_perf_output | |
154 ! result: 1 | |
155 $ hg perftemplating 2>&1 | filter_perf_output | |
156 $ hg perfvolatilesets 2>&1 | filter_perf_output | |
157 ! bumped | |
158 ! divergent | |
159 ! extinct | |
160 ! obsolete | |
161 ! suspended | |
162 ! unstable | |
163 ! base | |
164 ! immutable | |
165 ! served | |
166 ! visible | |
167 $ hg perfwalk 2>&1 | filter_perf_output | |
168 ! result: 1 | |
169 | |
170 perf parents needs a bigger repo, use the main repo | |
171 $ hg perfparents \ | |
172 > --config extensions.perfstatusext=$CONTRIBDIR/perf.py \ | |
173 > -R $TESTDIR/.. 2>&1 |grep -v 'obsolete feature' | filter_perf_output | |
174 |