public Histogram registerHistogram(String name) { return registry.histogram(name); }
@Override public Histogram newMetric(Class<?> clazz, String name, String scope) { return registry.histogram(name(clazz, name, scope)); } };
/** * Return the {@link Histogram} registered under this name; or create and register * a new {@link Histogram} if none is registered. */ public static Histogram histogram(Class<?> clazz, String... names) { return metricRegistry.histogram(MetricRegistry.name(clazz, names)); }
/** * Return the {@link Histogram} registered under this name; or create and register * a new {@link Histogram} if none is registered. */ public static Histogram histogram(Class<?> clazz, String... names) { return metricRegistry.histogram(MetricRegistry.name(clazz, names)); }
public RunnerStats(MetricRegistry registry) { this.normalRunners = registry.counter( name(MetricsConnection.class, "normalRunnersCount")); this.delayRunners = registry.counter( name(MetricsConnection.class, "delayRunnersCount")); this.delayIntevalHist = registry.histogram( name(MetricsConnection.class, "delayIntervalHist")); }
private CallTracker(MetricRegistry registry, String name, String subName, String scope) { StringBuilder sb = new StringBuilder(CLIENT_SVC).append("_").append(name); if (subName != null) { sb.append("(").append(subName).append(")"); } this.name = sb.toString(); this.callTimer = registry.timer(name(MetricsConnection.class, DRTN_BASE + this.name, scope)); this.reqHist = registry.histogram(name(MetricsConnection.class, REQ_BASE + this.name, scope)); this.respHist = registry.histogram(name(MetricsConnection.class, RESP_BASE + this.name, scope)); }
public Histogram registerHistogram(String name, Reservoir reservoir) { return registry.histogram(name, () -> new Histogram(reservoir)); }
public Histogram getHistogram(String name) { return getRegistry().histogram(name); }
public Histogram getHistogram(String prefix, String... names) { return getRegistry().histogram(MetricRegistry.name(prefix, names)); }
@Inject public Searches(Configuration configuration, IndexRangeService indexRangeService, MetricRegistry metricRegistry, StreamService streamService, Indices indices, IndexSetRegistry indexSetRegistry, JestClient jestClient, ScrollResult.Factory scrollResultFactory) { this.configuration = requireNonNull(configuration, "configuration"); this.indexRangeService = requireNonNull(indexRangeService, "indexRangeService"); this.esRequestTimer = metricRegistry.timer(name(Searches.class, "elasticsearch", "requests")); this.esTimeRangeHistogram = metricRegistry.histogram(name(Searches.class, "elasticsearch", "ranges")); this.esTotalSearchesCounter = metricRegistry.counter(name(Searches.class, "elasticsearch", "total-searches")); this.streamService = requireNonNull(streamService, "streamService"); this.indices = requireNonNull(indices, "indices"); this.indexSetRegistry = requireNonNull(indexSetRegistry, "indexSetRegistry"); this.jestClient = requireNonNull(jestClient, "jestClient"); this.scrollResultFactory = requireNonNull(scrollResultFactory, "scrollResultFactory"); }
@Inject public BlockingBatchedESOutput(MetricRegistry metricRegistry, Messages messages, org.graylog2.Configuration serverConfiguration, Journal journal) { super(metricRegistry, messages, journal); this.maxBufferSize = serverConfiguration.getOutputBatchSize(); outputFlushInterval = serverConfiguration.getOutputFlushInterval(); this.processTime = metricRegistry.timer(name(this.getClass(), "processTime")); this.batchSize = metricRegistry.histogram(name(this.getClass(), "batchSize")); this.bufferFlushes = metricRegistry.meter(name(this.getClass(), "bufferFlushes")); this.bufferFlushFailures = metricRegistry.meter(name(this.getClass(), "bufferFlushFailures")); this.bufferFlushesRequested = metricRegistry.meter(name(this.getClass(), "bufferFlushesRequested")); buffer = new ArrayList<>(maxBufferSize); }
public Histogram getHistogram(String name) { return getRegistry().histogram(name); }
public Histogram getHistogram(String prefix, String... names) { return getRegistry().histogram(MetricRegistry.name(prefix, names)); }
/** * Return the {@link Histogram} registered under this name; or create and register * a new {@link Histogram} if none is registered. */ public static Histogram histogram(String name) { return metricRegistry.histogram(checkNotNull(name, "name")); }
/** * Return the {@link Histogram} registered under this name; or create and register * a new {@link Histogram} if none is registered. */ public static Histogram histogram(String name) { return metricRegistry.histogram(checkNotNull(name, "name")); }
public Histogram registerHistogram(String name) { return StormMetricRegistry.registry().histogram(metricName(name)); }
@Setup(Level.Iteration) public void setup() { registry = new MetricRegistry(); histogram = registry.histogram("histogram"); histogramSlidingTimeWindow = registry.register("slidingTimeWindowHistogram", new Histogram(new SlidingTimeWindowReservoir(10, TimeUnit.SECONDS))); histogramUniform = registry.register("uniformHistogram", new Histogram(new UniformReservoir())); }
public AccessStatisticItem(String name, long currentTimeMillis, int length) { this.name = name; this.costTimes = initAtomicIntegerArr(length); this.bizProcessTimes = initAtomicIntegerArr(length); this.totalCounter = initAtomicIntegerArr(length); this.slowCounter = initAtomicIntegerArr(length); this.bizExceptionCounter = initAtomicIntegerArr(length); this.otherExceptionCounter = initAtomicIntegerArr(length); this.length = length; this.currentIndex = getIndex(currentTimeMillis, length); this.histogram = InternalMetricsFactory.getRegistryInstance(name) .histogram(StatsUtil.HISTOGRAM_NAME); }