From d4bfbc279791ff494cf162d300fb8bfe4640ce68 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 5 Apr 2018 19:31:04 +0200 Subject: [PATCH] Allow displaying global statistics of a zone. --- server/TracyView.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 11450167..40637f0f 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -2411,6 +2411,8 @@ void View::DrawZoneInfoWindow() auto& ev = *m_zoneInfoWindow; int dmul = 1; + const auto& srcloc = m_worker.GetSourceLocation( ev.srcloc ); + bool show = true; ImGui::Begin( "Zone info", &show ); @@ -2427,11 +2429,15 @@ void View::DrawZoneInfoWindow() m_zoneInfoWindow = parent; } } + ImGui::SameLine(); + if( ImGui::Button( "Statistics" ) ) + { + m_findZone.ShowZone( ev.srcloc, m_worker.GetString( srcloc.name.active ? srcloc.name : srcloc.function ) ); + } ImGui::Separator(); const auto tid = GetZoneThread( ev ); - const auto& srcloc = m_worker.GetSourceLocation( ev.srcloc ); if( srcloc.name.active ) { ImGui::Text( "Zone name: %s", m_worker.GetString( srcloc.name ) );