Add p99 and p99.9 stats

This commit is contained in:
Fouad Valadbeigi
2025-07-30 02:27:20 +02:00
parent 9d3c02686f
commit 9e754e61bc
2 changed files with 13 additions and 1 deletions

View File

@@ -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<int64_t>::max();
tmax = std::numeric_limits<int64_t>::min();

View File

@@ -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 )