agg.halt();
aggThread.interrupt();
//final tally aggregatedEventTotalStats = sum of all individual statsWriter objects in a thread free way
AggregatedDbusEventsTotalStats myTotalStats = new AggregatedDbusEventsTotalStats(StatsWriter.OWNERID, "mytotal", true, false, null);
for (DbusEventsStatisticsCollector s:eventStatsCollectors.getStatsCollectors())
{
DbusEventsTotalStats writerStat = s.getTotalStats();
//obviously - we assume this is correct here. we want to check that the updates happen correctly in a concurrent setting
myTotalStats.mergeStats(writerStat);
}
LOG.info("global = " + globalStats.getNumDataEvents() + " Sigma writers=" + myTotalStats.getNumDataEvents());
Assert.assertEquals("NumDataEvents mismatch for n = " + n,
globalStats.getNumDataEvents(),
myTotalStats.getNumDataEvents());
Assert.assertEquals("MaxSeenWinScn mismatch for n = " + n,
globalStats.getMaxSeenWinScn(),
myTotalStats.getMaxSeenWinScn());
}
catch (InterruptedException e)
{
Assert.assertTrue(false);
}