Tabnine Logo
MetricRegistry.getHistograms
Code IndexAdd Tabnine to your IDE (free)

How to use
getHistograms
method
in
com.codahale.metrics.MetricRegistry

Best Java code snippets using com.codahale.metrics.MetricRegistry.getHistograms (Showing top 20 results out of 432)

origin: io.dropwizard.metrics/metrics-core

/**
 * Returns a map of all the histograms in the registry and their names.
 *
 * @return all the histograms in the registry
 */
public SortedMap<String, Histogram> getHistograms() {
  return getHistograms(MetricFilter.ALL);
}
origin: line/armeria

private static void assertHistogram(String property, int expectedCount) {
  assertSummary(dropwizardRegistry.getHistograms(), property, expectedCount);
}
origin: apache/flink

@Override
public void report() {
  // we do not need to lock here, because the dropwizard registry is
  // internally a concurrent map
  @SuppressWarnings("rawtypes")
  final SortedMap<String, com.codahale.metrics.Gauge> gauges = registry.getGauges();
  final SortedMap<String, com.codahale.metrics.Counter> counters = registry.getCounters();
  final SortedMap<String, com.codahale.metrics.Histogram> histograms = registry.getHistograms();
  final SortedMap<String, com.codahale.metrics.Meter> meters = registry.getMeters();
  final SortedMap<String, com.codahale.metrics.Timer> timers = registry.getTimers();
  this.reporter.report(gauges, counters, histograms, meters, timers);
}
origin: apache/incubator-gobblin

public void reportRegistry(MetricRegistry registry) {
 Map<String, String> tags = Maps.newHashMap();
 if (registry instanceof MetricContext) {
  tags = Maps.transformValues(((MetricContext) registry).getTagMap(), new Function<Object, String>() {
   @Override
   public String apply(Object input) {
    return input.toString();
   }
  });
 }
 report(registry.getGauges(this.filter), registry.getCounters(this.filter), registry.getHistograms(this.filter),
   registry.getMeters(this.filter), registry.getTimers(this.filter), tags);
}
origin: spotify/helios

@VisibleForTesting
void reportOnce() {
 // resolve the additional attributes once per report
 additionalAttributes = additionalAttributesSupplier.get();
 if (additionalAttributes == null) {
  additionalAttributes = Collections.emptyMap();
 }
 metricRegistry.getGauges().forEach(this::reportGauge);
 metricRegistry.getCounters().forEach(this::reportCounter);
 metricRegistry.getMeters().forEach(this::reportMeter);
 metricRegistry.getHistograms().forEach(this::reportHistogram);
 metricRegistry.getTimers().forEach(this::reportTimer);
}
origin: io.dropwizard.metrics/metrics-core

/**
 * Report the current values of all metrics in the registry.
 */
public void report() {
  synchronized (this) {
    report(registry.getGauges(filter),
        registry.getCounters(filter),
        registry.getHistograms(filter),
        registry.getMeters(filter),
        registry.getTimers(filter));
  }
}
origin: jooby-project/jooby

 metrics.put("gauges", gauges);
