Package com.twitter.hbc.core

Examples of com.twitter.hbc.core.StatsReporter$StatsTracker


public class StatsReporterTest {

  @Test
  public void testStatsReporter() {
    StatsReporter statsReporter = new StatsReporter();
    StatsReporter.StatsTracker stats = statsReporter.getStatsTracker();

    assertEquals(stats.getNum200s(), 0);
    statsReporter.incrNum200s();
    statsReporter.incrNum200s();
    statsReporter.incrNum200s();
    assertEquals(stats.getNum200s(), 3);

    assertEquals(stats.getNumMessages(), 0);
    statsReporter.incrNumMessages();
    statsReporter.incrNumMessages();
    assertEquals(stats.getNumMessages(), 2);
  }
View Full Code Here


    this.eventsQueue = eventsQueue;

    this.exitEvent = new AtomicReference<Event>();

    this.isRunning = new CountDownLatch(1);
    this.statsReporter = new StatsReporter();

    this.connectionEstablished = new AtomicBoolean(false);
    this.reconnect = new AtomicBoolean(false);
  }
View Full Code Here

TOP

Related Classes of com.twitter.hbc.core.StatsReporter$StatsTracker

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.