Tabnine Logo
Histogram.<init>
Code IndexAdd Tabnine 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)

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

  • Making http requests using okhttp
  • getSupportFragmentManager (FragmentActivity)
  • setContentView (Activity)
  • getApplicationContext (Context)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Best IntelliJ plugins
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