public static CounterAggregate calculateCounterAggregate ( Simon simon , SimonFilter filter ) { CounterAggregate aggregate = new CounterAggregate ( ) ; aggregateCounters ( aggregate , simon , filter != null ? filter : SimonFilter . ACCEPT_ALL_FILTER ) ; return aggregate ; }
Aggregate statistics from all counters in hierarchy that pass specified filter . Filter is applied to all simons in the hierarchy of all types . If a simon is rejected by filter its children are not considered . Simons are aggregated in the top - bottom fashion i . e . parent simons are aggregated before children .