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); }
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); }
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); }
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); }