Package org.qi4j.api.metrics

Examples of org.qi4j.api.metrics.MetricsProvider


public class DefaultMetricsTest
{
    @Test
    public void givenMetricsProviderWithoutSupportForCounterWhenRequestingCounterExpectDefaultNullImplementation()
    {
        MetricsProvider underTest = new MetricsProviderAdapter();
        MetricsCounterFactory factory = underTest.createFactory( MetricsCounterFactory.class );
        MetricsCounter test = factory.createCounter( getClass(), "test" );
        test.increment();
        test.decrement();
    }
View Full Code Here


    }

    @Test
    public void givenMetricsProviderWithoutSupportForGaugeWhenRequestingGaugeExpectDefaultNullImplementation()
    {
        MetricsProvider underTest = new MetricsProviderAdapter();
        MetricsGaugeFactory factory = underTest.createFactory( MetricsGaugeFactory.class );
        MetricsGauge<Long> test = factory.registerGauge( getClass(), "test", new MetricsGauge<Long>()
        {
            @Override
            public Long value()
            {
View Full Code Here

    @Test
    public void givenMetricsProviderWithoutSupportForHealthCheckWhenRequestingHealthCheckExpectDefaultNullImplementation()
        throws Exception
    {
        MetricsProvider underTest = new MetricsProviderAdapter();
        MetricsHealthCheckFactory factory = underTest.createFactory( MetricsHealthCheckFactory.class );
        MetricsHealthCheck test = factory.registerHealthCheck( getClass(), "test", new MetricsHealthCheck()
        {
            @Override
            public Result check()
                throws Exception
View Full Code Here

    }

    @Test
    public void givenMetricsProviderWithoutSupportForHistogramWhenRequestingHistogramExpectDefaultNullImplementation()
    {
        MetricsProvider underTest = new MetricsProviderAdapter();
        MetricsHistogramFactory factory = underTest.createFactory( MetricsHistogramFactory.class );
        MetricsHistogram test = factory.createHistogram( getClass(), "test" );
        test.update( 5L );
        test.update( 5L );
        test.update( 5L );
    }
View Full Code Here

    }

    @Test
    public void givenMetricsProviderWithoutSupportForMeterWhenRequestingMeterExpectDefaultNullImplementation()
    {
        MetricsProvider underTest = new MetricsProviderAdapter();
        MetricsMeterFactory factory = underTest.createFactory( MetricsMeterFactory.class );
        MetricsMeter test = factory.createMeter( getClass(), "test", "niclas", TimeUnit.MILLISECONDS );
        test.mark();
        test.mark();
        test.mark();
    }
View Full Code Here

    }

    @Test
    public void givenMetricsProviderWithoutSupportForTimerWhenRequestingTimerExpectDefaultNullImplementation()
    {
        MetricsProvider underTest = new MetricsProviderAdapter();
        MetricsTimerFactory factory = underTest.createFactory( MetricsTimerFactory.class );
        MetricsTimer test = factory.createTimer( getClass(), "test", TimeUnit.MILLISECONDS, TimeUnit.DAYS );
        test.start().stop();
    }
View Full Code Here

TOP

Related Classes of org.qi4j.api.metrics.MetricsProvider

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.