Exemplo n.º 1
0
        public static ICommandConfigSet CreateCustomConfigSet(IsolationModeEnum isolationMode = IsolationModeEnum.SemaphoreIsolation)
        {
            ICommandConfigSet configSet = ComponentFactory.CreateCommandConfigSet(isolationMode);

            configSet.ToConcrete().CircuitBreakerEnabled = false;
            configSet.CircuitBreakerErrorThresholdPercentage = 99;
            configSet.CircuitBreakerForceClosed           = true;
            configSet.CircuitBreakerForceOpen             = true;
            configSet.CircuitBreakerRequestCountThreshold = 99;
            configSet.ToConcrete().CircuitBreakerSleepWindowInMilliseconds = 4999;
            configSet.CommandMaxConcurrentCount    = 99;
            configSet.CommandTimeoutInMilliseconds = 4999;
            configSet.DegradeLogLevel                 = true;
            configSet.FallbackMaxConcurrentCount      = 4999;
            configSet.LogExecutionError               = true;
            configSet.MaxAsyncCommandExceedPercentage = 99;
            configSet.ToConcrete().MetricsHealthSnapshotIntervalInMilliseconds   = 10;
            configSet.ToConcrete().MetricsRollingPercentileBucketSize            = 50;
            configSet.ToConcrete().MetricsRollingPercentileEnabled               = false;
            configSet.ToConcrete().MetricsRollingPercentileWindowBuckets         = 20;
            configSet.ToConcrete().MetricsRollingPercentileWindowInMilliseconds  = 80 * 1000;
            configSet.ToConcrete().MetricsRollingStatisticalWindowBuckets        = 20;
            configSet.ToConcrete().MetricsRollingStatisticalWindowInMilliseconds = 200 * 1000;

            return(configSet);
        }