1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 04:23:51 +00:00

Display average plot value.

This commit is contained in:
Bartosz Taudul 2021-10-17 13:05:10 +02:00
parent 0bd1364c2f
commit facd2be33b
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

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