show number of entries

This commit is contained in:
silverweed 2024-09-04 13:57:25 +02:00
parent b3620a4651
commit 526fbd42b3
3 changed files with 7 additions and 1 deletions

View file

@ -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(),

View file

@ -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

View file

@ -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;