updated profiler timing display

This commit is contained in:
Turanszki Janos
2021-08-20 09:41:35 +02:00
parent f8c3a05478
commit d694ee1f03
2 changed files with 23 additions and 3 deletions
+22 -2
View File
@@ -242,29 +242,49 @@ namespace wiProfiler
{
if (x.second.IsCPURange())
{
if (x.first == cpu_frame)
continue;
time_cache_cpu[x.second.name].num_hits++;
time_cache_cpu[x.second.name].total_time += x.second.time;
}
else
{
if (x.first == gpu_frame)
continue;
time_cache_gpu[x.second.name].num_hits++;
time_cache_gpu[x.second.name].total_time += x.second.time;
}
}
// Print CPU ranges:
ss << ranges[cpu_frame].name << ": " << std::fixed << ranges[cpu_frame].time << " ms" << std::endl;
for (auto& x : time_cache_cpu)
{
ss << x.first << " (" << x.second.num_hits << "x)" << ": " << std::fixed << x.second.total_time << " ms" << std::endl;
if (x.second.num_hits > 1)
{
ss << "\t" << x.first << " (" << x.second.num_hits << "x)" << ": " << std::fixed << x.second.total_time << " ms" << std::endl;
}
else
{
ss << "\t" << x.first << ": " << std::fixed << x.second.total_time << " ms" << std::endl;
}
x.second.num_hits = 0;
x.second.total_time = 0;
}
ss << std::endl;
// Print GPU ranges:
ss << ranges[gpu_frame].name << ": " << std::fixed << ranges[gpu_frame].time << " ms" << std::endl;
for (auto& x : time_cache_gpu)
{
ss << x.first << " (" << x.second.num_hits << "x)" << ": " << std::fixed << x.second.total_time << " ms" << std::endl;
if (x.second.num_hits > 1)
{
ss << "\t" << x.first << " (" << x.second.num_hits << "x)" << ": " << std::fixed << x.second.total_time << " ms" << std::endl;
}
else
{
ss << "\t" << x.first << ": " << std::fixed << x.second.total_time << " ms" << std::endl;
}
x.second.num_hits = 0;
x.second.total_time = 0;
}
+1 -1
View File
@@ -9,7 +9,7 @@ namespace wiVersion
// minor features, major updates, breaking compatibility changes
const int minor = 56;
// minor bug fixes, alterations, refactors, updates
const int revision = 84;
const int revision = 85;
const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);