make the histogram take into account filtered zones

This commit is contained in:
Kristoffer 2023-05-01 13:14:16 +02:00
parent 6c5029af78
commit 73c83906b6
2 changed files with 9 additions and 0 deletions

View File

@ -458,6 +458,7 @@ private:
ImGuiTextFilter m_statisticsFilter;
ImGuiTextFilter m_statisticsImageFilter;
ImGuiTextFilter m_userTextFilter;
unordered_flat_set<Worker::ZoneThreadData*> m_filteredZones;
Region m_highlight;
Region m_highlightZoom;

View File

@ -543,6 +543,7 @@ void View::DrawFindZone()
{
auto& ev = zones[i];
if( ev.Zone()->End() > rangeMax || ev.Zone()->Start() < rangeMin ) continue;
if( m_filteredZones.contains(&ev) ) continue;
if( selGroup == GetSelectionTarget( ev, groupBy ) )
{
const auto ctx = m_worker.GetContextSwitchData( m_worker.DecompressThread( zones[i].Thread() ) );
@ -560,6 +561,7 @@ void View::DrawFindZone()
for( size_t i=m_findZone.selSortNum; i<m_findZone.sortedNum; i++ )
{
auto& ev = zones[i];
if( m_filteredZones.contains(&ev) ) continue;
if( selGroup == GetSelectionTarget( ev, groupBy ) )
{
const auto ctx = m_worker.GetContextSwitchData( m_worker.DecompressThread( zones[i].Thread() ) );
@ -581,6 +583,7 @@ void View::DrawFindZone()
{
auto& ev = zones[i];
if( ev.Zone()->End() > rangeMax || ev.Zone()->Start() < rangeMin ) continue;
if( m_filteredZones.contains(&ev) ) continue;
if( selGroup == GetSelectionTarget( ev, groupBy ) )
{
const auto t = ev.Zone()->End() - ev.Zone()->Start() - GetZoneChildTimeFast( *ev.Zone() );
@ -595,6 +598,7 @@ void View::DrawFindZone()
for( size_t i=m_findZone.selSortNum; i<m_findZone.sortedNum; i++ )
{
auto& ev = zones[i];
if( m_filteredZones.contains(&ev) ) continue;
if( selGroup == GetSelectionTarget( ev, groupBy ) )
{
const auto t = ev.Zone()->End() - ev.Zone()->Start() - GetZoneChildTimeFast( *ev.Zone() );
@ -613,6 +617,7 @@ void View::DrawFindZone()
{
auto& ev = zones[i];
if( ev.Zone()->End() > rangeMax || ev.Zone()->Start() < rangeMin ) continue;
if( m_filteredZones.contains(&ev) ) continue;
if( selGroup == GetSelectionTarget( ev, groupBy ) )
{
const auto t = ev.Zone()->End() - ev.Zone()->Start();
@ -627,6 +632,7 @@ void View::DrawFindZone()
for( size_t i=m_findZone.selSortNum; i<m_findZone.sortedNum; i++ )
{
auto& ev = zones[i];
if( m_filteredZones.contains(&ev) ) continue;
if( selGroup == GetSelectionTarget( ev, groupBy ) )
{
const auto t = ev.Zone()->End() - ev.Zone()->Start();
@ -1376,6 +1382,7 @@ void View::DrawFindZone()
ImGui::Separator();
if( filterChanged )
{
m_filteredZones.clear();
m_findZone.ResetGroups();
}
@ -1460,6 +1467,7 @@ void View::DrawFindZone()
}
if( !keep )
{
m_filteredZones.insert(&ev);
zptr++;
continue;
}