Show relative time percentage in profiler output

This commit is contained in:
Nikita Lisitsa 2022-08-05 17:34:25 +03:00
parent 5afd76e214
commit 0a3df26873

View file

@ -102,7 +102,8 @@ namespace psemek::prof
<< " 25% " << pretty(stat.percentile(0.25)) << " 25% " << pretty(stat.percentile(0.25))
<< " 50% " << pretty(stat.percentile(0.50)) << " 50% " << pretty(stat.percentile(0.50))
<< " 75% " << pretty(stat.percentile(0.75)) << " 75% " << pretty(stat.percentile(0.75))
<< " (" << stat.count() << " calls, " << std::setprecision(3) << (stat.count() * 1.f / node.execution_time.count() * 1.f) << "x)"; << " (" << stat.count() << " calls, " << std::setprecision(3) << (stat.count() * 1.f / node.execution_time.count() * 1.f) << "x, "
<< std::setprecision(2) << (100.f * stat.count() * stat.mean() / node.execution_time.mean() / node.execution_time.count()) << "%)";
else else
log::info() << std::string(depth * 2, ' ') << std::setw(max_name_length + 3) << std::left << std::setfill(' ') << c.first log::info() << std::string(depth * 2, ' ') << std::setw(max_name_length + 3) << std::left << std::setfill(' ') << c.first
<< " avg " << pretty(stat.mean()) << " avg " << pretty(stat.mean())