##// END OF EJS Templates
test: generate the `test-sparse-revlog` artifact when slow-test is allowed...
marmoute -
r41970:090a4125 default
parent child Browse files
Show More
@@ -1,136 +1,148 b''
1 ====================================
1 ====================================
2 Test delta choice with sparse revlog
2 Test delta choice with sparse revlog
3 ====================================
3 ====================================
4
4
5 Sparse-revlog usually shows the most gain on Manifest. However, it is simpler
5 Sparse-revlog usually shows the most gain on Manifest. However, it is simpler
6 to general an appropriate file, so we test with a single file instead. The
6 to general an appropriate file, so we test with a single file instead. The
7 goal is to observe intermediate snapshot being created.
7 goal is to observe intermediate snapshot being created.
8
8
9 We need a large enough file. Part of the content needs to be replaced
9 We need a large enough file. Part of the content needs to be replaced
10 repeatedly while some of it changes rarely.
10 repeatedly while some of it changes rarely.
11
11
12 $ bundlepath="$TESTDIR/artifacts/cache/big-file-churn.hg"
12 $ bundlepath="$TESTDIR/artifacts/cache/big-file-churn.hg"
13
13
14 $ expectedhash=`cat "$bundlepath".md5`
14 $ expectedhash=`cat "$bundlepath".md5`
15
16 #if slow
17
18 $ if [ ! -f "$bundlepath" ]; then
19 > "$TESTDIR"/artifacts/scripts/generate-churning-bundle.py > /dev/null
20 > fi
21
22 #else
23
15 $ if [ ! -f "$bundlepath" ]; then
24 $ if [ ! -f "$bundlepath" ]; then
16 > echo 'skipped: missing artifact, run "'"$TESTDIR"'/artifacts/scripts/generate-churning-bundle.py"'
25 > echo 'skipped: missing artifact, run "'"$TESTDIR"'/artifacts/scripts/generate-churning-bundle.py"'
17 > exit 80
26 > exit 80
18 > fi
27 > fi
28
29 #endif
30
19 $ currenthash=`f -M "$bundlepath" | cut -d = -f 2`
31 $ currenthash=`f -M "$bundlepath" | cut -d = -f 2`
20 $ if [ "$currenthash" != "$expectedhash" ]; then
32 $ if [ "$currenthash" != "$expectedhash" ]; then
21 > echo 'skipped: outdated artifact, md5 "'"$currenthash"'" expected "'"$expectedhash"'" run "'"$TESTDIR"'/artifacts/scripts/generate-churning-bundle.py"'
33 > echo 'skipped: outdated artifact, md5 "'"$currenthash"'" expected "'"$expectedhash"'" run "'"$TESTDIR"'/artifacts/scripts/generate-churning-bundle.py"'
22 > exit 80
34 > exit 80
23 > fi
35 > fi
24
36
25 $ cat >> $HGRCPATH << EOF
37 $ cat >> $HGRCPATH << EOF
26 > [format]
38 > [format]
27 > sparse-revlog = yes
39 > sparse-revlog = yes
28 > maxchainlen = 15
40 > maxchainlen = 15
29 > [storage]
41 > [storage]
30 > revlog.optimize-delta-parent-choice = yes
42 > revlog.optimize-delta-parent-choice = yes
31 > [format]
43 > [format]
32 > generaldelta = yes
44 > generaldelta = yes
33 > EOF
45 > EOF
34 $ hg init sparse-repo
46 $ hg init sparse-repo
35 $ cd sparse-repo
47 $ cd sparse-repo
36 $ hg unbundle $bundlepath
48 $ hg unbundle $bundlepath
37 adding changesets
49 adding changesets
38 adding manifests
50 adding manifests
39 adding file changes
51 adding file changes
40 added 5001 changesets with 5001 changes to 1 files (+89 heads)
52 added 5001 changesets with 5001 changes to 1 files (+89 heads)
41 new changesets 9706f5af64f4:d9032adc8114 (5001 drafts)
53 new changesets 9706f5af64f4:d9032adc8114 (5001 drafts)
42 (run 'hg heads' to see heads, 'hg merge' to merge)
54 (run 'hg heads' to see heads, 'hg merge' to merge)
43 $ hg up
55 $ hg up
44 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
56 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
45 updated to "d9032adc8114: commit #5000"
57 updated to "d9032adc8114: commit #5000"
46 89 other heads for branch "default"
58 89 other heads for branch "default"
47
59
48 $ hg log --stat -r 0:3
60 $ hg log --stat -r 0:3
49 changeset: 0:9706f5af64f4
61 changeset: 0:9706f5af64f4
50 user: test
62 user: test
51 date: Thu Jan 01 00:00:00 1970 +0000
63 date: Thu Jan 01 00:00:00 1970 +0000
52 summary: initial commit
64 summary: initial commit
53
65
54 SPARSE-REVLOG-TEST-FILE | 10500 ++++++++++++++++++++++++++++++++++++++++++++++
66 SPARSE-REVLOG-TEST-FILE | 10500 ++++++++++++++++++++++++++++++++++++++++++++++
55 1 files changed, 10500 insertions(+), 0 deletions(-)
67 1 files changed, 10500 insertions(+), 0 deletions(-)
56
68
57 changeset: 1:724907deaa5e
69 changeset: 1:724907deaa5e
58 user: test
70 user: test
59 date: Thu Jan 01 00:00:00 1970 +0000
71 date: Thu Jan 01 00:00:00 1970 +0000
60 summary: commit #1
72 summary: commit #1
61
73
62 SPARSE-REVLOG-TEST-FILE | 1068 +++++++++++++++++++++++-----------------------
74 SPARSE-REVLOG-TEST-FILE | 1068 +++++++++++++++++++++++-----------------------
63 1 files changed, 534 insertions(+), 534 deletions(-)
75 1 files changed, 534 insertions(+), 534 deletions(-)
64
76
65 changeset: 2:62c41bce3e5d
77 changeset: 2:62c41bce3e5d
66 user: test
78 user: test
67 date: Thu Jan 01 00:00:00 1970 +0000
79 date: Thu Jan 01 00:00:00 1970 +0000
68 summary: commit #2
80 summary: commit #2
69
81
70 SPARSE-REVLOG-TEST-FILE | 1068 +++++++++++++++++++++++-----------------------
82 SPARSE-REVLOG-TEST-FILE | 1068 +++++++++++++++++++++++-----------------------
71 1 files changed, 534 insertions(+), 534 deletions(-)
83 1 files changed, 534 insertions(+), 534 deletions(-)
72
84
73 changeset: 3:348a9cbd6959
85 changeset: 3:348a9cbd6959
74 user: test
86 user: test
75 date: Thu Jan 01 00:00:00 1970 +0000
87 date: Thu Jan 01 00:00:00 1970 +0000
76 summary: commit #3
88 summary: commit #3
77
89
78 SPARSE-REVLOG-TEST-FILE | 1068 +++++++++++++++++++++++-----------------------
90 SPARSE-REVLOG-TEST-FILE | 1068 +++++++++++++++++++++++-----------------------
79 1 files changed, 534 insertions(+), 534 deletions(-)
91 1 files changed, 534 insertions(+), 534 deletions(-)
80
92
81
93
82 $ f -s .hg/store/data/*.d
94 $ f -s .hg/store/data/*.d
83 .hg/store/data/_s_p_a_r_s_e-_r_e_v_l_o_g-_t_e_s_t-_f_i_l_e.d: size=63327412
95 .hg/store/data/_s_p_a_r_s_e-_r_e_v_l_o_g-_t_e_s_t-_f_i_l_e.d: size=63327412
84 $ hg debugrevlog *
96 $ hg debugrevlog *
85 format : 1
97 format : 1
86 flags : generaldelta
98 flags : generaldelta
87
99
88 revisions : 5001
100 revisions : 5001
89 merges : 625 (12.50%)
101 merges : 625 (12.50%)
90 normal : 4376 (87.50%)
102 normal : 4376 (87.50%)
91 revisions : 5001
103 revisions : 5001
92 empty : 0 ( 0.00%)
104 empty : 0 ( 0.00%)
93 text : 0 (100.00%)
105 text : 0 (100.00%)
94 delta : 0 (100.00%)
106 delta : 0 (100.00%)
95 snapshot : 383 ( 7.66%)
107 snapshot : 383 ( 7.66%)
96 lvl-0 : 3 ( 0.06%)
108 lvl-0 : 3 ( 0.06%)
97 lvl-1 : 20 ( 0.40%)
109 lvl-1 : 20 ( 0.40%)
98 lvl-2 : 68 ( 1.36%)
110 lvl-2 : 68 ( 1.36%)
99 lvl-3 : 112 ( 2.24%)
111 lvl-3 : 112 ( 2.24%)
100 lvl-4 : 180 ( 3.60%)
112 lvl-4 : 180 ( 3.60%)
101 deltas : 4618 (92.34%)
113 deltas : 4618 (92.34%)
102 revision size : 63327412
114 revision size : 63327412
103 snapshot : 9886710 (15.61%)
115 snapshot : 9886710 (15.61%)
104 lvl-0 : 603104 ( 0.95%)
116 lvl-0 : 603104 ( 0.95%)
105 lvl-1 : 1559991 ( 2.46%)
117 lvl-1 : 1559991 ( 2.46%)
106 lvl-2 : 2295592 ( 3.62%)
118 lvl-2 : 2295592 ( 3.62%)
107 lvl-3 : 2531199 ( 4.00%)
119 lvl-3 : 2531199 ( 4.00%)
108 lvl-4 : 2896824 ( 4.57%)
120 lvl-4 : 2896824 ( 4.57%)
109 deltas : 53440702 (84.39%)
121 deltas : 53440702 (84.39%)
110
122
111 chunks : 5001
123 chunks : 5001
112 0x78 (x) : 5001 (100.00%)
124 0x78 (x) : 5001 (100.00%)
113 chunks size : 63327412
125 chunks size : 63327412
114 0x78 (x) : 63327412 (100.00%)
126 0x78 (x) : 63327412 (100.00%)
115
127
116 avg chain length : 9
128 avg chain length : 9
117 max chain length : 15
129 max chain length : 15
118 max chain reach : 28248745
130 max chain reach : 28248745
119 compression ratio : 27
131 compression ratio : 27
120
132
121 uncompressed data size (min/max/avg) : 346468 / 346472 / 346471
133 uncompressed data size (min/max/avg) : 346468 / 346472 / 346471
122 full revision size (min/max/avg) : 201008 / 201050 / 201034
134 full revision size (min/max/avg) : 201008 / 201050 / 201034
123 inter-snapshot size (min/max/avg) : 11596 / 168150 / 24430
135 inter-snapshot size (min/max/avg) : 11596 / 168150 / 24430
124 level-1 (min/max/avg) : 16653 / 168150 / 77999
136 level-1 (min/max/avg) : 16653 / 168150 / 77999
125 level-2 (min/max/avg) : 12951 / 85595 / 33758
137 level-2 (min/max/avg) : 12951 / 85595 / 33758
126 level-3 (min/max/avg) : 11608 / 43029 / 22599
138 level-3 (min/max/avg) : 11608 / 43029 / 22599
127 level-4 (min/max/avg) : 11596 / 21632 / 16093
139 level-4 (min/max/avg) : 11596 / 21632 / 16093
128 delta size (min/max/avg) : 10649 / 107163 / 11572
140 delta size (min/max/avg) : 10649 / 107163 / 11572
129
141
130 deltas against prev : 3910 (84.67%)
142 deltas against prev : 3910 (84.67%)
131 where prev = p1 : 3910 (100.00%)
143 where prev = p1 : 3910 (100.00%)
132 where prev = p2 : 0 ( 0.00%)
144 where prev = p2 : 0 ( 0.00%)
133 other : 0 ( 0.00%)
145 other : 0 ( 0.00%)
134 deltas against p1 : 648 (14.03%)
146 deltas against p1 : 648 (14.03%)
135 deltas against p2 : 60 ( 1.30%)
147 deltas against p2 : 60 ( 1.30%)
136 deltas against other : 0 ( 0.00%)
148 deltas against other : 0 ( 0.00%)
General Comments 0
You need to be logged in to leave comments. Login now