Examples of AggregatedDbusEventsTotalStats


Examples of com.linkedin.databus.core.monitoring.mbean.AggregatedDbusEventsTotalStats

      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);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.