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:
Allison Vacanti
2021-03-18 18:05:42 -04:00
parent 95b3c459b8
commit 926c950419

View File

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