public void Can_add_add_new_instance_to_registry()
        {
            var metricName = "timer_provider_metric_test";
            var options    = new TimerOptions
            {
                Name = metricName
            };

            var timerMetric = _fixture.Builder.Timer.Build(() => new DefaultAlgorithmRReservoir(1028), _fixture.Clock);

            _provider.Instance(options, () => timerMetric);

            _filter.WhereName(name => name == metricName);

            _fixture.Registry.GetData(_filter).Contexts.First().Timers.Count().Should().Be(1);
        }
Ejemplo n.º 2
0
        public void Can_add_add_new_instance_to_registry()
        {
            var metricName = "meter_provider_metric_test";
            var options    = new MeterOptions
            {
                Name = metricName
            };

            var meterMetric = _fixture.Builder.Meter.Build(_fixture.Clock);

            _provide.Instance(options, () => meterMetric);

            _filter.WhereName(name => name == metricName);

            _fixture.Registry.GetData(_filter).Contexts.First().Meters.Count().Should().Be(1);
        }
        public void Can_add_add_new_instance_to_registry()
        {
            var metricName = "apdex_metric_test";
            var options    = new ApdexOptions
            {
                Name = metricName
            };

            var apdexMetric = _fixture.Builder.Apdex.Build(_defaultReservoir, 0.5, true, _fixture.Clock);

            _provider.Instance(options, () => apdexMetric);

            _filter.WhereName(name => name == metricName);

            _fixture.Registry.GetData(_filter).Contexts.First().ApdexScores.Count().Should().Be(1);
        }
Ejemplo n.º 4
0
        public void Can_add_add_new_instance_to_registry()
        {
            var metricName = "histogram_provider_metric_test";
            var options    = new HistogramOptions
            {
                Name = metricName
            };

            var apdexMetric = _fixture.Builder.Histogram.Build(() => new DefaultAlgorithmRReservoir(1028));

            _provider.Instance(options, () => apdexMetric);

            _filter.WhereName(name => name == metricName);

            _fixture.Registry.GetData(_filter).Contexts.First().Histograms.Count().Should().Be(1);
        }
Ejemplo n.º 5
0
        public void Can_add_instance_to_registry()
        {
            var metricName = "gauge_provider_test";

            var options = new GaugeOptions
            {
                Name = metricName
            };

            _provider.Instance(options, () => new FunctionGauge(() => 1.0));

            _filter.WhereName(name => name == metricName);

            _fixture.Registry.GetData(_filter).Contexts.First().Gauges.Count().Should().Be(1);
        }