Пример #1
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();
        }
        public RollingCommandMaxConcurrencyStreamTest(ITestOutputHelper output) : base()
        {
            this.output = output;

            RollingCommandMaxConcurrencyStream.Reset();
            HystrixCommandStartStream.Reset();
        }
Пример #3
0
 public static void ShutdownThreads()
 {
     CumulativeCommandEventCounterStream.Reset();
     CumulativeThreadPoolEventCounterStream.Reset();
     RollingCommandEventCounterStream.Reset();
     RollingThreadPoolEventCounterStream.Reset();
     RollingCollapserEventCounterStream.Reset();
     RollingCollapserEventCounterStream.Reset();
     HealthCountsStream.Reset();
     RollingCollapserBatchSizeDistributionStream.Reset();
     RollingCommandLatencyDistributionStream.Reset();
     RollingCommandUserLatencyDistributionStream.Reset();
     RollingCommandMaxConcurrencyStream.Reset();
     RollingThreadPoolMaxConcurrencyStream.Reset();
 }
        internal static void Reset()
        {
            foreach (HystrixCommandMetrics metricsInstance in GetInstances())
            {
                metricsInstance.UnsubscribeAll();
            }

            RollingCommandEventCounterStream.Reset();
            CumulativeCommandEventCounterStream.Reset();
            RollingCommandLatencyDistributionStream.Reset();
            RollingCommandUserLatencyDistributionStream.Reset();
            RollingCommandMaxConcurrencyStream.Reset();
            HystrixThreadEventStream.Reset();
            HealthCountsStream.Reset();

            Metrics.Clear();
        }