Example #1
0
  @Before
  public void setup() {
    metricsRegistry =
        new MetricsRegistryImpl(Logger.getLogger(MetricsRegistryImpl.class), ProbeLevel.INFO);

    for (String name : metricsRegistry.getNames()) {
      ProbeInstance probeInstance = metricsRegistry.getProbeInstance(name);
      if (probeInstance != null && probeInstance.source != null) {
        metricsRegistry.deregister(probeInstance.source);
      }
    }
  }