public override void Dispose()
        {
            base.Dispose();

            stream.Unsubscribe();
            CumulativeCollapserEventCounterStream.Reset();
        }
예제 #2
0
        public void Before()
        {
            context = HystrixRequestContext.InitializeContext();

            HystrixCommandMetrics.Reset();
            HystrixThreadPoolMetrics.Reset();
            HystrixCollapserMetrics.Reset();

            // clear collapsers
            RequestCollapserFactory.Reset();

            // clear circuit breakers
            HystrixCircuitBreakerFactory.Reset();
            HystrixPlugins.Reset();
            HystrixOptionsFactory.Reset();

            // clear up all streams
            CumulativeCollapserEventCounterStream.Reset();
            CumulativeCommandEventCounterStream.Reset();
            CumulativeThreadPoolEventCounterStream.Reset();
            RollingCollapserBatchSizeDistributionStream.Reset();
            RollingCollapserEventCounterStream.Reset();
            RollingCommandEventCounterStream.Reset();
            RollingCommandLatencyDistributionStream.Reset();
            RollingCommandMaxConcurrencyStream.Reset();
            RollingCommandUserLatencyDistributionStream.Reset();
            RollingThreadPoolEventCounterStream.Reset();
            RollingThreadPoolMaxConcurrencyStream.Reset();
        }
예제 #3
0
#pragma warning restore S1199 // Nested code blocks should not be used

        internal static void Reset()
        {
            RollingCollapserEventCounterStream.Reset();
            CumulativeCollapserEventCounterStream.Reset();
            RollingCollapserBatchSizeDistributionStream.Reset();
            Metrics.Clear();
        }