Package com.linkedin.databus.core.monitoring.mbean

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


  void runAggregateTestStats(int n)
  {
    try
    {
      DbusEventsStatisticsCollector aggregateEventStatsCollectors =
          new AggregatedDbusEventsStatisticsCollector(0, "eventsInbound", true, true, null);

      //collection of n+1 stats collectors;
      StatsCollectors<DbusEventsStatisticsCollector> eventStatsCollectors =
          new StatsCollectors<DbusEventsStatisticsCollector>(aggregateEventStatsCollectors);

      //add new individual stats collectors
      int maxEventsInWindow=10;
      StatsWriter[] nStatsWriters = createStatsWriters(n, maxEventsInWindow);
      for (StatsWriter sw : nStatsWriters)
      {
        eventStatsCollectors.addStatsCollector(sw.getStatsName(), sw.getEventsStatsCollector());
      }

      //aggregator thread; 250 ms poll time
      GlobalStatsCalc agg = new GlobalStatsCalc(10);
      agg.registerStatsCollector(eventStatsCollectors);
      Thread aggThread = new Thread(agg);
      aggThread.start();

      //start writers
      for (StatsWriter sw : nStatsWriters)
      {
        sw.start();
      }

      //Let the writers start
      Thread.sleep(1000);

      long startTimeMs = System.currentTimeMillis();
      long durationInMs = 5*1000; //5s
      DbusEventsTotalStats globalStats = aggregateEventStatsCollectors.getTotalStats();
      long prevValue = 0, prevSize =0;
      while (System.currentTimeMillis() < (startTimeMs+durationInMs))
      {
        //constraint checks;

View Full Code Here


    _eventFactory = new DbusEventV2Factory(byteOrder);

    _clientStaticConfig = config;

    _bootstrapEventsStatsCollector = new AggregatedDbusEventsStatisticsCollector(getContainerStaticConfig().getId(),
                                                         "eventsBootstrap",
                                                         true,
                                                         true,
                                                         getMbeanServer());
    //create a meta collector across physical sources ; pass in existing collector for backward compat
View Full Code Here

                             runtimeConfig.getDefaultExecutor().getKeepAliveMs(),
                             TimeUnit.MILLISECONDS,
                             new NamedThreadFactory("worker" + _containerStaticConfig.getId()));

   _containerStatsCollector = _containerStaticConfig.getOrCreateContainerStatsCollector();
    DbusEventsStatisticsCollector inboundEventStatisticsCollector = new AggregatedDbusEventsStatisticsCollector(getContainerStaticConfig().getId(),
                                                        "eventsInbound",
                                                        true,
                                                        true,
                                                        getMbeanServer());

    DbusEventsStatisticsCollector outboundEventStatisticsCollector = new AggregatedDbusEventsStatisticsCollector(getContainerStaticConfig().getId(),
                                                        "eventsOutbound",
                                                        true,
                                                        true,
                                                        getMbeanServer());
View Full Code Here

                               new UnifiedClientStatsEvent());
    _relayCallbackStatsMerger = new StatsCollectors<ConsumerCallbackStats>(relayConsumerStats);
    _bootstrapCallbackStatsMerger = new StatsCollectors<ConsumerCallbackStats>(bootstrapConsumerStats);
    _unifiedClientStatsMerger = new StatsCollectors<UnifiedClientStats>(unifiedClientStats);
    _relayEventStatsMerger = new StatsCollectors<DbusEventsStatisticsCollector>(
        new AggregatedDbusEventsStatisticsCollector(ownerId, regId + ".inbound", true, false, mbeanServer));
    _bootstrapEventStatsMerger = new StatsCollectors<DbusEventsStatisticsCollector>(
        new AggregatedDbusEventsStatisticsCollector(ownerId, regId + ".inbound.bs", true, false, mbeanServer));

    if (null != _client)
    {
      _client.getBootstrapEventsStats().addStatsCollector(
          regId, _bootstrapEventStatsMerger.getStatsCollector());
View Full Code Here

     batchReading(srcIds, 3);
  }

  private StatsCollectors<DbusEventsStatisticsCollector> createStats(String[] pNames)
  {
    DbusEventsStatisticsCollector stats = new AggregatedDbusEventsStatisticsCollector(1, "test", true, true,
              null);
    StatsCollectors<DbusEventsStatisticsCollector> statsColl = new StatsCollectors<DbusEventsStatisticsCollector>(stats);

    int count = 1;
    for (String pname : pNames)
View Full Code Here

TOP

Related Classes of com.linkedin.databus.core.monitoring.mbean.AggregatedDbusEventsStatisticsCollector

Copyright © 2018 www.massapicom. 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.