Codota Logo
Histogram.<init>
Code IndexAdd Codota to your IDE (free)

How to use
com.codahale.metrics.Histogram
constructor

Best Java code snippets using com.codahale.metrics.Histogram.<init> (Showing top 20 results out of 423)

  • Common ways to obtain Histogram
private void myMethod () {
Histogram h =
  • Codota Iconnew Histogram(new ExponentiallyDecayingReservoir())
  • Codota IconMetricRegistry metrics;String name;metrics.histogram(name)
  • Codota IconMockito.mock(Histogram.class)
  • Smart code suggestions by Codota
}
origin: apache/storm

public Histogram registerHistogram(String name, Reservoir reservoir) {
  return registry.histogram(name, () -> new Histogram(reservoir));
}
origin: io.dropwizard.metrics/metrics-core

/**
 * Creates a new {@link Timer} that uses the given {@link Reservoir} and {@link Clock}.
 *
 * @param reservoir the {@link Reservoir} implementation the timer should use
 * @param clock     the {@link Clock} implementation the timer should use
 */
public Timer(Reservoir reservoir, Clock clock) {
  this.meter = new Meter(clock);
  this.clock = clock;
  this.histogram = new Histogram(reservoir);
}
origin: apache/zookeeper

public AvgMinMaxPercentileCounter(String name) {
  this.name = name;
  this.counter = new AvgMinMaxCounter(this.name);
  reservoir = new ResettableUniformReservoir();
  histogram = new Histogram(reservoir);
}
origin: apache/kylin

  @Override
  public Histogram load(String key) {
    Histogram histogram = new Histogram(new ExponentiallyDecayingReservoir());
    metricRegistry.register(key, histogram);
    return histogram;
  }
});
origin: stagemonitor/stagemonitor

@Override
public Histogram newMetric() {
  return new Histogram(new ExponentiallyDecayingReservoir());
}
origin: micrometer-metrics/micrometer

@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()));
}
origin: io.dropwizard.metrics/metrics-core

@Override
public Histogram newMetric() {
  return new Histogram(new ExponentiallyDecayingReservoir());
}
origin: AxonFramework/AxonFramework

/**
 * Creates a capacity monitor with the given time window. Uses the provided clock
 * to measure process time per message.
 *
 * @param window The length of the window to measure the capacity over
 * @param timeUnit The time unit of the time window
 * @param clock The clock used to measure the process time per message
 */
public CapacityMonitor(long window, TimeUnit timeUnit, Clock clock) {
  SlidingTimeWindowReservoir slidingTimeWindowReservoir = new SlidingTimeWindowReservoir(window, timeUnit, clock);
  this.processedDurationHistogram = new Histogram(slidingTimeWindowReservoir);
  this.timeUnit = timeUnit;
  this.window = window;
  this.clock = clock;
  this.capacity = new CapacityGauge();
}
origin: alibaba/jstorm

public static Histogram metricSnapshot2Histogram(MetricSnapshot snapshot) {
  Histogram histogram;
  if (metricAccurateCal) {
    histogram = new Histogram(new ExponentiallyDecayingReservoir());
    byte[] points = snapshot.get_points();
    int len = snapshot.get_pointSize();
    updateHistogramPoints(histogram, points, len);
  } else {
    histogram = new Histogram(new JAverageReservoir());
    JAverageSnapshot averageSnapshot = (JAverageSnapshot) histogram.getSnapshot();
    averageSnapshot.setMetricSnapshot(snapshot.deepCopy());
  }
  return histogram;
}
origin: apache/incubator-gobblin

recordsProcessedCounter.inc(10l);
Histogram recordSizeDistributionHistogram = new Histogram(new ExponentiallyDecayingReservoir());
recordSizeDistributionHistogram.update(1);
recordSizeDistributionHistogram.update(2);
origin: apache/incubator-gobblin

recordsProcessedCounter.inc(10l);
Histogram recordSizeDistributionHistogram = new Histogram(new ExponentiallyDecayingReservoir());
recordSizeDistributionHistogram.update(1);
recordSizeDistributionHistogram.update(2);
origin: HubSpot/Singularity

