diff --git a/src/render.cpp b/src/render.cpp index 137a208..8cf1239 100644 --- a/src/render.cpp +++ b/src/render.cpp @@ -361,6 +361,7 @@ void update_and_render(Arena *arena, App_State &app, f32 delta_time_ms) ImGui::Text("TFile compression: %u", app.tfile_data.compression); ImGui::Text("Num pages: %lu", app.rndata.n_pages); ImGui::Text("Num elements: %lu", app.rndata.n_elems); + ImGui::Text("Num entries: %lu", app.rndata.n_entries); if (app.rndata.tot_page_uncomp_size) { ImGui::Text("Pages uncompressed size: %s (comp.ratio = %.3f)", to_pretty_size(scratch.arena, app.rndata.tot_page_uncomp_size).c(), diff --git a/src/rntuple.cpp b/src/rntuple.cpp index f93c696..d061acd 100644 --- a/src/rntuple.cpp +++ b/src/rntuple.cpp @@ -88,7 +88,8 @@ void gather_ntuple_metadata(Arena *arena, RMicroFileReader &reader, const RNTupl u64 n_pages = 0; u64 n_duplicate_page_ranges = 0; - u64 n_elems = 0; + u64 n_elems = 0; // total number of page elements + u64 n_entries = 0; u64 tot_page_comp_size = 0; Page_Info_Node *pinfo_head = nullptr, *pinfo_tail = nullptr; Page_Info_Node *last_inserted_pinfo = nullptr; @@ -106,6 +107,7 @@ void gather_ntuple_metadata(Arena *arena, RMicroFileReader &reader, const RNTupl // gather clusters and pages metadata for (const RClusterDescriptor &cluster_desc : descriptor.GetClusterIterable()) { ++n_clusters; + n_entries += cluster_desc.GetNEntries(); for (const RClusterDescriptor::RColumnRange &col_range : cluster_desc.GetColumnRangeIterable()) { const auto &col_descriptor = descriptor.GetColumnDescriptor(col_range.fPhysicalColumnId); @@ -304,6 +306,7 @@ void gather_ntuple_metadata(Arena *arena, RMicroFileReader &reader, const RNTupl rndata.tot_page_list_size = tot_page_list_size; rndata.clusters = clusters; rndata.n_clusters = n_clusters; + rndata.n_entries = n_entries; } internal diff --git a/src/rntuple.h b/src/rntuple.h index 58306cc..187b923 100644 --- a/src/rntuple.h +++ b/src/rntuple.h @@ -90,6 +90,8 @@ struct RNTuple_Data { Cluster_Info *clusters; u64 n_clusters; + // total number of entries of all clusters + u64 n_entries; Page_Info_Group *page_groups; u64 n_page_groups;