Tabnine Logo
MetricRegistry.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
com.codahale.metrics.MetricRegistry
constructor

Best Java code snippets using com.codahale.metrics.MetricRegistry.<init> (Showing top 20 results out of 2,340)

origin: apache/flink

protected ScheduledDropwizardReporter() {
  this.registry = new MetricRegistry();
}
origin: apache/incubator-druid

public DropwizardRowIngestionMeters()
{
 this.metricRegistry = new MetricRegistry();
 this.processed = metricRegistry.meter(PROCESSED);
 this.processedWithError = metricRegistry.meter(PROCESSED_WITH_ERROR);
 this.unparseable = metricRegistry.meter(UNPARSEABLE);
 this.thrownAway = metricRegistry.meter(THROWN_AWAY);
}
origin: resilience4j/resilience4j

/**
 * Creates a timer of a default MetricRegistry
 *
 * @param name the name of the timer
 * @return a Timer instance
 */
static Timer of(String name) {
  return new TimerImpl(name, new MetricRegistry());
}
origin: weibocom/motan

/**
 * 指定名字获取所属的实例。
 * 
 * @param name {@link MetricRegistry} 实例的名字。
 * @return {@link MetricRegistry} 实例。
 */
public static MetricRegistry getRegistryInstance(String name) {
  MetricRegistry instance = getRegistryCache.get(name);
  if (instance == null) {
    getRegistryCache.putIfAbsent(name, new MetricRegistry());
    instance = getRegistryCache.get(name);
  }
  return instance;
}
origin: weibocom/motan

/**
 * 指定类类型和几个名字的关键词,依据 {@link MetricRegistry} 的名字生成规则获取所属的实例。
 * 
 * @param clazz 类的类型。
 * @param names 关键字。
 * @return {@link MetricRegistry} 实例。
 */
public static MetricRegistry getRegistryInstance(Class<?> clazz, String... names) {
  final String key = MetricRegistry.name(clazz, names);
  MetricRegistry instance = getRegistryCache.get(key);
  if (instance == null) {
    getRegistryCache.putIfAbsent(key, new MetricRegistry());
    instance = getRegistryCache.get(key);
  }
  return instance;
}
origin: weibocom/motan

/**
 * 指定几个名字的关键词,依据 {@link MetricRegistry} 的名字生成规则获取所属的实例。
 * 
 * @param name 关键字。
 * @param names 剩余的关键字。
 * @return {@link MetricRegistry} 实例。
 */
public static MetricRegistry getRegistryInstance(String name, String... names) {
  final String key = MetricRegistry.name(name, names);
  MetricRegistry instance = getRegistryCache.get(key);
  if (instance == null) {
    getRegistryCache.putIfAbsent(key, new MetricRegistry());
    instance = getRegistryCache.get(key);
  }
  return instance;
}
origin: Graylog2/graylog2-server

public MetricRegistryProvider() {
  this.metricRegistry = new MetricRegistry();
  metricRegistry.register("jvm.buffers", new BufferPoolMetricSet(ManagementFactory.getPlatformMBeanServer()));
  metricRegistry.register("jvm.cl", new ClassLoadingGaugeSet());
  metricRegistry.register("jvm.gc", new GarbageCollectorMetricSet());
  metricRegistry.register("jvm.memory", new MemoryUsageGaugeSet());
  metricRegistry.register("jvm.threads", new ThreadStatesGaugeSet());
}
origin: dropwizard/dropwizard

/**
 * Creates a new {@link Bootstrap} for the given application.
 *
 * @param application a Dropwizard {@link Application}
 */
public Bootstrap(Application<T> application) {
  this.application = application;
  this.objectMapper = Jackson.newObjectMapper();
  this.configuredBundles = new ArrayList<>();
  this.commands = new ArrayList<>();
  this.validatorFactory = Validators.newValidatorFactory();
  this.metricRegistry = new MetricRegistry();
  this.configurationSourceProvider = new FileConfigurationSourceProvider();
  this.classLoader = Thread.currentThread().getContextClassLoader();
  this.configurationFactoryFactory = new DefaultConfigurationFactoryFactory<>();
  this.healthCheckRegistry = new HealthCheckRegistry();
}
origin: resilience4j/resilience4j

