Display total zone count.

This commit is contained in:
Bartosz Taudul 2017-09-25 23:38:49 +02:00
parent d797099076
commit 27e1952cc5
2 changed files with 4 additions and 1 deletions

View File

@ -26,6 +26,7 @@ View::View( const char* addr )
, m_shutdown( false )
, m_connected( false )
, m_hasData( false )
, m_zonesCnt( 0 )
, m_mbps( 64 )
, m_stream( LZ4_createStreamDecode() )
, m_buffer( new char[TargetFrameSize*3] )
@ -350,6 +351,7 @@ void View::AddThreadString( uint64_t id, std::string&& str )
void View::NewZone( Event* zone, uint64_t thread )
{
m_zonesCnt++;
Vector<Event*>* timeline;
auto it = m_threadMap.find( thread );
if( it == m_threadMap.end() )
@ -645,7 +647,7 @@ void View::DrawImpl()
ImGui::Begin( "Profiler", nullptr, ImGuiWindowFlags_ShowBorders );
if( ImGui::Button( m_pause ? "Resume" : "Pause", ImVec2( 80, 0 ) ) ) m_pause = !m_pause;
ImGui::SameLine();
ImGui::Text( "Frames: %-7" PRIu64 " Time span: %-10s View span: %s", m_frames.size(), TimeToString( GetLastTime() - m_frames[0] ), TimeToString( m_zvEnd - m_zvStart ) );
ImGui::Text( "Frames: %-7" PRIu64 " Time span: %-10s View span: %-10s Zones: %" PRIu64, m_frames.size(), TimeToString( GetLastTime() - m_frames[0] ), TimeToString( m_zvEnd - m_zvStart ), m_zonesCnt );
DrawFrames();
DrawZones();
ImGui::End();

View File

@ -91,6 +91,7 @@ private:
Vector<ThreadData> m_threads;
std::unordered_map<uint64_t, std::string> m_strings;
std::unordered_map<uint64_t, std::string> m_threadNames;
uint64_t m_zonesCnt;
std::mutex m_mbpslock;
std::vector<float> m_mbps;