analyse: correct the percentage calculation scale

This commit is contained in:
Danny Robson 2020-12-06 09:00:35 +10:00
parent 139ed04b66
commit 8acdab8111

View File

@ -161,7 +161,7 @@ int main (int argc, char const **argv)
);
auto const duplicated_bytes = total_bytes - unique_bytes;
float const duplicated_fraction = float (duplicated_bytes) / total_bytes;
float const duplicated_fraction = 100.f * duplicated_bytes / total_bytes;
std::cout << duplicated_bytes << " duplicated bytes of " << total_bytes << " (" << duplicated_fraction << "%)\n";
std::cout << (src.elements.size () - unique.size ()) << " duplicates\n";