public TestCircuitBreaker()
        {
            ConfigSet = new CommandConfigSet()
            {
                CircuitBreakerEnabled = true,
                CircuitBreakerRequestCountThreshold    = 2,
                CircuitBreakerErrorThresholdPercentage = 50,
                CircuitBreakerForceClosed = false,
                CircuitBreakerForceOpen   = false,
                CircuitBreakerSleepWindowInMilliseconds = 5000,

                MetricsRollingStatisticalWindowBuckets        = 10,
                MetricsRollingStatisticalWindowInMilliseconds = 10000,
                MetricsRollingPercentileEnabled = true,
                MetricsRollingPercentileWindowInMilliseconds = 60000,
                MetricsRollingPercentileWindowBuckets        = 6,
                MetricsRollingPercentileBucketSize           = 100,
                MetricsHealthSnapshotIntervalInMilliseconds  = 1,

                CommandMaxConcurrentCount    = 10,
                CommandTimeoutInMilliseconds = 5000,

                FallbackMaxConcurrentCount = 10
            };

            _Metrics = ComponentFactory.CreateCommandMetrics(ConfigSet, "BreakerTest", IsolationModeEnum.SemaphoreIsolation);

            OpenFlag = new AtomicBoolean();
            CircuitOpenedOrLastTestedTime = new AtomicLong();
        }
 private ICommandMetrics GetMetrics(ICommandConfigSet configset)
 {
     return(ComponentFactory.CreateCommandMetrics(configset, "BreakerTest", IsolationModeEnum.SemaphoreIsolation));
 }