Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion common/eventconsumption/eventindexplot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ bool CIndexPlotOp::visitEvent(CEvent& event)
break;
case EventIndexCacheMiss:
if (valueSelector == ValueSelector::CacheMisses)
cellValue = 1;
cellValue++;
break;
default:
break;
Expand Down Expand Up @@ -418,6 +418,7 @@ bool CIndexPlotOp::doXAxis(LinkChanges& linkChanges, size_t yAxisIdx)
// prepare for next iteration
cellIdx++;
linkChanges.pop_back();
postTraversalReset();
}
outputEOLN();

Expand Down
6 changes: 6 additions & 0 deletions common/eventconsumption/eventoperation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ const EventFileProperties& CEventConsumingOp::queryIteratorProperties()
return cachedSource->queryFileProperties();
}

void CEventConsumingOp::postTraversalReset()
{
metaState->clearAll();
cachedSource.clear();
}

bool CEventConsumingOp::traverseEvents(IEventVisitor& visitor)
{
// Ensure iterator is created and cached
Expand Down
5 changes: 5 additions & 0 deletions common/eventconsumption/eventoperation.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ class event_decl CEventConsumingOp : public CInterface
// For multiplexed sources, properties reflect aggregated/ambiguous values.
const EventFileProperties& queryIteratorProperties();

// Resets the operation state following an event traversal. To be invoked by subclasses
// that intend to traverse events multiple times, when those subclasses are finished with
// the current state.
virtual void postTraversalReset();

protected:
Owned<CMetaInfoState> metaState;
std::set<std::string> inputPaths;
Expand Down
Loading