Package org.springframework.boot.actuate.metrics.repository

Examples of org.springframework.boot.actuate.metrics.repository.InMemoryMetricRepository


  @ConditionalOnMissingBean(MetricRepository.class)
  static class MetricRepositoryConfiguration {

    @Bean
    public InMemoryMetricRepository metricRepository() {
      return new InMemoryMetricRepository();
    }
View Full Code Here


@Deprecated
public class VanillaPublicMetricsTests {

  @Test
  public void testMetrics() throws Exception {
    InMemoryMetricRepository repository = new InMemoryMetricRepository();
    repository.set(new Metric<Double>("a", 0.5, new Date()));
    VanillaPublicMetrics publicMetrics = new VanillaPublicMetrics(repository);
    Map<String, Metric<?>> results = new HashMap<String, Metric<?>>();
    for (Metric<?> metric : publicMetrics.metrics()) {
      results.put(metric.getName(), metric);
    }
View Full Code Here

    assertThat(results.get("a").getValue().doubleValue(), equalTo(0.5));
  }

  @Test
  public void testSystemMetrics() throws Exception {
    InMemoryMetricRepository repository = new InMemoryMetricRepository();
    repository.set(new Metric<Double>("a", 0.5, new Date()));
    VanillaPublicMetrics publicMetrics = new VanillaPublicMetrics(repository);
    Map<String, Metric<?>> results = new HashMap<String, Metric<?>>();
    for (Metric<?> metric : publicMetrics.metrics()) {
      results.put(metric.getName(), metric);
    }
View Full Code Here

TOP

Related Classes of org.springframework.boot.actuate.metrics.repository.InMemoryMetricRepository

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.