当前位置: 首页>>代码示例>>Java>>正文


Java SharedMetricRegistries.clear方法代码示例

本文整理汇总了Java中com.codahale.metrics.SharedMetricRegistries.clear方法的典型用法代码示例。如果您正苦于以下问题:Java SharedMetricRegistries.clear方法的具体用法?Java SharedMetricRegistries.clear怎么用?Java SharedMetricRegistries.clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.codahale.metrics.SharedMetricRegistries的用法示例。


在下文中一共展示了SharedMetricRegistries.clear方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onPassivate

import com.codahale.metrics.SharedMetricRegistries; //导入方法依赖的package包/类
@Override
public void onPassivate( Application application )
{
    requestTimers.values().forEach( t -> t.stop() );
    requestTimers = null;
    reporters.forEach(
        r ->
        {
            if( r instanceof ScheduledReporter )
            {
                ( (ScheduledReporter) r ).stop();
            }
            else if( r instanceof JmxReporter )
            {
                ( (JmxReporter) r ).stop();
            }
        }
    );
    reporters = null;
    api = null;
    eventRegistration.unregister();
    eventRegistration = null;
    SharedMetricRegistries.clear();
    SharedHealthCheckRegistries.clear();
}
 
开发者ID:werval,项目名称:werval,代码行数:26,代码来源:MetricsPlugin.java

示例2: setUp

import com.codahale.metrics.SharedMetricRegistries; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
	Stagemonitor.reset();
	SharedMetricRegistries.clear();
	this.corePlugin = mock(CorePlugin.class);
	when(corePlugin.isStagemonitorActive()).thenReturn(true);

	final MockTracer tracer = new MockTracer(new ThreadLocalScopeManager(), new B3Propagator());

	TracingPlugin tracingPlugin = mock(TracingPlugin.class);
	when(tracingPlugin.getTracer()).thenReturn(tracer);

	mdcSpanInterceptor = new MDCSpanEventListener(corePlugin, tracingPlugin);
	spanWrapper = new SpanWrapper(tracer.buildSpan("operation name").start(),"operation name",
			1, 1, Collections.emptyList(), new ConcurrentHashMap<>());
}
 
开发者ID:stagemonitor,项目名称:stagemonitor,代码行数:17,代码来源:MDCSpanEventListenerTest.java

示例3: before

import com.codahale.metrics.SharedMetricRegistries; //导入方法依赖的package包/类
@Before
public void before() throws Exception {
	Stagemonitor.reset();
	SharedMetricRegistries.clear();
	ConfigurationRegistry configuration = ConfigurationRegistry.builder()
			.addOptionProvider(new TracingPlugin())
			.build();
	config = configuration.getConfig(TracingPlugin.class);
}
 
开发者ID:stagemonitor,项目名称:stagemonitor,代码行数:10,代码来源:TracingPluginConfigurationTest.java

示例4: setUp

import com.codahale.metrics.SharedMetricRegistries; //导入方法依赖的package包/类
@Before
public void setUp() {
    SharedMetricRegistries.clear();
}
 
开发者ID:smoketurner,项目名称:pipeline,代码行数:5,代码来源:AmazonSQSIteratorTest.java

示例5: setUp

import com.codahale.metrics.SharedMetricRegistries; //导入方法依赖的package包/类
@Override
public void setUp() throws Exception {
  SharedMetricRegistries.clear();
  SharedMetricRegistries.getOrCreate("the_name");
  super.setUp();
}
 
开发者ID:vert-x3,项目名称:vertx-dropwizard-metrics,代码行数:7,代码来源:ReuseSharedRegistryTest.java

示例6: setUp

import com.codahale.metrics.SharedMetricRegistries; //导入方法依赖的package包/类
@Override
public void setUp() throws Exception {
  SharedMetricRegistries.clear();
  super.setUp();
}
 
开发者ID:vert-x3,项目名称:vertx-dropwizard-metrics,代码行数:6,代码来源:SharedRegistryTest.java

示例7: clearSharedMetricRegistries

import com.codahale.metrics.SharedMetricRegistries; //导入方法依赖的package包/类
@After
public void clearSharedMetricRegistries() {
    SharedMetricRegistries.clear();
}
 
开发者ID:astefanutti,项目名称:metrics-aspectj,代码行数:5,代码来源:MeteredMethodWithExceptionsTest.java

示例8: clear

import com.codahale.metrics.SharedMetricRegistries; //导入方法依赖的package包/类
@AfterClass
public static void clear() {
	Stagemonitor.reset();
	SharedMetricRegistries.clear();
}
 
开发者ID:stagemonitor,项目名称:stagemonitor,代码行数:6,代码来源:MeterLoggingInstrumenterTest.java

示例9: clearSharedMetricRegistries

import com.codahale.metrics.SharedMetricRegistries; //导入方法依赖的package包/类
@AfterClass
public static void clearSharedMetricRegistries() {
    SharedMetricRegistries.clear();
}
 
开发者ID:astefanutti,项目名称:metrics-aspectj,代码行数:5,代码来源:TimedStaticMethodWithNameFromElExpressionTest.java

示例10: resetStagemonitor

import com.codahale.metrics.SharedMetricRegistries; //导入方法依赖的package包/类
@AfterClass
public static void resetStagemonitor() {
	Stagemonitor.reset();
	SharedMetricRegistries.clear();
}
 
开发者ID:stagemonitor,项目名称:stagemonitor,代码行数:6,代码来源:MultipleAnnotationsAndProfilerTest.java

示例11: reset

import com.codahale.metrics.SharedMetricRegistries; //导入方法依赖的package包/类
@AfterClass
public static void reset() {
	Stagemonitor.reset();
	SharedMetricRegistries.clear();
}
 
开发者ID:stagemonitor,项目名称:stagemonitor,代码行数:6,代码来源:ElasticsearchConfigurationSourceTest.java


注:本文中的com.codahale.metrics.SharedMetricRegistries.clear方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。