From 62162d4cdb6c8c803f84397c5c79d34373b83ef9 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 24 Feb 2019 16:06:31 +0100 Subject: [PATCH] Display count of messages and locks in thread tooltip. --- server/TracyView.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 58f325a8..a711f086 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -2091,12 +2091,14 @@ void View::DrawZones() first = std::min( first, v->messages.front()->time ); last = std::max( last, v->messages.back()->time ); } + size_t lockCnt = 0; for( const auto& lock : m_worker.GetLockMap() ) { const auto& lockmap = lock.second; if( !lockmap.valid ) continue; auto it = lockmap.threadMap.find( v->id ); if( it == lockmap.threadMap.end() ) continue; + lockCnt++; const auto thread = it->second; const auto threadBit = GetThreadBit( thread ); if( lockmap.type == LockType::Lockable ) @@ -2132,12 +2134,20 @@ void View::DrawZones() ImGui::TextDisabled( "(%.2f%%)", activity / double( traceLen ) * 100 ); } + ImGui::Separator(); if( !v->timeline.empty() ) { - ImGui::Separator(); TextFocused( "Zone count:", RealToString( v->count, true ) ); TextFocused( "Top-level zones:", RealToString( v->timeline.size(), true ) ); } + if( !v->messages.empty() ) + { + TextFocused( "Messages:", RealToString( v->messages.size(), true ) ); + } + if( lockCnt != 0 ) + { + TextFocused( "Locks:", RealToString( lockCnt, true ) ); + } ImGui::EndTooltip(); } }