1
1
# Test rewrite candidates heap with blob value sizes.
2
+ # Blob value sizes should not be included in the unreferenced data.
2
3
3
4
# Add backings with values in blob files.
4
5
add n=1 size=100 blobValueSize=50
@@ -50,7 +51,7 @@ add-table n=1 size=50 table=1
50
51
000003: size=150 refBlobValueSize=75 useCount=0 protectionCount=0 virtualizedSize=0 tables: []
51
52
000004: size=300 refBlobValueSize=150 useCount=0 protectionCount=0 virtualizedSize=0 tables: []
52
53
000005: size=250 refBlobValueSize=125 useCount=0 protectionCount=0 virtualizedSize=0 tables: []
53
- rewrite candidates heap: 000001(33.3 %)
54
+ rewrite candidates heap: 000001(50.0 %)
54
55
unused virtual backings: 000002 000003 000004 000005
55
56
56
57
add-table n=2 size=10 table=2
@@ -61,7 +62,7 @@ add-table n=2 size=10 table=2
61
62
000003: size=150 refBlobValueSize=75 useCount=0 protectionCount=0 virtualizedSize=0 tables: []
62
63
000004: size=300 refBlobValueSize=150 useCount=0 protectionCount=0 virtualizedSize=0 tables: []
63
64
000005: size=250 refBlobValueSize=125 useCount=0 protectionCount=0 virtualizedSize=0 tables: []
64
- rewrite candidates heap: 000002(3.3 %) 000001(33.3 %)
65
+ rewrite candidates heap: 000002(5.0 %) 000001(50.0 %)
65
66
unused virtual backings: 000003 000004 000005
66
67
67
68
add-table n=3 size=90 table=3
@@ -72,7 +73,7 @@ add-table n=3 size=90 table=3
72
73
000003: size=150 refBlobValueSize=75 useCount=1 protectionCount=0 virtualizedSize=90 tables: [000003]
73
74
000004: size=300 refBlobValueSize=150 useCount=0 protectionCount=0 virtualizedSize=0 tables: []
74
75
000005: size=250 refBlobValueSize=125 useCount=0 protectionCount=0 virtualizedSize=0 tables: []
75
- rewrite candidates heap: 000002(3.3 %) 000001(33.3 %) 000003(40 .0%)
76
+ rewrite candidates heap: 000002(5.0 %) 000001(50.0 %) 000003(60 .0%)
76
77
unused virtual backings: 000004 000005
77
78
78
79
add-table n=4 size=45 table=4
@@ -83,7 +84,7 @@ add-table n=4 size=45 table=4
83
84
000003: size=150 refBlobValueSize=75 useCount=1 protectionCount=0 virtualizedSize=90 tables: [000003]
84
85
000004: size=300 refBlobValueSize=150 useCount=1 protectionCount=0 virtualizedSize=45 tables: [000004]
85
86
000005: size=250 refBlobValueSize=125 useCount=0 protectionCount=0 virtualizedSize=0 tables: []
86
- rewrite candidates heap: 000002(3.3 %) 000004(10 .0%) 000003(40 .0%) 000001(33.3 %)
87
+ rewrite candidates heap: 000002(5.0 %) 000004(15 .0%) 000003(60 .0%) 000001(50.0 %)
87
88
unused virtual backings: 000005
88
89
89
90
add-table n=5 size=100 table=5
@@ -94,7 +95,7 @@ add-table n=5 size=100 table=5
94
95
000003: size=150 refBlobValueSize=75 useCount=1 protectionCount=0 virtualizedSize=90 tables: [000003]
95
96
000004: size=300 refBlobValueSize=150 useCount=1 protectionCount=0 virtualizedSize=45 tables: [000004]
96
97
000005: size=250 refBlobValueSize=125 useCount=1 protectionCount=0 virtualizedSize=100 tables: [000005]
97
- rewrite candidates heap: 000002(3.3 %) 000004(10 .0%) 000003(40 .0%) 000001(33.3 %) 000005(26.7 %)
98
+ rewrite candidates heap: 000002(5.0 %) 000004(15 .0%) 000003(60 .0%) 000001(50.0 %) 000005(40.0 %)
98
99
99
100
add-table n=2 size=80 table=6
100
101
----
@@ -104,7 +105,7 @@ add-table n=2 size=80 table=6
104
105
000003: size=150 refBlobValueSize=75 useCount=1 protectionCount=0 virtualizedSize=90 tables: [000003]
105
106
000004: size=300 refBlobValueSize=150 useCount=1 protectionCount=0 virtualizedSize=45 tables: [000004]
106
107
000005: size=250 refBlobValueSize=125 useCount=1 protectionCount=0 virtualizedSize=100 tables: [000005]
107
- rewrite candidates heap: 000004(10 .0%) 000005(26.7 %) 000003(40 .0%) 000001(33.3 %) 000002(30 .0%)
108
+ rewrite candidates heap: 000004(15 .0%) 000005(40.0 %) 000003(60 .0%) 000001(50.0 %) 000002(45 .0%)
108
109
109
110
# Remove some tables to demonstrate heap updates.
110
111
remove-table n=5 table=5
@@ -115,7 +116,7 @@ remove-table n=5 table=5
115
116
000003: size=150 refBlobValueSize=75 useCount=1 protectionCount=0 virtualizedSize=90 tables: [000003]
116
117
000004: size=300 refBlobValueSize=150 useCount=1 protectionCount=0 virtualizedSize=45 tables: [000004]
117
118
000005: size=250 refBlobValueSize=125 useCount=0 protectionCount=0 virtualizedSize=0 tables: []
118
- rewrite candidates heap: 000004(10 .0%) 000002(30 .0%) 000003(40 .0%) 000001(33.3 %)
119
+ rewrite candidates heap: 000004(15 .0%) 000002(45 .0%) 000003(60 .0%) 000001(50.0 %)
119
120
unused virtual backings: 000005
120
121
121
122
# Remove backing 4's table. Should remove from heap since virtualizedSize=0.
@@ -127,5 +128,5 @@ remove-table n=4 table=4
127
128
000003: size=150 refBlobValueSize=75 useCount=1 protectionCount=0 virtualizedSize=90 tables: [000003]
128
129
000004: size=300 refBlobValueSize=150 useCount=0 protectionCount=0 virtualizedSize=0 tables: []
129
130
000005: size=250 refBlobValueSize=125 useCount=0 protectionCount=0 virtualizedSize=0 tables: []
130
- rewrite candidates heap: 000002(30 .0%) 000001(33.3 %) 000003(40 .0%)
131
+ rewrite candidates heap: 000002(45 .0%) 000001(50.0 %) 000003(60 .0%)
131
132
unused virtual backings: 000004 000005
0 commit comments