コード例 #1
0
        static void SetupSLABreachCounter()
        {
            var endpointSla = Configure.Instance.EndpointSLA();

            if (endpointSla == TimeSpan.Zero)
                return;

            var timeToSLABreachCalculator = new EstimatedTimeToSLABreachCalculator();
            var slaBreachCounter = InstantiateCounter("SLA violation countdown");

            timeToSLABreachCalculator.Initialize(endpointSla, slaBreachCounter);

            Configure.Instance.Configurer.RegisterSingleton<EstimatedTimeToSLABreachCalculator>(timeToSLABreachCalculator);
        }
コード例 #2
0
        static void SetupSLABreachCounter()
        {
            var endpointSla = Configure.Instance.EndpointSLA();

            if (endpointSla == TimeSpan.Zero)
            {
                return;
            }

            var timeToSLABreachCalculator = new EstimatedTimeToSLABreachCalculator();
            var slaBreachCounter          = InstantiateCounter("SLA violation countdown");

            timeToSLABreachCalculator.Initialize(endpointSla, slaBreachCounter);

            Configure.Instance.Configurer.RegisterSingleton <EstimatedTimeToSLABreachCalculator>(timeToSLABreachCalculator);
        }
コード例 #3
0
        static void SetupSLABreachCounter()
        {
            var endpointSla = Configure.Instance.EndpointSLA();

            if (endpointSla == TimeSpan.Zero)
                return;

            var timeToSLABreachCalculator = new EstimatedTimeToSLABreachCalculator();

            var slaBreachCounter = InstantiateCounter("SLA violation countdown");

            timeToSLABreachCalculator.SetCounterAction = d =>
                                                             {
                                                                 slaBreachCounter.RawValue = Convert.ToInt32(Math.Min(d, Int32.MaxValue));
                                                             };

            timeToSLABreachCalculator.Initialize(endpointSla);

            Configure.Instance.Configurer.RegisterSingleton<EstimatedTimeToSLABreachCalculator>(timeToSLABreachCalculator);
        }
コード例 #4
0
        static void SetupSLABreachCounter()
        {
            var endpointSla = Configure.Instance.EndpointSLA();

            if (endpointSla == TimeSpan.Zero)
            {
                return;
            }

            var timeToSLABreachCalculator = new EstimatedTimeToSLABreachCalculator();


            var slaBreachCounter = InstantiateCounter("SLA violation countdown");

            timeToSLABreachCalculator.SetCounterAction = d =>
            {
                slaBreachCounter.RawValue = Convert.ToInt32(Math.Min(d, Int32.MaxValue));
            };

            timeToSLABreachCalculator.Initialize(endpointSla);

            Configure.Instance.Configurer.RegisterSingleton <EstimatedTimeToSLABreachCalculator>(timeToSLABreachCalculator);
        }