title: Dropwizard Metrics Performance overhead in Spring Boot
body: <p>I am using dropwizard metrics in Spring boot REST service, </p>
  
  <pre><code>    &lt;!--Dropwizard Metrics for Spring--&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.ryantenney.metrics&lt;/groupId&gt;
          &lt;artifactId&gt;metrics-spring&lt;/artifactId&gt;
          &lt;version&gt;3.1.3&lt;/version&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;com.codahale.metrics&lt;/groupId&gt;
                  &lt;artifactId&gt;metrics-core&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>// MetricsConfig.java</p>
  
  <pre><code>import com.codahale.metrics.ConsoleReporter;
  import com.codahale.metrics.MetricRegistry;
  import com.ryantenney.metrics.spring.config.annotation.EnableMetrics;
  import com.ryantenney.metrics.spring.config.annotation.MetricsConfigurerAdapter;
  import org.springframework.context.annotation.Configuration;
  
  import java.util.concurrent.TimeUnit;
  
      @Configuration
      @EnableMetrics(proxyTargetClass = true)
      public class MetricsConfig extends MetricsConfigurerAdapter {
  
           @Override
  
          public void configureReporters(MetricRegistry metricRegistry) {
              // registerReporter allows the MetricsConfigurerAdapter to
              // shut down the reporter when the Spring context is closed
              registerReporter(ConsoleReporter
                      .forRegistry(metricRegistry)
                      .build())
                      .start(60, TimeUnit.MINUTES);
          }
  
  }
  </code></pre>
  
  <p>From the configuration above, every hour dropwizard will spit out metrics to Console, so meanwhile, Where does dropwizard metrics stores and captures the metrics data? Is it Java heap and whats the performance impact there and a way to fine tune this.</p>