@@ -25,7 +25,8 @@ namespace {
25
25
26
26
struct ClusterInfo {
27
27
std::uint64_t fFirstEntry = 0 ;
28
- std::uint32_t fNPages = 0 ;
28
+ std::uint64_t fNPhysicalPages = 0 ;
29
+ std::uint64_t fNAliasedPages = 0 ;
29
30
std::uint32_t fNEntries = 0 ;
30
31
std::uint32_t fNBytesOnStorage = 0 ;
31
32
std::uint32_t fNBytesInMemory = 0 ;
@@ -40,7 +41,8 @@ struct ColumnInfo {
40
41
ROOT::DescriptorId_t fLogicalColumnId = 0 ;
41
42
ROOT::DescriptorId_t fFieldId = 0 ;
42
43
std::uint64_t fNElements = 0 ;
43
- std::uint64_t fNPages = 0 ;
44
+ std::uint64_t fNPhysicalPages = 0 ;
45
+ std::uint64_t fNAliasedPages = 0 ;
44
46
std::uint64_t fNBytesOnStorage = 0 ;
45
47
std::uint32_t fElementSize = 0 ;
46
48
std::uint32_t fColumnIndex = 0 ;
@@ -92,7 +94,8 @@ void ROOT::RNTupleDescriptor::PrintInfo(std::ostream &output) const
92
94
93
95
std::uint64_t nBytesOnStorage = 0 ;
94
96
std::uint64_t nBytesInMemory = 0 ;
95
- std::uint64_t nPages = 0 ;
97
+ std::uint64_t nPhysicalPages = 0 ;
98
+ std::uint64_t nAliasedPages = 0 ;
96
99
std::unordered_set<std::uint64_t > seenPages{};
97
100
int compression = -1 ;
98
101
for (const auto &column : fColumnDescriptors ) {
@@ -136,10 +139,14 @@ void ROOT::RNTupleDescriptor::PrintInfo(std::ostream &output) const
136
139
nBytesInMemory += page.GetNElements () * elementSize;
137
140
clusters[idx].fNBytesOnStorage += page.GetLocator ().GetNBytesOnStorage ();
138
141
clusters[idx].fNBytesInMemory += page.GetNElements () * elementSize;
139
- ++clusters[idx].fNPages ;
142
+ ++clusters[idx].fNPhysicalPages ;
140
143
info.fNBytesOnStorage += page.GetLocator ().GetNBytesOnStorage ();
141
- ++info.fNPages ;
142
- ++nPages;
144
+ ++info.fNPhysicalPages ;
145
+ ++nPhysicalPages;
146
+ } else {
147
+ ++clusters[idx].fNAliasedPages ;
148
+ ++info.fNAliasedPages ;
149
+ ++nAliasedPages;
143
150
}
144
151
}
145
152
}
@@ -155,7 +162,8 @@ void ROOT::RNTupleDescriptor::PrintInfo(std::ostream &output) const
155
162
output << " # Fields: " << GetNFields () << " \n " ;
156
163
output << " # Columns: " << GetNPhysicalColumns () << " \n " ;
157
164
output << " # Alias Columns: " << GetNLogicalColumns () - GetNPhysicalColumns () << " \n " ;
158
- output << " # Pages: " << nPages << " \n " ;
165
+ output << " # Physical Pages: " << nPhysicalPages << " \n " ;
166
+ output << " # Aliased Pages: " << nAliasedPages << " \n " ;
159
167
output << " # Clusters: " << GetNClusters () << " \n " ;
160
168
output << " Size on storage: " << nBytesOnStorage << " B" << " \n " ;
161
169
output << " Compression rate: " << std::fixed << std::setprecision (2 )
@@ -172,12 +180,13 @@ void ROOT::RNTupleDescriptor::PrintInfo(std::ostream &output) const
172
180
173
181
std::sort (clusters.begin (), clusters.end ());
174
182
for (unsigned int i = 0 ; i < clusters.size (); ++i) {
175
- output << " # " << std::setw (5 ) << i << " Entry range: [" << clusters[i].fFirstEntry << " .."
183
+ output << " # " << std::setw (5 ) << i << " Entry range: [" << clusters[i].fFirstEntry << " .."
176
184
<< clusters[i].fFirstEntry + clusters[i].fNEntries - 1 << " ] -- " << clusters[i].fNEntries << " \n " ;
177
- output << " " << " # Pages: " << clusters[i].fNPages << " \n " ;
178
- output << " " << " Size on storage: " << clusters[i].fNBytesOnStorage << " B\n " ;
179
- output << " " << " Compression: " << std::fixed << std::setprecision (2 );
180
- if (clusters[i].fNPages > 0 )
185
+ output << " " << " # Physical Pages: " << clusters[i].fNPhysicalPages << " \n " ;
186
+ output << " " << " # Aliased Pages: " << clusters[i].fNAliasedPages << " \n " ;
187
+ output << " " << " Size on storage: " << clusters[i].fNBytesOnStorage << " B\n " ;
188
+ output << " " << " Compression: " << std::fixed << std::setprecision (2 );
189
+ if (clusters[i].fNPhysicalPages > 0 )
181
190
output << float (clusters[i].fNBytesInMemory ) / float (float (clusters[i].fNBytesOnStorage )) << std::endl;
182
191
else
183
192
output << " N/A" << std::endl;
@@ -192,8 +201,8 @@ void ROOT::RNTupleDescriptor::PrintInfo(std::ostream &output) const
192
201
}
193
202
std::sort (columns.begin (), columns.end ());
194
203
for (const auto &col : columns) {
195
- auto avgPageSize = (col.fNPages == 0 ) ? 0 : (col.fNBytesOnStorage / col.fNPages );
196
- auto avgElementsPerPage = (col.fNPages == 0 ) ? 0 : (col.fNElements / col.fNPages );
204
+ auto avgPageSize = (col.fNPhysicalPages == 0 ) ? 0 : (col.fNBytesOnStorage / col.fNPhysicalPages );
205
+ auto avgElementsPerPage = (col.fNPhysicalPages == 0 ) ? 0 : (col.fNElements / col.fNPhysicalPages );
197
206
std::string nameAndType = std::string (" " ) + col.fFieldName + " [#" + std::to_string (col.fColumnIndex );
198
207
if (col.fRepresentationIndex > 0 )
199
208
nameAndType += " / R." + std::to_string (col.fRepresentationIndex );
@@ -205,12 +214,13 @@ void ROOT::RNTupleDescriptor::PrintInfo(std::ostream &output) const
205
214
if (!col.fFieldDescription .empty ())
206
215
output << " Description: " << col.fFieldDescription << " \n " ;
207
216
output << " # Elements: " << col.fNElements << " \n " ;
208
- output << " # Pages: " << col.fNPages << " \n " ;
217
+ output << " # Physical Pages: " << col.fNPhysicalPages << " \n " ;
218
+ output << " # Aliased Pages: " << col.fNAliasedPages << " \n " ;
209
219
output << " Avg elements / page: " << avgElementsPerPage << " \n " ;
210
220
output << " Avg page size: " << avgPageSize << " B\n " ;
211
221
output << " Size on storage: " << col.fNBytesOnStorage << " B\n " ;
212
222
output << " Compression: " << std::fixed << std::setprecision (2 );
213
- if (col.fNPages > 0 )
223
+ if (col.fNPhysicalPages > 0 )
214
224
output << float (col.fElementSize * col.fNElements ) / float (col.fNBytesOnStorage ) << std::endl;
215
225
else
216
226
output << " N/A" << std::endl;
0 commit comments