Java 类org.springframework.boot.actuate.metrics.reader.PrefixMetricReader 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:MetricRepositoryAutoConfigurationTests.java   
@Test
public void createServices() throws Exception {
    this.context = new AnnotationConfigApplicationContext(
            MetricRepositoryAutoConfiguration.class);
    GaugeService gaugeService = this.context.getBean(BufferGaugeService.class);
    assertThat(gaugeService).isNotNull();
    assertThat(this.context.getBean(BufferCounterService.class)).isNotNull();
    assertThat(this.context.getBean(PrefixMetricReader.class)).isNotNull();
    gaugeService.submit("foo", 2.7);
    MetricReader bean = this.context.getBean(MetricReader.class);
    assertThat(bean.findOne("gauge.foo").getValue()).isEqualTo(2.7);
}
项目:spring-boot-concourse    文件:MetricRepositoryAutoConfigurationTests.java   
@Test
public void createServices() throws Exception {
    this.context = new AnnotationConfigApplicationContext(
            MetricRepositoryAutoConfiguration.class);
    GaugeService gaugeService = this.context.getBean(BufferGaugeService.class);
    assertThat(gaugeService).isNotNull();
    assertThat(this.context.getBean(BufferCounterService.class)).isNotNull();
    assertThat(this.context.getBean(PrefixMetricReader.class)).isNotNull();
    gaugeService.submit("foo", 2.7);
    MetricReader bean = this.context.getBean(MetricReader.class);
    assertThat(bean.findOne("gauge.foo").getValue()).isEqualTo(2.7);
}
项目:contestparser    文件:MetricRepositoryAutoConfigurationTests.java   
@Test
public void createServices() throws Exception {
    this.context = new AnnotationConfigApplicationContext(
            MetricRepositoryAutoConfiguration.class);
    GaugeService gaugeService = this.context.getBean(BufferGaugeService.class);
    assertNotNull(gaugeService);
    assertNotNull(this.context.getBean(BufferCounterService.class));
    assertNotNull(this.context.getBean(PrefixMetricReader.class));
    gaugeService.submit("foo", 2.7);
    assertEquals(2.7,
            this.context.getBean(MetricReader.class).findOne("gauge.foo").getValue());
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:PrefixMetricGroupExporter.java   
/**
 * Create a new exporter for metrics to a writer based on a prefix for the metric
 * names.
 * @param reader a reader as the source of metrics
 * @param writer the writer to send the metrics to
 * @param prefix the prefix for metrics to export
 */
public PrefixMetricGroupExporter(PrefixMetricReader reader, PrefixMetricWriter writer,
        String prefix) {
    super(prefix);
    this.reader = reader;
    this.writer = writer;
}
项目:spring-boot-concourse    文件:PrefixMetricGroupExporter.java   
/**
 * Create a new exporter for metrics to a writer based on a prefix for the metric
 * names.
 * @param reader a reader as the source of metrics
 * @param writer the writer to send the metrics to
 * @param prefix the prefix for metrics to export
 */
public PrefixMetricGroupExporter(PrefixMetricReader reader, PrefixMetricWriter writer,
        String prefix) {
    super(prefix);
    this.reader = reader;
    this.writer = writer;
}
项目:contestparser    文件:PrefixMetricGroupExporter.java   
/**
 * Create a new exporter for metrics to a writer based on a prefix for the metric
 * names.
 * @param reader a reader as the source of metrics
 * @param writer the writer to send the metrics to
 * @param prefix the prefix for metrics to export
 */
public PrefixMetricGroupExporter(PrefixMetricReader reader, PrefixMetricWriter writer,
        String prefix) {
    super(prefix);
    this.reader = reader;
    this.writer = writer;
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:PrefixMetricGroupExporter.java   
/**
 * Create a new exporter for metrics to a writer based on an empty prefix for the
 * metric names.
 * @param reader a reader as the source of metrics
 * @param writer the writer to send the metrics to
 */
public PrefixMetricGroupExporter(PrefixMetricReader reader,
        PrefixMetricWriter writer) {
    this(reader, writer, "");
}
项目:spring-boot-concourse    文件:PrefixMetricGroupExporter.java   
/**
 * Create a new exporter for metrics to a writer based on an empty prefix for the
 * metric names.
 * @param reader a reader as the source of metrics
 * @param writer the writer to send the metrics to
 */
public PrefixMetricGroupExporter(PrefixMetricReader reader,
        PrefixMetricWriter writer) {
    this(reader, writer, "");
}
项目:contestparser    文件:PrefixMetricGroupExporter.java   
/**
 * Create a new exporter for metrics to a writer based on an empty prefix for the
 * metric names.
 * @param reader a reader as the source of metrics
 * @param writer the writer to send the metrics to
 */
public PrefixMetricGroupExporter(PrefixMetricReader reader,
        PrefixMetricWriter writer) {
    this(reader, writer, "");
}