Examples of metrics()


Examples of io.dropwizard.setup.Environment.metrics()

        final DataSourceFactory dbConfig = new DataSourceFactory();
        final HibernateBundle<?> bundle = mock(HibernateBundle.class);
        final Environment environment = mock(Environment.class);
        final LifecycleEnvironment lifecycleEnvironment = mock(LifecycleEnvironment.class);
        when(environment.lifecycle()).thenReturn(lifecycleEnvironment);
        when(environment.metrics()).thenReturn(metricRegistry);

        dbConfig.setUrl("jdbc:hsqldb:mem:DbTest-" + System.nanoTime()+"?hsqldb.translate_dti_types=false");
        dbConfig.setUser("sa");
        dbConfig.setDriverClass("org.hsqldb.jdbcDriver");
        dbConfig.setValidationQuery("SELECT 1 FROM INFORMATION_SCHEMA.SYSTEM_USERS");
View Full Code Here

Examples of io.vertx.core.datagram.DatagramSocket.metrics()

  @Test
  public void testDummyDatagramSocketMetrics() {
    DatagramSocket sock = vertx.createDatagramSocket(new DatagramSocketOptions());
    assertNull(sock.metricBaseName());
    assertTrue(sock.metrics().isEmpty());
  }
}
View Full Code Here

Examples of io.vertx.core.http.HttpClient.metrics()

  @Test
  public void testDummyHttpClientMetrics() {
    HttpClient client = vertx.createHttpClient(new HttpClientOptions());
    assertNull(client.metricBaseName());
    assertTrue(client.metrics().isEmpty());
  }

  @Test
  public void testDummyEventBusMetrics() {
    assertNull(vertx.eventBus().metricBaseName());
View Full Code Here

Examples of io.vertx.core.http.HttpServer.metrics()

  @Test
  public void testDummyHttpServerMetrics() {
    HttpServer server = vertx.createHttpServer(new HttpServerOptions());
    assertNull(server.metricBaseName());
    assertTrue(server.metrics().isEmpty());
  }

  @Test
  public void testDummyHttpClientMetrics() {
    HttpClient client = vertx.createHttpClient(new HttpClientOptions());
View Full Code Here

Examples of io.vertx.core.net.NetClient.metrics()

  @Test
  public void testDummyNetClientMetrics() {
    NetClient client = vertx.createNetClient(new NetClientOptions());
    assertNull(client.metricBaseName());
    assertTrue(client.metrics().isEmpty());
  }

  @Test
  public void testDummyHttpServerMetrics() {
    HttpServer server = vertx.createHttpServer(new HttpServerOptions());
View Full Code Here

Examples of io.vertx.core.net.NetServer.metrics()

  @Test
  public void testDummyNetServerMetrics() {
    NetServer server = vertx.createNetServer(new NetServerOptions());
    assertNull(server.metricBaseName());
    assertTrue(server.metrics().isEmpty());
  }

  @Test
  public void testDummyNetClientMetrics() {
    NetClient client = vertx.createNetClient(new NetClientOptions());
View Full Code Here

Examples of io.vertx.core.spi.VertxMetricsFactory.metrics()

  private VertxMetrics initialiseMetrics(VertxOptions options) {
    if (options.isMetricsEnabled()) {
      ServiceLoader<VertxMetricsFactory> factories = ServiceLoader.load(VertxMetricsFactory.class);
      if (factories.iterator().hasNext()) {
        VertxMetricsFactory factory = factories.iterator().next();
        return factory.metrics(this, options);
      } else {
        log.warn("Metrics has been set to enabled but no VertxMetricsFactory found on classpath");
        return new DummyVertxMetrics();
      }
    } else {
View Full Code Here

Examples of org.apache.blur.thrift.generated.Blur.Iface.metrics()

  public static void main(String[] args) throws BlurException, TException, IOException {
    String connectionStr = args[0];

    Iface client = BlurClient.getClient(connectionStr);
    Map<String, Metric> metrics = new TreeMap<String, Metric>(client.metrics(null));
    for (Metric m : metrics.values()) {
      System.out.println(m.getName());
      System.out.println("\t" + m.getDoubleMap());
      System.out.println("\t" + m.getLongMap());
      System.out.println("\t" + m.getStrMap());
View Full Code Here

Examples of org.apache.hadoop.metrics2.MetricsRecord.metrics()

    assertEquals("metrics", MetricsLists.builder("")
      .addCounter(info("C1", "C1 desc"), 1L)
      .addGauge(info("G1", "G1 desc"), 2L)
      .addCounter(info("S1NumOps", "Number of ops for s1"), 1L)
      .addGauge(info("S1AvgTime", "Average time for s1"), 0.0)
      .metrics(), r.metrics());

    r = recs.get(1);
    assertTrue("NumActiveSinks should be 3", Iterables.contains(r.metrics(),
               new MetricGaugeInt(MsInfo.NumActiveSinks, 3)));
  }
View Full Code Here

Examples of org.apache.hadoop.metrics2.MetricsRecord.metrics()

      .addCounter(info("S1NumOps", "Number of ops for s1"), 1L)
      .addGauge(info("S1AvgTime", "Average time for s1"), 0.0)
      .metrics(), r.metrics());

    r = recs.get(1);
    assertTrue("NumActiveSinks should be 3", Iterables.contains(r.metrics(),
               new MetricGaugeInt(MsInfo.NumActiveSinks, 3)));
  }

  @Metrics(context="test")
  private static class TestSource {
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.