Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Percentiles p75, p90 for FindZone view #926

Merged
merged 2 commits into from
Nov 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions profiler/src/profiler/TracyView.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,7 @@ class View
size_t sortedNum = 0, selSortNum, selSortActive;
float average, selAverage;
float median, selMedian;
float p75, p90;
int64_t total, selTotal;
int64_t selTime;
bool drawAvgMed = true;
Expand Down Expand Up @@ -710,6 +711,8 @@ class View
sortedNum = 0;
average = 0;
median = 0;
p75 = 0;
p90 = 0;
total = 0;
tmin = std::numeric_limits<int64_t>::max();
tmax = std::numeric_limits<int64_t>::min();
Expand Down
8 changes: 8 additions & 0 deletions profiler/src/profiler/TracyView_FindZone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,8 @@ void View::DrawFindZone()
{
m_findZone.average = float( total ) / vsz;
m_findZone.median = vec[vsz/2];
m_findZone.p75 = vec[3 * (vsz / 4)];
m_findZone.p90 = vec[vsz / 10 * 9];
m_findZone.total = total;
m_findZone.sortedNum = i;
m_findZone.tmin = tmin;
Expand Down Expand Up @@ -972,6 +974,12 @@ void View::DrawFindZone()
TextFocused( "Median:", TimeToString( m_findZone.median ) );
ImGui::SameLine();
ImGui::Spacing();
TextFocused( "P75:", TimeToString( m_findZone.p75 ) );
ImGui::SameLine();
ImGui::Spacing();
TextFocused( "P90:", TimeToString( m_findZone.p90 ) );
ImGui::SameLine();
ImGui::Spacing();
ImGui::SameLine();
{
int64_t t0, t1;
Expand Down
Loading