diff --git a/profiler/src/profiler/TracyView.hpp b/profiler/src/profiler/TracyView.hpp index 5792b17f..272b1878 100644 --- a/profiler/src/profiler/TracyView.hpp +++ b/profiler/src/profiler/TracyView.hpp @@ -682,7 +682,7 @@ private: size_t sortedNum = 0, selSortNum, selSortActive; float average, selAverage; float median, selMedian; - float p75, p90; + float p75, p90, p99, p99_9; int64_t total, selTotal; int64_t selTime; bool drawAvgMed = true; @@ -728,6 +728,8 @@ private: median = 0; p75 = 0; p90 = 0; + p99 = 0; + p99_9 = 0; total = 0; tmin = std::numeric_limits::max(); tmax = std::numeric_limits::min(); diff --git a/profiler/src/profiler/TracyView_FindZone.cpp b/profiler/src/profiler/TracyView_FindZone.cpp index e00f6ede..57d76387 100644 --- a/profiler/src/profiler/TracyView_FindZone.cpp +++ b/profiler/src/profiler/TracyView_FindZone.cpp @@ -557,6 +557,8 @@ void View::DrawFindZone() m_findZone.median = vec[vsz/2]; m_findZone.p75 = vec[3 * (vsz / 4)]; m_findZone.p90 = vec[vsz / 10 * 9]; + m_findZone.p99 = vec[size_t(float(vsz * 0.99))]; + m_findZone.p99_9 = vec[size_t(float(vsz * 0.999))]; m_findZone.total = total; m_findZone.sortedNum = i; m_findZone.tmin = tmin; @@ -985,6 +987,14 @@ void View::DrawFindZone() ImGui::SameLine(); ImGui::Spacing(); ImGui::SameLine(); + TextFocused( "P99:", TimeToString( m_findZone.p99 ) ); + ImGui::SameLine(); + ImGui::Spacing(); + ImGui::SameLine(); + TextFocused( "P99.9:", TimeToString( m_findZone.p99_9 ) ); + ImGui::SameLine(); + ImGui::Spacing(); + ImGui::SameLine(); { int64_t t0, t1; if( m_findZone.logTime )