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

Function countNodeGroupPages

src/function/table/disk_size_info.cpp:101–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101static uint64_t countNodeGroupPages(NodeGroup* nodeGroup) {
102 uint64_t pages = 0;
103 auto numChunks = nodeGroup->getNumChunkedGroups();
104 for (auto chunkIdx = 0ul; chunkIdx < numChunks; chunkIdx++) {
105 pages += countChunkedGroupPages(nodeGroup->getChunkedNodeGroup(chunkIdx));
106 }
107 if (nodeGroup->getFormat() == NodeGroupDataFormat::CSR) {
108 auto& csrNodeGroup = nodeGroup->cast<CSRNodeGroup>();
109 auto persistentChunk = csrNodeGroup.getPersistentChunkedGroup();
110 if (persistentChunk) {
111 pages += countChunkedGroupPages(persistentChunk);
112 }
113 }
114 return pages;
115}
116
117struct DiskSizeEntry {
118 std::string category;

Callers 1

collectDiskSizeInfoFunction · 0.85

Calls 5

countChunkedGroupPagesFunction · 0.85
getNumChunkedGroupsMethod · 0.80
getChunkedNodeGroupMethod · 0.80
getFormatMethod · 0.45

Tested by

no test coverage detected