Allow displaying global statistics of a zone.

This commit is contained in:
Bartosz Taudul 2018-04-05 19:31:04 +02:00
parent 093787b3e8
commit d4bfbc2797

View File

@ -2411,6 +2411,8 @@ void View::DrawZoneInfoWindow()
auto& ev = *m_zoneInfoWindow;
int dmul = 1;
const auto& srcloc = m_worker.GetSourceLocation( ev.srcloc );
bool show = true;
ImGui::Begin( "Zone info", &show );
@ -2427,11 +2429,15 @@ void View::DrawZoneInfoWindow()
m_zoneInfoWindow = parent;
}
}
ImGui::SameLine();
if( ImGui::Button( "Statistics" ) )
{
m_findZone.ShowZone( ev.srcloc, m_worker.GetString( srcloc.name.active ? srcloc.name : srcloc.function ) );
}
ImGui::Separator();
const auto tid = GetZoneThread( ev );
const auto& srcloc = m_worker.GetSourceLocation( ev.srcloc );
if( srcloc.name.active )
{
ImGui::Text( "Zone name: %s", m_worker.GetString( srcloc.name ) );