io.micrometer.core.instrument.internal.DefaultLongTaskTimer Java Examples

The following examples show how to use io.micrometer.core.instrument.internal.DefaultLongTaskTimer. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DropwizardMeterRegistry.java    From micrometer with Apache License 2.0 5 votes vote down vote up
@Override
protected LongTaskTimer newLongTaskTimer(Meter.Id id, DistributionStatisticConfig distributionStatisticConfig) {
    LongTaskTimer ltt = new DefaultLongTaskTimer(id, clock, getBaseTimeUnit(), distributionStatisticConfig, false);
    registry.register(hierarchicalName(id.withTag(Statistic.ACTIVE_TASKS)), (Gauge<Integer>) ltt::activeTasks);
    registry.register(hierarchicalName(id.withTag(Statistic.DURATION)), (Gauge<Double>) () -> ltt.duration(TimeUnit.NANOSECONDS));
    registry.register(hierarchicalName(id.withTag(Statistic.MAX)), (Gauge<Double>) () -> ltt.max(TimeUnit.NANOSECONDS));
    HistogramGauges.registerWithCommonFormat(ltt, this);
    return ltt;
}
 
Example #2
Source File: StepMeterRegistry.java    From micrometer with Apache License 2.0 4 votes vote down vote up
@Override
protected LongTaskTimer newLongTaskTimer(Meter.Id id, DistributionStatisticConfig distributionStatisticConfig) {
    LongTaskTimer ltt = new DefaultLongTaskTimer(id, clock, getBaseTimeUnit(), distributionStatisticConfig, false);
    HistogramGauges.registerWithCommonFormat(ltt, this);
    return ltt;
}
 
Example #3
Source File: SimpleMeterRegistry.java    From micrometer with Apache License 2.0 4 votes vote down vote up
@Override
protected LongTaskTimer newLongTaskTimer(Meter.Id id, DistributionStatisticConfig distributionStatisticConfig) {
    DefaultLongTaskTimer ltt = new DefaultLongTaskTimer(id, clock, getBaseTimeUnit(), distributionStatisticConfig, false);
    HistogramGauges.registerWithCommonFormat(ltt, this);
    return ltt;
}
 
Example #4
Source File: DefaultMetricsConverterTest.java    From cf-java-logging-support with Apache License 2.0 4 votes vote down vote up
public DefaultMetricsConverterTest() {
    super(new DefaultLongTaskTimer(ID, Clock.SYSTEM), new DefaultMetricsConverter());
}
 
Example #5
Source File: DefaultDestinationPublishingMeterRegistry.java    From spring-cloud-stream with Apache License 2.0 4 votes vote down vote up
@Override
protected LongTaskTimer newLongTaskTimer(Meter.Id id) {
	return new DefaultLongTaskTimer(id, this.clock);
}