Java Code Examples for com.netflix.hystrix.metric.consumer.HealthCountsStream

Following code examples demonstrate how to use com.netflix.hystrix.metric.consumer.HealthCountsStream from netflix-hystrix. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use com.netflix.hystrix.metric.consumer.HealthCountsStream and various code implementation of this class.
Example 1
Project : netflix-hystrix Source File : DemoApplicationTests.java View Source Code on GitHub

    public void setUp() {
        doNothing().when(mockedBehavior).executeCommand(SUCCESS_CASE);
        doThrow(new ExecuteCommandTestException()).when(mockedBehavior).executeCommand(FAILURE_CASE);
        hystrixCommandWrapper = new AbstractCommandExceptionCatcher(hystrixCommandStandardConfiguration,
                Collections.singletonList(ExecuteCommandTestException.class), PRINT_STATISTICS) {
        };
        Hystrix.reset();
        HystrixPlugins.reset();
        HealthCountsStream.reset();
        circuitBreakerAssertNull();

    }
			
Example 2
Project : netflix-hystrix Source File : HystrixCommandMetrics.java View Source Code on GitHub

    HystrixCommandMetrics(final HystrixCommandKey key, HystrixCommandGroupKey commandGroup, HystrixThreadPoolKey threadPoolKey, HystrixCommandProperties properties, HystrixEventNotifier eventNotifier) {
        super(null);
        this.key = key;
        this.group = commandGroup;
        this.threadPoolKey = threadPoolKey;
        this.properties = properties;

        healthCountsStream = HealthCountsStream.getInstance(key, properties);
        rollingCommandEventCounterStream = RollingCommandEventCounterStream.getInstance(key, properties);
        cumulativeCommandEventCounterStream = CumulativeCommandEventCounterStream.getInstance(key, properties);

        rollingCommandLatencyDistributionStream = RollingCommandLatencyDistributionStream.getInstance(key, properties);
        rollingCommandUserLatencyDistributionStream = RollingCommandUserLatencyDistributionStream.getInstance(key, properties);
        rollingCommandMaxConcurrencyStream = RollingCommandMaxConcurrencyStream.getInstance(key, properties);
    }