public override void Dispose() { base.Dispose(); stream.Unsubscribe(); CumulativeCollapserEventCounterStream.Reset(); }
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(); }
#pragma warning restore S1199 // Nested code blocks should not be used internal static void Reset() { RollingCollapserEventCounterStream.Reset(); CumulativeCollapserEventCounterStream.Reset(); RollingCollapserBatchSizeDistributionStream.Reset(); Metrics.Clear(); }