Map<String, Object> histograms = histograms(registry.getHistograms(filter), showSamples);
if (histograms.size() > 0) {
 metrics.put("histograms", histograms);
origin: prometheus/client_java

@Override
public List<MetricFamilySamples> collect() {
  Map<String, MetricFamilySamples> mfSamplesMap = new HashMap<String, MetricFamilySamples>();
  for (SortedMap.Entry<String, Gauge> entry : registry.getGauges().entrySet()) {
    addToMap(mfSamplesMap, fromGauge(entry.getKey(), entry.getValue()));
  }
  for (SortedMap.Entry<String, Counter> entry : registry.getCounters().entrySet()) {
    addToMap(mfSamplesMap, fromCounter(entry.getKey(), entry.getValue()));
  }
  for (SortedMap.Entry<String, Histogram> entry : registry.getHistograms().entrySet()) {
    addToMap(mfSamplesMap, fromHistogram(entry.getKey(), entry.getValue()));
  }
  for (SortedMap.Entry<String, Timer> entry : registry.getTimers().entrySet()) {
    addToMap(mfSamplesMap, fromTimer(entry.getKey(), entry.getValue()));
  }
  for (SortedMap.Entry<String, Meter> entry : registry.getMeters().entrySet()) {
    addToMap(mfSamplesMap, fromMeter(entry.getKey(), entry.getValue()));
  }
  return new ArrayList<MetricFamilySamples>(mfSamplesMap.values());
}
origin: pippo-java/pippo

SortedMap<String, Histogram> histograms = metricRegistry.getHistograms();
if (histograms.size() > 0) {
  writeHistograms(histograms, writer);
origin: com.codahale.metrics/metrics-core

/**
 * Returns a map of all the histograms in the registry and their names.
 *
 * @return all the histograms in the registry
 */
public SortedMap<String, Histogram> getHistograms() {
  return getHistograms(MetricFilter.ALL);
}
origin: com.ning.billing/killbill-osgi-bundles-analytics

/**
 * Returns a map of all the histograms in the registry and their names.
 *
 * @return all the histograms in the registry
 */
public SortedMap<String, Histogram> getHistograms() {
  return getHistograms(MetricFilter.ALL);
}
origin: org.eclipse.kapua/kapua-commons

@Override
public Histogram getHistogram(String module, String component, String... names) {
  String name = getMetricName(module, component, names);
  Histogram histogram = metricRegistry.getHistograms().get(name);
  if (histogram == null) {
    logger.debug("Creating a Histogram: {}", name);
    histogram = metricRegistry.histogram(name);
  }
  return histogram;
}
origin: io.restx/restx-monitor-admin

@RolesAllowed(AdminModule.RESTX_ADMIN_ROLE)
@GET("/@/metrics")
public Map metrics() {
  return ImmutableMap.of(
      "gauges", metrics.getGauges(),
      "timers", metrics.getTimers(),
      "meters", metrics.getMeters(),
      "counters", metrics.getCounters(),
      "histograms", metrics.getHistograms()
  );
}
origin: org.attribyte/essem-reporter

/**
* Builds a report for a specified registry.
* @param registry The registry.
* @return The report.
*/
public ReportProtos.EssemReport buildReport(final MetricRegistry registry) {
 return buildReport(registry.getGauges(),
     registry.getCounters(),
     registry.getHistograms(),
     registry.getMeters(),
     registry.getTimers());
}
origin: com.alibaba.blink/flink-metrics-dropwizard

@Override
public void report() {
  // we do not need to lock here, because the dropwizard registry is
  // internally a concurrent map
  @SuppressWarnings("rawtypes")
  final SortedMap<String, com.codahale.metrics.Gauge> gauges = registry.getGauges();
  final SortedMap<String, com.codahale.metrics.Counter> counters = registry.getCounters();
  final SortedMap<String, com.codahale.metrics.Histogram> histograms = registry.getHistograms();
  final SortedMap<String, com.codahale.metrics.Meter> meters = registry.getMeters();
  final SortedMap<String, com.codahale.metrics.Timer> timers = registry.getTimers();
  this.reporter.report(gauges, counters, histograms, meters, timers);
}
origin: apache/tajo

/**
 * Report the current values of all metrics in the registry.
 */
public void report() {
 report(registry.getGauges(filter),
   registry.getCounters(filter),
   registry.getHistograms(filter),
   registry.getMeters(filter),
   registry.getTimers(filter));
}
origin: com.codahale.metrics/metrics-core

/**
 * Report the current values of all metrics in the registry.
 */
public void report() {
  report(registry.getGauges(filter),
      registry.getCounters(filter),
      registry.getHistograms(filter),
      registry.getMeters(filter),
      registry.getTimers(filter));
}
origin: com.ning.billing/killbill-osgi-bundles-analytics

/**
 * Report the current values of all metrics in the registry.
 */
public void report() {
  report(registry.getGauges(filter),
      registry.getCounters(filter),
      registry.getHistograms(filter),
      registry.getMeters(filter),
      registry.getTimers(filter));
}
origin: apache/jackrabbit-oak

@Test
public void histogram() throws Exception {
  HistogramStats histoStats = statsProvider.getHistogram("test", StatsOptions.DEFAULT);
  assertNotNull(histoStats);
  assertNotNull(statsProvider.getRegistry().getHistograms().containsKey("test"));
  assertTrue(((CompositeStats) histoStats).isHistogram());
}
origin: SoftInstigate/restheart

public static BsonDocument generateMetricsBson(MetricRegistry registry, TimeUnit rateUnit, TimeUnit durationUnit) {
  MetricsJsonGenerator generator = new MetricsJsonGenerator(rateUnit, durationUnit);
  return new BsonDocument()
      .append("version", new BsonString("3.0.0"))
      .append("gauges", generator.toBson(registry.getGauges(), generator::generateGauge))
      .append("counters", generator.toBson(registry.getCounters(), generator::generateCounter))
      .append("histograms", generator.toBson(registry.getHistograms(), generator::generateHistogram))
      .append("meters", generator.toBson(registry.getMeters(), generator::generateMeter))
      .append("timers", generator.toBson(registry.getTimers(), generator::generateTimer));
}
private final String singularRateUnitString;
com.codahale.metricsMetricRegistrygetHistograms

Javadoc

Returns a map of all the histograms in the registry and their names.

Popular methods of MetricRegistry

  • name
    Concatenates elements to form a dotted name, eliding any null values or empty strings.
  • timer
    Return the Timer registered under this name; or create and register a new Timer using the provided M
  • register
    Given a Metric, registers it under the given name.
  • <init>
    Creates a new MetricRegistry.
  • meter
    Return the Meter registered under this name; or create and register a new Meter using the provided M
  • counter
    Return the Counter registered under this name; or create and register a new Counter using the provid
  • histogram
    Return the Histogram registered under this name; or create and register a new Histogram using the pr
  • remove
    Removes the metric with the given name.
  • getGauges
    Returns a map of all the gauges in the registry and their names which match the given filter.
  • getTimers
    Returns a map of all the timers in the registry and their names which match the given filter.
  • getMetrics
  • getCounters
    Returns a map of all the counters in the registry and their names which match the given filter.
  • getMetrics,
  • getCounters,
  • getMeters,
  • registerAll,
  • removeMatching,
  • getNames,
  • addListener,
  • gauge,
  • removeListener

Popular in Java

  • Running tasks concurrently on multiple threads
  • setScale (BigDecimal)
  • getSupportFragmentManager (FragmentActivity)
  • getSystemService (Context)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now