Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Taudul <wolf.pld@gmail.com>2019-08-14 18:55:01 +0300
committerBartosz Taudul <wolf.pld@gmail.com>2019-08-14 19:28:52 +0300
commit1ae540c7a1298a4cc423ea975cbe5b8c40c5ff86 (patch)
treeb19636d1dce84b27ade161d64ca8f0a19f1ddc16 /server/TracyView.cpp
parent858c94e12e79670eb37606e5732f88c12ace7d5a (diff)
Display zone running time in zone info window.
Diffstat (limited to 'server/TracyView.cpp')
-rw-r--r--server/TracyView.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/server/TracyView.cpp b/server/TracyView.cpp
index 2f6a5687..c50cfa66 100644
--- a/server/TracyView.cpp
+++ b/server/TracyView.cpp
@@ -4681,6 +4681,22 @@ void View::DrawZoneInfoWindow()
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 ) );
+ }
+ }
auto& mem = m_worker.GetMemData();
if( !mem.data.empty() )