Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Display layout sizes: Also print number of user bins. #234

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/util/display_layout/sizes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,11 @@ struct per_level_stats
}
}

void print(std::ostream & stream) const
void print(std::ostream & stream, size_t const number_of_user_bins) const
{
stream << std::fixed << std::setprecision(2);
stream << "# Levels: " << number_of_levels << '\n';
stream << "# User bins: " << number_of_user_bins << '\n';
stream << "LEVEL\t" //
<< "BIT_SIZE\t" //
<< "IBFS\t" //
Expand Down Expand Up @@ -331,7 +332,7 @@ void execute_general_stats(config const & cfg)
if (!output_stream.good() || !output_stream.is_open())
throw std::logic_error{"Could not open file " + cfg.output.string() + " for reading"};

level_stats.print(output_stream);
level_stats.print(output_stream, hibf_layout.user_bins.size());
}

void execute_sizes(config const & cfg)
Expand Down