@Before
public void setUp(){
  metricRegistry = new MetricRegistry();
  helloWorldService = mock(AsyncHelloWorldService.class);
}
origin: resilience4j/resilience4j

@Before
public void setUp(){
  metricRegistry = new MetricRegistry();
  helloWorldService = mock(HelloWorldService.class);
}
origin: resilience4j/resilience4j

@Before
public void setUp() {
  metricRegistry = new MetricRegistry();
  helloWorldService = mock(HelloWorldService.class);
  executorService = Executors.newSingleThreadExecutor();
}
origin: resilience4j/resilience4j

@Before
public void setUp() {
  metricRegistry = new MetricRegistry();
  helloWorldService = mock(HelloWorldService.class);
}
origin: resilience4j/resilience4j

@Before
public void setUp(){
  metricRegistry = new MetricRegistry();
  helloWorldService = mock(HelloWorldService.class);
}
origin: Alluxio/alluxio

/**
 * Creates a new {@link JvmSource} and register all JVM metrics.
 */
public JvmSource() {
 mMetricRegistry = new MetricRegistry();
 mMetricRegistry.registerAll(new GarbageCollectorMetricSet());
 mMetricRegistry.registerAll(new MemoryUsageGaugeSet());
}
origin: resilience4j/resilience4j

@Before
public void setUp(){
  metricRegistry = new MetricRegistry();
  timer = Timer.ofMetricRegistry(TimerTest.class.getName(), metricRegistry);
  helloWorldService = mock(HelloWorldService.class);
}
origin: dropwizard/dropwizard

CloseableLiquibase openLiquibase(final PooledDataSourceFactory dataSourceFactory, final Namespace namespace)
    throws SQLException, LiquibaseException {
  final CloseableLiquibase liquibase;
  final ManagedDataSource dataSource = dataSourceFactory.build(new MetricRegistry(), "liquibase");
  final Database database = createDatabase(dataSource, namespace);
  final String migrationsFile = namespace.getString("migrations-file");
  if (migrationsFile == null) {
    liquibase = new CloseableLiquibaseWithClassPathMigrationsFile(dataSource, database, migrationsFileName);
  } else {
    liquibase = new CloseableLiquibaseWithFileSystemMigrationsFile(dataSource, database, migrationsFile);
  }
  return liquibase;
}
origin: azkaban/azkaban

@Test
public void testGetAzkabanURL() {
 final CommonMetrics commonMetrics = new CommonMetrics(new MetricsManager(new MetricRegistry()));
 final Emailer emailer = new Emailer(this.props, commonMetrics, this.messageCreator,
   this.executorLoader);
 assertThat(emailer.getAzkabanURL()).isEqualTo("http://localhost:8786");
}
origin: azkaban/azkaban

@Before
public void setUp() {
 final MetricRegistry metricRegistry = new MetricRegistry();
 this.testUtil = new MetricsTestUtility(metricRegistry);
 this.metrics = new CommonMetrics(new MetricsManager(metricRegistry));
}
origin: azkaban/azkaban

@Before
public void setUp() {
 final MetricRegistry metricRegistry = new MetricRegistry();
 this.testUtil = new MetricsTestUtility(metricRegistry);
 this.metrics = new WebMetrics(new MetricsManager(metricRegistry));
}
origin: azkaban/azkaban

@Before
public void setUp() {
 final MetricRegistry metricRegistry = new MetricRegistry();
 this.testUtil = new MetricsTestUtility(metricRegistry);
 this.metrics = new DBMetrics(new MetricsManager(metricRegistry));
}
com.codahale.metricsMetricRegistry<init>

Javadoc

Creates a new MetricRegistry.

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.
  • 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.
  • getMeters
    Returns a map of all the meters in the registry and their names which match the given filter.
  • getCounters,
  • getMeters,
  • registerAll,
  • getHistograms,
  • removeMatching,
  • getNames,
  • addListener,
  • gauge,
  • removeListener

Popular in Java

  • Running tasks concurrently on multiple threads
  • putExtra (Intent)
  • getSystemService (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • Kernel (java.awt.image)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • JFrame (javax.swing)
  • JTextField (javax.swing)
  • Best plugins for Eclipse
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