Tabnine Logo
Metrics.defaultRegistry
Code IndexAdd Tabnine to your IDE (free)

How to use
defaultRegistry
method
in
com.yammer.metrics.Metrics

Best Java code snippets using com.yammer.metrics.Metrics.defaultRegistry (Showing top 20 results out of 342)

origin: linkedin/cruise-control

private void reportYammerMetrics(long now) throws Exception {
 LOG.debug("Reporting yammer metrics.");
 YammerMetricProcessor.Context context = new YammerMetricProcessor.Context(this, now, _brokerId, _reportingIntervalMs);
 for (Map.Entry<com.yammer.metrics.core.MetricName, Metric> entry : Metrics.defaultRegistry().allMetrics().entrySet()) {
  LOG.trace("Processing yammer metric {}, scope = {}", entry.getKey(), entry.getKey().getScope());
  entry.getValue().processWith(_yammerMetricProcessor, entry.getKey(), context);
 }
 LOG.debug("Finished reporting yammer metrics.");
}
origin: apache/incubator-pinot

/**
 * Removes an existing metric
 */
public static void removeMetric(MetricsRegistry registry, MetricName name) {
 if (registry != null) {
  registry.removeMetric(name);
 } else {
  Metrics.defaultRegistry().removeMetric(name);
 }
}
origin: lealone/Lealone

  public void release() {
    Metrics.defaultRegistry().removeMetric(factory.createMetricName("ActiveTasks"));
    Metrics.defaultRegistry().removeMetric(factory.createMetricName("PendingTasks"));
    Metrics.defaultRegistry().removeMetric(factory.createMetricName("CompletedTasks"));
    Metrics.defaultRegistry().removeMetric(factory.createMetricName("TotalBlockedTasks"));
    Metrics.defaultRegistry().removeMetric(factory.createMetricName("CurrentlyBlockedTasks"));
  }
}
origin: lealone/Lealone

  public void release() {
    Metrics.defaultRegistry().removeMetric(factory.createMetricName("ActiveTasks"));
    Metrics.defaultRegistry().removeMetric(factory.createMetricName("PendingTasks"));
    Metrics.defaultRegistry().removeMetric(factory.createMetricName("CompletedTasks"));
    Metrics.defaultRegistry().removeMetric(factory.createMetricName("TotalBlockedTasks"));
    Metrics.defaultRegistry().removeMetric(factory.createMetricName("CurrentlyBlockedTasks"));
  }
}
origin: lealone/Lealone

  public void release() {
    Metrics.defaultRegistry().removeMetric(factory.createMetricName("Timeouts"));
  }
}
origin: apache/usergrid

ConsoleReporter reporter = new ConsoleReporter( Metrics.defaultRegistry(), System.out, MetricPredicate.ALL );
origin: com.yammer.metrics/metrics-graphite

/**
 * Creates a new {@link GraphiteReporter}.
 *
 * @param host   is graphite server
 * @param port   is port on which graphite server is running
 * @param prefix is prepended to all names reported to graphite
 * @throws IOException if there is an error connecting to the Graphite server
 */
public GraphiteReporter(String host, int port, String prefix) throws IOException {
  this(Metrics.defaultRegistry(), host, port, prefix);
}
origin: com.yammer.metrics/metrics-core

/**
 * Creates a new {@link ConsoleReporter} for the default metrics registry, with unrestricted
 * output.
 *
 * @param out the {@link PrintStream} to which output will be written
 */
public ConsoleReporter(PrintStream out) {
  this(Metrics.defaultRegistry(), out, MetricPredicate.ALL);
}
origin: com.yammer.metrics/metrics-core

/**
 * Enables the console reporter for the default metrics registry, and causes it to print to
 * STDOUT with the specified period.
 *
 * @param period the period between successive outputs
 * @param unit   the time unit of {@code period}
 */
public static void enable(long period, TimeUnit unit) {
  enable(Metrics.defaultRegistry(), period, unit);
}
origin: com.yammer.metrics/metrics-core

/**
 * Enables the CSV reporter for the default metrics registry, and causes it to write to files in
 * {@code outputDir} with the specified period.
 *
 * @param outputDir    the directory in which {@code .csv} files will be created
 * @param period       the period between successive outputs
 * @param unit         the time unit of {@code period}
 */
public static void enable(File outputDir, long period, TimeUnit unit) {
  enable(Metrics.defaultRegistry(), outputDir, period, unit);
}
origin: com.yammer.metrics/metrics-aop

/**
 * Instruments the given object.
 *
 * @param instance    an object
 * @param <T>         the type of the given {@code instance}
 * @return {@code instance}, instrumented
 */
public static <T> T instrument(T instance) {
  return instrument(Metrics.defaultRegistry(), instance);
}
origin: com.yammer.metrics/metrics-graphite

