Skip to content

Commit

Permalink
Merge pull request #234 from smehringer/display_layout_print_user_bins
Browse files Browse the repository at this point in the history
[FEATURE] Display layout sizes: Also print number of user bins.
  • Loading branch information
smehringer authored Nov 28, 2023
2 parents 4b4fb96 + 1e3e7b3 commit 56966b0
Showing 1 changed file with 3 additions and 2 deletions.
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

0 comments on commit 56966b0

Please sign in to comment.