mirror of
https://github.com/NVIDIA/nvbench.git
synced 2026-04-20 14:58:54 +00:00
Update item rate formatting.
The number of items per second can go very high when using thrust fancy iterators -- some of the reduction benchmarks are handling >10^15 items/sec. Updated the table to go to petaitems/sec, and switched from k,m,b,t abbreviations to metric K, M, G, T, P.
This commit is contained in:
@@ -389,17 +389,25 @@ std::string markdown_printer::do_format_duration(const summary &data)
|
||||
std::string markdown_printer::do_format_item_rate(const summary &data)
|
||||
{
|
||||
const auto items_per_second = data.get_float64("value");
|
||||
if (items_per_second >= 1e15)
|
||||
{
|
||||
return fmt::format("{:0.3f}P", items_per_second * 1e-15);
|
||||
}
|
||||
if (items_per_second >= 1e12)
|
||||
{
|
||||
return fmt::format("{:0.3f}T", items_per_second * 1e-12);
|
||||
}
|
||||
if (items_per_second >= 1e9)
|
||||
{
|
||||
return fmt::format("{:0.3f}b", items_per_second * 1e-9);
|
||||
return fmt::format("{:0.3f}G", items_per_second * 1e-9);
|
||||
}
|
||||
else if (items_per_second >= 1e6)
|
||||
{
|
||||
return fmt::format("{:0.3f}m", items_per_second * 1e-6);
|
||||
return fmt::format("{:0.3f}M", items_per_second * 1e-6);
|
||||
}
|
||||
else if (items_per_second >= 1e3)
|
||||
{
|
||||
return fmt::format("{:0.3f}k", items_per_second * 1e-3);
|
||||
return fmt::format("{:0.3f}K", items_per_second * 1e-3);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user