Add lock, plot counts to worker.

This commit is contained in:
Bartosz Taudul 2018-08-08 19:21:53 +02:00
parent 237bb06dd6
commit a51da71fa4
2 changed files with 25 additions and 0 deletions

View File

@ -874,6 +874,29 @@ Worker::~Worker()
}
}
uint64_t Worker::GetLockCount() const
{
uint64_t cnt = 0;
for( auto& l : m_data.lockMap )
{
cnt += l.second.timeline.size();
}
return cnt;
}
uint64_t Worker::GetPlotCount() const
{
uint64_t cnt = 0;
for( auto& p : m_data.plots.Data() )
{
if( p->type != PlotType::Memory )
{
cnt += p->data.size();
}
}
return cnt;
}
int64_t Worker::GetFrameTime( const FrameData& fd, size_t idx ) const
{
if( fd.continuous )

View File

@ -182,6 +182,8 @@ public:
int64_t GetTimeBegin() const { return GetFrameBegin( *m_data.framesBase, 0 ); }
int64_t GetLastTime() const { return m_data.lastTime; }
uint64_t GetZoneCount() const { return m_data.zonesCnt; }
uint64_t GetLockCount() const;
uint64_t GetPlotCount() const;
uint64_t GetFrameOffset() const { return m_data.frameOffset; }
const FrameData* GetFramesBase() const { return m_data.framesBase; }
const Vector<FrameData*>& GetFrames() const { return m_data.frames.Data(); }