Ejemplo n.º 1
0
        public void HistogramHighBucketsStore(double[] buckets, IReadOnlyList <double> items, long[] expectedBuckets)
        {
            var backetStore = new HistogramHighBucketsStore(buckets);

            foreach (var item in items)
            {
                backetStore.Observe(item);
            }

            Assert.Equal(expectedBuckets, backetStore.Buckets.Select(b => b.Value));
        }
Ejemplo n.º 2
0
        public void HistogramHighBucketsStoreReset(double[] buckets, IReadOnlyList <double> items, long[] _)
        {
            var expectedBuckets = new long[buckets.Length + 1];
            var backetStore     = new HistogramHighBucketsStore(buckets);

            foreach (var item in items)
            {
                backetStore.Observe(item);
            }

            backetStore.Reset();

            Assert.Equal(expectedBuckets, backetStore.Buckets.Select(b => b.Value));
        }