From facd2be33b4cf7563413055ff1f4ccca2fde6226 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 17 Oct 2021 13:05:10 +0200 Subject: [PATCH] Display average plot value. --- server/TracyView.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index a718625f..20019743 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -6454,6 +6454,7 @@ int View::DrawPlots( int offset, double pxns, const ImVec2& wpos, bool hover, fl TextFocused( "Data range:", FormatPlotValue( v->max - v->min, v->format ) ); TextFocused( "Min value:", FormatPlotValue( v->min, v->format ) ); TextFocused( "Max value:", FormatPlotValue( v->max, v->format ) ); + TextFocused( "Avg value:", FormatPlotValue( v->sum / v->data.size(), v->format ) ); TextFocused( "Data/second:", RealToString( double( v->data.size() ) / activity * 1000000000ll ) ); const auto it = std::lower_bound( v->data.begin(), v->data.end(), last - 1000000000ll * 10, [] ( const auto& l, const auto& r ) { return l.time.Val() < r; } );