public ReconciliationState startReconciliation() {
 final long taskReconciliationStartedAt = System.currentTimeMillis();
 if (!isRunningReconciliation.compareAndSet(false, true)) {
  LOG.info("Reconciliation is already running, NOT starting a new reconciliation process");
  return ReconciliationState.ALREADY_RUNNING;
 }
 if (!schedulerClient.isRunning()) {
  LOG.trace("Not running reconciliation - no active scheduler present");
  isRunningReconciliation.set(false);
  return ReconciliationState.NO_DRIVER;
 }
 final List<SingularityTaskId> activeTaskIds = taskManager.getActiveTaskIds();
 LOG.info("Starting a reconciliation cycle - {} current active tasks", activeTaskIds.size());
 schedulerClient.reconcile(Collections.emptyList());
 scheduleReconciliationCheck(taskReconciliationStartedAt, activeTaskIds, 0, new Histogram(new UniformReservoir()));
 return ReconciliationState.STARTED;
}
origin: com.codahale.metrics/metrics-core

/**
 * Creates a new {@link Timer} that uses the given {@link Reservoir} and {@link Clock}.
 *
 * @param reservoir the {@link Reservoir} implementation the timer should use
 * @param clock  the {@link Clock} implementation the timer should use
 */
public Timer(Reservoir reservoir, Clock clock) {
  this.meter = new Meter(clock);
  this.clock = clock;
  this.histogram = new Histogram(reservoir);
}
origin: org.apache.fluo/fluo-core

public static synchronized Histogram addHistogram(FluoConfiguration config,
  MetricRegistry registry, String name) {
 Histogram histogram = registry.getHistograms().get(name);
 if (histogram == null) {
  histogram = new Histogram(getConfiguredReservoir(config));
  registry.register(name, histogram);
 }
 return histogram;
}
origin: snazy/ohc

public MergeableTimerSource()
{
  this.clock = Clock.defaultClock();
  this.count = new AtomicLong();
  this.histogram = new AtomicReference<>(new Histogram(new UniformReservoir()));
}
origin: astefanutti/metrics-cdi

@Produces
private static Histogram histogram(InjectionPoint ip, MetricRegistry registry, MetricName metricName, MetricsExtension extension) {
  String name = metricName.of(ip);
  return extension.<BiFunction<String, Class<? extends Metric>, Optional<Reservoir>>>getParameter(ReservoirFunction)
    .flatMap(function -> function.apply(name, Histogram.class))
    .map(reservoir -> registry.histogram(name, () -> new Histogram(reservoir)))
    .orElseGet(() -> registry.histogram(name));
}
origin: kite-sdk/kite

@Override
public Histogram newMetric() {
 return new Histogram(new SlidingWindowReservoir(size));
}
@Override
origin: biezhi/java-library-examples

  public static void main(String[] args) throws InterruptedException {
    MetricRegistry  registry = new MetricRegistry();
    ConsoleReporter reporter = ConsoleReporter.forRegistry(registry).build();
    reporter.start(1, TimeUnit.SECONDS);
    Histogram histogram = new Histogram(new ExponentiallyDecayingReservoir());
    registry.register(MetricRegistry.name(HistogramExample.class, "request", "histogram"), histogram);

    while (true) {
      Thread.sleep(1000);
      histogram.update(random.nextInt(100000));
    }
  }
}
origin: io.vertx/vertx-dropwizard-metrics

protected Histogram histogram(String... names) {
 try {
  return registry.histogram(nameOf(names));
 } catch (Exception e) {
  return new Histogram(new ExponentiallyDecayingReservoir());
 }
}
origin: Baqend/Orestes-Bloomfilter

public RedisBloomFilterThroughput(String name) {
  testName = name;
  System.err.println("-------------- " + name + " --------------");
  this.readHistogram = new Histogram(new ExponentiallyDecayingReservoir());
  this.writeHistogram = new Histogram(new ExponentiallyDecayingReservoir());
}
com.codahale.metricsHistogram<init>

Javadoc

Creates a new Histogram with the given reservoir.

Popular methods of Histogram

  • update
    Adds a recorded value.
  • getSnapshot
  • getCount
    Returns the number of values recorded.
  • Printer
  • ReadValue
  • addWord
  • getBinSize
  • getBins
  • getList
  • getNumBins

Popular in Java

  • Finding current android device location
  • getContentResolver (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • requestLocationUpdates (LocationManager)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Runner (org.openjdk.jmh.runner)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now