MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / countChunkedGroupPages

Function countChunkedGroupPages

src/function/table/disk_size_info.cpp:81–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81static uint64_t countChunkedGroupPages(ChunkedNodeGroup* chunkedGroup) {
82 uint64_t pages = 0;
83 auto numColumns = chunkedGroup->getNumColumns();
84 for (auto i = 0u; i < numColumns; i++) {
85 for (auto* segment : chunkedGroup->getColumnChunk(i).getSegments()) {
86 pages += countChunkDataPages(*segment);
87 }
88 }
89 if (chunkedGroup->getFormat() == NodeGroupDataFormat::CSR) {
90 auto& chunkedCSRGroup = chunkedGroup->cast<ChunkedCSRNodeGroup>();
91 for (auto* segment : chunkedCSRGroup.getCSRHeader().offset->getSegments()) {
92 pages += countChunkDataPages(*segment);
93 }
94 for (auto* segment : chunkedCSRGroup.getCSRHeader().length->getSegments()) {
95 pages += countChunkDataPages(*segment);
96 }
97 }
98 return pages;
99}
100
101static uint64_t countNodeGroupPages(NodeGroup* nodeGroup) {
102 uint64_t pages = 0;

Callers 1

countNodeGroupPagesFunction · 0.85

Calls 4

countChunkDataPagesFunction · 0.85
getSegmentsMethod · 0.80
getNumColumnsMethod · 0.45
getFormatMethod · 0.45

Tested by

no test coverage detected