From 7425cd7112f2cb71a2ee45f9e4bb25003411ae89 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 5 Feb 2020 23:41:53 +0100 Subject: [PATCH] Also display non-user plot data count. --- server/TracyView.cpp | 2 ++ server/TracyWorker.cpp | 15 ++++++++++++++- server/TracyWorker.hpp | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 9e27705a..816bbf72 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -11273,6 +11273,8 @@ void View::DrawInfo() TextFocused( "GPU zones:", RealToString( m_worker.GetGpuZoneCount() ) ); TextFocused( "Lock events:", RealToString( m_worker.GetLockCount() ) ); TextFocused( "Plot data points:", RealToString( m_worker.GetPlotCount() ) ); + ImGui::SameLine(); + TextFocused( "+", RealToString( m_worker.GetTracyPlotCount() ) ); TextFocused( "Memory allocations:", RealToString( m_worker.GetMemData().data.size() ) ); TextFocused( "Source locations:", RealToString( m_worker.GetSrcLocCount() ) ); TextFocused( "Strings:", RealToString( m_worker.GetStringsCount() ) ); diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 4ee823e0..29d9853c 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -1697,7 +1697,20 @@ uint64_t Worker::GetPlotCount() const uint64_t cnt = 0; for( auto& p : m_data.plots.Data() ) { - if( p->type != PlotType::Memory ) + if( p->type == PlotType::User ) + { + cnt += p->data.size(); + } + } + return cnt; +} + +uint64_t Worker::GetTracyPlotCount() const +{ + uint64_t cnt = 0; + for( auto& p : m_data.plots.Data() ) + { + if( p->type != PlotType::User ) { cnt += p->data.size(); } diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index d8d45b76..744ed0e2 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -332,6 +332,7 @@ public: uint64_t GetGpuZoneCount() const { return m_data.gpuCnt; } uint64_t GetLockCount() const; uint64_t GetPlotCount() const; + uint64_t GetTracyPlotCount() const; uint64_t GetContextSwitchCount() const; uint64_t GetContextSwitchPerCpuCount() const; bool HasContextSwitches() const { return !m_data.ctxSwitch.empty(); }