mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-29 16:54: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[] = {
|
static const ImWchar rangesBasic[] = {
|
||||||
0x0020, 0x00FF, // Basic Latin + Latin Supplement
|
0x0020, 0x00FF, // Basic Latin + Latin Supplement
|
||||||
0x03BC, 0x03BC, // micro
|
0x03BC, 0x03BC, // micro
|
||||||
|
0x03C3, 0x03C3, // small sigma
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
static const ImWchar rangesIcons[] = {
|
static const ImWchar rangesIcons[] = {
|
||||||
|
@ -6027,6 +6027,26 @@ void View::DrawFindZone()
|
|||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextFocused( "Median time:", TimeToString( m_findZone.median ) );
|
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:" );
|
TextDisabledUnformatted( "Selection range:" );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
Loading…
Reference in New Issue
Block a user