Exemple #1
0
        public void can_reset()
        {
            _histogram.Update(1L);
            _histogram.Update(10L);

            _histogram.Value.Count.Should().NotBe(0);
            _histogram.Value.LastValue.Should().NotBe(0);
            _histogram.Value.Median.Should().NotBe(0);

            _histogram.Reset();

            _histogram.Value.Count.Should().Be(0);
            _histogram.Value.LastValue.Should().Be(0);
            _histogram.Value.Median.Should().Be(0);
        }
        public void HistogramMetric_CanReset()
        {
            histogram.Update(1L);
            histogram.Update(10L);

            histogram.Value.Count.Should().NotBe(0);
            histogram.Value.LastValue.Should().NotBe(0);
            histogram.Value.Median.Should().NotBe(0);

            histogram.Reset();

            histogram.Value.Count.Should().Be(0);
            histogram.Value.LastValue.Should().Be(0);
            histogram.Value.Median.Should().Be(0);
        }