Search in sources :

Example 1 with HistogramImpl

use of fish.payara.microprofile.metrics.impl.HistogramImpl in project Payara by payara.

the class MetricRegistryImplTest method registerByMetadataAllowsToReuseAsLongAsMetadataIsSame.

@Test
public void registerByMetadataAllowsToReuseAsLongAsMetadataIsSame() {
    Histogram h1 = new HistogramImpl();
    assertExistingMetadataIsUsed(name -> registry.register(withName(name), h1), name -> registry.register(withName(name), new HistogramImpl()));
    assertSame(h1, registry.getHistograms().values().iterator().next());
}
Also used : Histogram(org.eclipse.microprofile.metrics.Histogram) HistogramImpl(fish.payara.microprofile.metrics.impl.HistogramImpl) Test(org.junit.Test)

Aggregations

HistogramImpl (fish.payara.microprofile.metrics.impl.HistogramImpl)1 Histogram (org.eclipse.microprofile.metrics.Histogram)1 Test (org.junit.Test)1