diff options
author | Bartosz Taudul <wolf.pld@gmail.com> | 2019-08-14 18:59:28 +0300 |
---|---|---|
committer | Bartosz Taudul <wolf.pld@gmail.com> | 2019-08-14 19:28:52 +0300 |
commit | d520f1cc485c95d043aa8df1b4014095f996d9bd (patch) | |
tree | 5bbc0acbcd6ed5bf9bc407c2083e1fff103828e3 /server/TracyView.cpp | |
parent | 1ae540c7a1298a4cc423ea975cbe5b8c40c5ff86 (diff) |
Display zone running time in zone tooltip.
Diffstat (limited to 'server/TracyView.cpp')
-rw-r--r-- | server/TracyView.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/server/TracyView.cpp b/server/TracyView.cpp index c50cfa66..067bf195 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -11082,6 +11082,22 @@ void View::ZoneTooltip( const ZoneEvent& ev ) ImGui::SameLine(); ImGui::TextDisabled( "(%.2f%%)", 100.f * selftime / ztime ); } + const auto ctx = m_worker.GetContextSwitchData( tid ); + if( ctx ) + { + int64_t time; + uint64_t cnt; + if( GetZoneRunningTime( ctx, ev, time, cnt ) ) + { + TextFocused( "Running state time:", TimeToString( time ) ); + if( ztime != 0 ) + { + ImGui::SameLine(); + ImGui::TextDisabled( "(%.2f%%)", 100.f * time / ztime ); + } + TextFocused( "Running state regions:", RealToString( cnt, true ) ); + } + } if( ev.text.active ) { ImGui::NewLine(); |