Display standard deviation.

This commit is contained in:
Bartosz Taudul 2019-03-14 01:14:06 +01:00
parent d64f07f853
commit d3fdd6b1d1
2 changed files with 21 additions and 0 deletions

View File

@ -188,6 +188,7 @@ int main( int argc, char** argv )
static const ImWchar rangesBasic[] = {
0x0020, 0x00FF, // Basic Latin + Latin Supplement
0x03BC, 0x03BC, // micro
0x03C3, 0x03C3, // small sigma
0,
};
static const ImWchar rangesIcons[] = {

View File

@ -6027,6 +6027,26 @@ void View::DrawFindZone()
ImGui::Spacing();
ImGui::SameLine();
TextFocused( "Median time:", TimeToString( m_findZone.median ) );
if( m_findZone.sorted.size() > 1 )
{
const auto avg = m_findZone.average;
double ss = 0;
for( auto& v : m_findZone.sorted )
{
const auto d = double( v ) - avg;
ss += d*d;
}
const auto sd = sqrt( ss / ( m_findZone.sorted.size() - 1 ) );
ImGui::SameLine();
ImGui::Spacing();
ImGui::SameLine();
#ifdef TRACY_EXTENDED_FONT
TextFocused( "\xcf\x83:", TimeToString( sd ) );
#else
TextFocused( "s:", TimeToString( sd ) );
#endif
}
TextDisabledUnformatted( "Selection range:" );
ImGui::SameLine();