private static String name(String timer) { return concat(LocalService.class, timer); }
private static String name(String timer) { return concat(LocalService.class, timer); }
public JsonHandler(Service service, MetricsSystem metrics) { super(service); this.metrics = metrics; this.serializationTimer = this.metrics.getTimer( MetricsHelper.concat(JsonHandler.class, HANDLER_SERIALIZATION_METRICS_NAME)); }
public JsonHandler(Service service, MetricsSystem metrics) { super(service); this.metrics = metrics; this.serializationTimer = this.metrics.getTimer( MetricsHelper.concat(JsonHandler.class, HANDLER_SERIALIZATION_METRICS_NAME)); }
public ProtobufHandler(Service service, ProtobufTranslation translation, MetricsSystem metrics) { super(service); this.translation = translation; this.metrics = metrics; this.serializationTimer = this.metrics.getTimer( MetricsHelper.concat(ProtobufHandler.class, HANDLER_SERIALIZATION_METRICS_NAME)); }
public ProtobufHandler(Service service, ProtobufTranslation translation, MetricsSystem metrics) { super(service); this.translation = translation; this.metrics = metrics; this.serializationTimer = this.metrics.getTimer( MetricsHelper.concat(ProtobufHandler.class, HANDLER_SERIALIZATION_METRICS_NAME)); }
public AvaticaJsonHandler(Service service, MetricsSystem metrics, AvaticaServerConfiguration serverConfig) { this.service = Objects.requireNonNull(service); this.metrics = Objects.requireNonNull(metrics); // Avatica doesn't have a Guava dependency this.jsonHandler = new JsonHandler(service, this.metrics); // Metrics this.requestTimer = this.metrics.getTimer( concat(AvaticaJsonHandler.class, MetricsAwareAvaticaHandler.REQUEST_TIMER_NAME)); this.threadLocalBuffer = new ThreadLocal<UnsynchronizedBuffer>() { @Override public UnsynchronizedBuffer initialValue() { return new UnsynchronizedBuffer(); } }; this.serverConfig = serverConfig; }
public AvaticaJsonHandler(Service service, MetricsSystem metrics, AvaticaServerConfiguration serverConfig) { this.service = Objects.requireNonNull(service); this.metrics = Objects.requireNonNull(metrics); // Avatica doesn't have a Guava dependency this.jsonHandler = new JsonHandler(service, this.metrics); // Metrics this.requestTimer = this.metrics.getTimer( concat(AvaticaJsonHandler.class, MetricsAwareAvaticaHandler.REQUEST_TIMER_NAME)); this.threadLocalBuffer = new ThreadLocal<UnsynchronizedBuffer>() { @Override public UnsynchronizedBuffer initialValue() { return new UnsynchronizedBuffer(); } }; this.serverConfig = serverConfig; }
public AvaticaProtobufHandler(Service service, MetricsSystem metrics, AvaticaServerConfiguration serverConfig) { this.service = Objects.requireNonNull(service); this.metrics = Objects.requireNonNull(metrics); this.requestTimer = this.metrics.getTimer( MetricsHelper.concat(AvaticaProtobufHandler.class, MetricsAwareAvaticaHandler.REQUEST_TIMER_NAME)); this.protobufTranslation = new ProtobufTranslationImpl(); this.pbHandler = new ProtobufHandler(service, protobufTranslation, metrics); this.threadLocalBuffer = new ThreadLocal<UnsynchronizedBuffer>() { @Override public UnsynchronizedBuffer initialValue() { return new UnsynchronizedBuffer(); } }; this.serverConfig = serverConfig; }
public AvaticaProtobufHandler(Service service, MetricsSystem metrics, AvaticaServerConfiguration serverConfig) { this.service = Objects.requireNonNull(service); this.metrics = Objects.requireNonNull(metrics); this.requestTimer = this.metrics.getTimer( MetricsHelper.concat(AvaticaProtobufHandler.class, MetricsAwareAvaticaHandler.REQUEST_TIMER_NAME)); this.protobufTranslation = new ProtobufTranslationImpl(); this.pbHandler = new ProtobufHandler(service, protobufTranslation, metrics); this.threadLocalBuffer = new ThreadLocal<UnsynchronizedBuffer>() { @Override public UnsynchronizedBuffer initialValue() { return new UnsynchronizedBuffer(); } }; this.serverConfig = serverConfig; }
@Test(expected = NullPointerException.class) public void testNullConcat() { MetricsHelper.concat(null, "foo"); }
@Test(expected = NullPointerException.class) public void testNullConcat() { MetricsHelper.concat(null, "foo"); }
@Test public void testConcat() { String suffix = "suffix"; String finalName = getClass().getName() + "." + suffix; assertEquals(finalName, MetricsHelper.concat(getClass(), suffix)); }
@Test public void testConcat() { String suffix = "suffix"; String finalName = getClass().getName() + "." + suffix; assertEquals(finalName, MetricsHelper.concat(getClass(), suffix)); }
this.metrics.register(concat(JdbcMeta.class, "ConnectionCacheSize"), new Gauge<Long>() { @Override public Long getValue() { return connectionCache.size(); this.metrics.register(concat(JdbcMeta.class, "StatementCacheSize"), new Gauge<Long>() { @Override public Long getValue() { return statementCache.size();
this.metrics.register(concat(JdbcMeta.class, "ConnectionCacheSize"), new Gauge<Long>() { @Override public Long getValue() { return connectionCache.size(); this.metrics.register(concat(JdbcMeta.class, "StatementCacheSize"), new Gauge<Long>() { @Override public Long getValue() { return statementCache.size();