Tabnine Logo
MetricsFactory.getRegistry
Code IndexAdd Tabnine to your IDE (free)

How to use
getRegistry
method
in
uk.gov.dstl.baleen.core.metrics.MetricsFactory

Best Java code snippets using uk.gov.dstl.baleen.core.metrics.MetricsFactory.getRegistry (Showing top 10 results out of 315)

origin: dstl/baleen

/** Remove all metrics from the registry */
public void removeAll() {
 getRegistry().removeMatching((a, b) -> true);
}
origin: uk.gov.dstl.baleen/baleen-core

/** Remove all metrics from the registry */
public void removeAll() {
 getRegistry().removeMatching((a, b) -> true);
}
origin: dstl/baleen

@Test
public void testGetRegistry() {
 assertNotNull(metrics.getRegistry());
}
origin: dstl/baleen

@Test
public void testRemove() {
 metrics.getCounter(MetricsFactoryTest.class, "removeC");
 metrics.getTimer(MetricsFactoryTest.class, "removeT");
 metrics.getHistogram(MetricsFactoryTest.class, "removeH");
 metrics.getMeter(MetricsFactoryTest.class, "removeM");
 assertFalse(metrics.getRegistry().getMetrics().isEmpty());
 metrics.removeAll();
 assertTrue(metrics.getRegistry().getMetrics().isEmpty());
}
origin: uk.gov.dstl.baleen/baleen-core

  new InstrumentedAppender(MetricsFactory.getInstance().getRegistry());
instrumentedAppender.setContext(context);
instrumentedAppender.start();
origin: dstl/baleen

  new InstrumentedAppender(MetricsFactory.getInstance().getRegistry());
instrumentedAppender.setContext(context);
instrumentedAppender.start();
origin: dstl/baleen

@Test
public void testComponents() throws BaleenException, IOException {
 metrics.configure(new YamlConfiguration());
 metrics.start();
 metrics.getCounter(MetricsFactoryTest.class, "removeC");
 metrics.stop();
 assertTrue(metrics.getRegistry().getMetrics().isEmpty());
}
origin: uk.gov.dstl.baleen/baleen-core

addServlet(new MetricsServlet(MetricsFactory.getInstance().getRegistry()), "/metrics");
addServlet(new StatusServlet(), "/status");
addServlet(new PipelineManagerServlet(baleenManager.getPipelineManager()), "/pipelines/*");
  .getServletContext()
  .setAttribute(
    InstrumentedFilter.REGISTRY_ATTRIBUTE, MetricsFactory.getInstance().getRegistry());
servletContextHandler.addFilter(
  InstrumentedFilter.class, "/*", EnumSet.of(DispatcherType.REQUEST));
origin: dstl/baleen

addServlet(new MetricsServlet(MetricsFactory.getInstance().getRegistry()), "/metrics");
addServlet(new StatusServlet(), "/status");
addServlet(new PipelineManagerServlet(baleenManager.getPipelineManager()), "/pipelines/*");
  .getServletContext()
  .setAttribute(
    InstrumentedFilter.REGISTRY_ATTRIBUTE, MetricsFactory.getInstance().getRegistry());
servletContextHandler.addFilter(
  InstrumentedFilter.class, "/*", EnumSet.of(DispatcherType.REQUEST));
origin: dstl/baleen

@Test
public void testDoesntCrash() {
 MetricsFactory factory = MetricsFactory.getInstance();
 factory.getRegistry().addListener(new LoggingMetricListener());
 assertNotNull(factory.getCounter(LoggingMetricListenerTest.class, "a"));
 assertNotNull(factory.getHistogram(LoggingMetricListenerTest.class, "b"));
 assertNotNull(factory.getMeter(LoggingMetricListenerTest.class, "c"));
 assertNotNull(factory.getTimer(LoggingMetricListenerTest.class, "d"));
 factory.removeAll();
}
uk.gov.dstl.baleen.core.metricsMetricsFactorygetRegistry

Javadoc

Get the underlying metrics registry.

Popular methods of MetricsFactory

  • getMetrics
    Get a new metrics provider for a specific class.
  • getInstance
    Get singleton instance
  • configure
    Configure the instance.
  • getCounter
    Get or create a metric counter, with default naming.
  • getHistogram
    Get or create a metric histogram, with default naming.
  • getMeter
    Get or create a metric meter, with default naming.
  • getPipelineMetrics
    Get an instance of PipelineMetrics for the given pipeline name
  • getTimer
    Get or create a metric timer, with default naming.
  • makeName
    Create a name using the default scheme.
  • removeAll
    Remove all metrics from the registry
  • start
  • stop
  • start,
  • stop,
  • <init>,
  • report

Popular in Java

  • Running tasks concurrently on multiple threads
  • requestLocationUpdates (LocationManager)
  • getContentResolver (Context)
  • setScale (BigDecimal)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Collectors (java.util.stream)
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top PhpStorm 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