mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-25 23:44:35 +00:00
Display standard deviation.
This commit is contained in:
parent
d64f07f853
commit
d3fdd6b1d1
@ -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[] = {
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user