Exemple #1
0
        public void Threshold_is_set_as_label()
        {
            timer = OkanshiMonitor.SlaTimer("name", TimeSpan.FromSeconds(2));
            var thresholdTag = timer.Config.Tags.Single(x => x.Key == SlaTimer.ThresholdKey).Value;

            thresholdTag.Should().Be("2000");
        }
Exemple #2
0
 public void Can_get_timer_from_okanshimonitor()
 {
     timer = OkanshiMonitor.SlaTimer("name", TimeSpan.FromSeconds(2));
     timer.Should().NotBeNull();
 }
Exemple #3
0
 public SlaTimerTest()
 {
     DefaultMonitorRegistry.Instance.Clear();
     timer = new SlaTimer(MonitorConfig.Build("Test"), () => stopwatch, TimeSpan.FromSeconds(3));
 }