/**
 * Enables the graphite reporter to send data for the default metrics registry to graphite
 * server with the specified period.
 *
 * @param period the period between successive outputs
 * @param unit   the time unit of {@code period}
 * @param host   the host name of graphite server (carbon-cache agent)
 * @param port   the port number on which the graphite server is listening
 */
public static void enable(long period, TimeUnit unit, String host, int port) {
  enable(Metrics.defaultRegistry(), period, unit, host, port);
}
origin: NGDATA/hbase-indexer

public static void shutdownMetrics(String indexerName) {
  SortedMap<String, SortedMap<MetricName, Metric>> groupedMetrics = Metrics.defaultRegistry().groupedMetrics(
      new IndexerMetricPredicate(indexerName));
  for (SortedMap<MetricName, Metric> metricMap : groupedMetrics.values()) {
    for (MetricName metricName : metricMap.keySet()) {
      Metrics.defaultRegistry().removeMetric(metricName);
    }
  }
}
origin: amient/kafka-metrics

public void stopReporter() {
  if (initialized && running) {
    running = false;
    underlying.shutdown();
    log.info("Stopped TopicReporter instance");
    underlying = new X(Metrics.defaultRegistry());
  }
}
origin: com.facebook.presto.cassandra/cassandra-server

  public void release()
  {
    Metrics.defaultRegistry().removeMetric(factory.createMetricName("ActiveTasks"));
    Metrics.defaultRegistry().removeMetric(factory.createMetricName("PendingTasks"));
    Metrics.defaultRegistry().removeMetric(factory.createMetricName("CompletedTasks"));
    Metrics.defaultRegistry().removeMetric(factory.createMetricName("TotalBlockedTasks"));
    Metrics.defaultRegistry().removeMetric(factory.createMetricName("CurrentlyBlockedTasks"));
    Metrics.defaultRegistry().removeMetric(factory.createMetricName("MaxPoolSize"));
  }
}
origin: addthis/hydra

/**
 * Creates a new {@link MetricsServlet}.
 */
public MetricsServletShim() {
  this(Clock.defaultClock(), VirtualMachineMetrics.getInstance(),
      Metrics.defaultRegistry(), DEFAULT_JSON_FACTORY, true);
}
origin: vistarmedia/metrics-datadog

public static void enable(long period, TimeUnit unit, String apiKey,
  String host) {
 DatadogReporter dd = new DatadogReporter(Metrics.defaultRegistry(), apiKey,
   host);
 dd.start(period, unit);
}
origin: com.facebook.presto.cassandra/cassandra-server

public void release()
{
  Metrics.defaultRegistry().removeMetric(factory.createMetricName("CommandPendingTasks"));
  Metrics.defaultRegistry().removeMetric(factory.createMetricName("CommandCompletedTasks"));
  Metrics.defaultRegistry().removeMetric(factory.createMetricName("CommandDroppedTasks"));
  Metrics.defaultRegistry().removeMetric(factory.createMetricName("ResponsePendingTasks"));
  Metrics.defaultRegistry().removeMetric(factory.createMetricName("ResponseCompletedTasks"));
  Metrics.defaultRegistry().removeMetric(factory.createMetricName("Timeouts"));
}
origin: com.yammer.metrics/metrics-servlet

/**
 * Creates a new {@link MetricsServlet}.
 *
 * @param showJvmMetrics    whether or not JVM-level metrics will be included in the output
 */
public MetricsServlet(boolean showJvmMetrics) {
  this(Clock.defaultClock(), VirtualMachineMetrics.getInstance(),
     Metrics.defaultRegistry(), DEFAULT_JSON_FACTORY, showJvmMetrics);
}
origin: com.yammer.metrics/metrics-guice

  @Override
  public JmxReporter get() {
    if (metricsRegistry == Metrics.defaultRegistry()) {
      return JmxReporter.getDefault();
    }

    final JmxReporter reporter = new JmxReporter(metricsRegistry);
    reporter.start();
    return reporter;
  }
}
com.yammer.metricsMetricsdefaultRegistry

Javadoc

Returns the (static) default registry.

Popular methods of Metrics

  • newCounter
    Creates a new com.yammer.metrics.core.Counter and registers it under the given class and name.
  • newTimer
    Creates a new com.yammer.metrics.core.Timer and registers it under the given class and name.
  • newMeter
    Creates a new com.yammer.metrics.core.Meter and registers it under the given class and name.
  • newGauge
    Given a new com.yammer.metrics.core.Gauge, registers it under the given class and name.
  • newHistogram
    Creates a new com.yammer.metrics.core.Histogram and registers it under the given class and name.
  • shutdown
    Shuts down all thread pools for the default registry.

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getResourceAsStream (ClassLoader)
  • getSupportFragmentManager (FragmentActivity)
  • putExtra (Intent)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Option (scala)
  • CodeWhisperer alternatives
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