Also display non-user plot data count.

This commit is contained in:
Bartosz Taudul 2020-02-05 23:41:53 +01:00
parent 1bad607e6c
commit 7425cd7112
3 changed files with 17 additions and 1 deletions

View File

@ -11273,6 +11273,8 @@ void View::DrawInfo()
TextFocused( "GPU zones:", RealToString( m_worker.GetGpuZoneCount() ) ); TextFocused( "GPU zones:", RealToString( m_worker.GetGpuZoneCount() ) );
TextFocused( "Lock events:", RealToString( m_worker.GetLockCount() ) ); TextFocused( "Lock events:", RealToString( m_worker.GetLockCount() ) );
TextFocused( "Plot data points:", RealToString( m_worker.GetPlotCount() ) ); 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( "Memory allocations:", RealToString( m_worker.GetMemData().data.size() ) );
TextFocused( "Source locations:", RealToString( m_worker.GetSrcLocCount() ) ); TextFocused( "Source locations:", RealToString( m_worker.GetSrcLocCount() ) );
TextFocused( "Strings:", RealToString( m_worker.GetStringsCount() ) ); TextFocused( "Strings:", RealToString( m_worker.GetStringsCount() ) );

View File

@ -1697,7 +1697,20 @@ uint64_t Worker::GetPlotCount() const
uint64_t cnt = 0; uint64_t cnt = 0;
for( auto& p : m_data.plots.Data() ) 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(); cnt += p->data.size();
} }

View File

@ -332,6 +332,7 @@ public:
uint64_t GetGpuZoneCount() const { return m_data.gpuCnt; } uint64_t GetGpuZoneCount() const { return m_data.gpuCnt; }
uint64_t GetLockCount() const; uint64_t GetLockCount() const;
uint64_t GetPlotCount() const; uint64_t GetPlotCount() const;
uint64_t GetTracyPlotCount() const;
uint64_t GetContextSwitchCount() const; uint64_t GetContextSwitchCount() const;
uint64_t GetContextSwitchPerCpuCount() const; uint64_t GetContextSwitchPerCpuCount() const;
bool HasContextSwitches() const { return !m_data.ctxSwitch.empty(); } bool HasContextSwitches() const { return !m_data.ctxSwitch.empty(); }