public void Counter_SingleLabelsBaseLine()
 {
     for (var i = 0; i < _metricsPerIteration; i++)
     {
         TheirMetricFactory.CreateCounter("testcounter", _help, "foo", "bar", "baz");
     }
 }
 public void Counter_SingleBaseLine()
 {
     for (var i = 0; i < _metricsPerIteration; i++)
     {
         TheirMetricFactory.CreateCounter("testcounter", _help);
     }
 }
 public void Gauge_ManyWithLabelsBaseLine()
 {
     for (var i = 0; i < _metricsPerIteration; i++)
     {
         TheirMetricFactory.CreateGauge(_metricNames[i], _help, "foo", "bar", "baz");
     }
 }
 public void Gauge_ManyBaseLine()
 {
     for (var i = 0; i < _metricsPerIteration; i++)
     {
         TheirMetricFactory.CreateGauge(_metricNames[i], _help);
     }
 }
 public void Gauge_SingleSharedLabelsBaseLine()
 {
     for (var i = 0; i < _metricsPerIteration; i++)
     {
         TheirMetricFactory.CreateGauge("testgauge", _help, _labelNames);
     }
 }
 public void Gauge_SingleLabelsBaseLine()
 {
     for (var i = 0; i < _metricsPerIteration; i++)
     {
         TheirMetricFactory.CreateGauge("testgauge", _help, "foo", "bar", "baz");
     }
 }
Beispiel #7
0
 public void Single_Baseline()
 {
     for (var i = 0; i < _metricsPerIteration; i++)
     {
         TheirMetricFactory.CreateGauge("testgauge", HelpText);
     }
 }
Beispiel #8
0
        public void Setup()
        {
            _counter      = OurMetricFactory.CreateCounter("testcounter", string.Empty);
            _counterInt64 = OurMetricFactory.CreateCounterInt64("testcounterInt64", string.Empty);

            _theirCounter = TheirMetricFactory.CreateCounter("testcounter", string.Empty);
        }
 public void Counter_SingleSharedLabelsBaseLine()
 {
     for (var i = 0; i < _metricsPerIteration; i++)
     {
         TheirMetricFactory.CreateCounter("testcounter", _help, _labelNames);
     }
 }
Beispiel #10
0
        public void Setup()
        {
            _gauge      = OurMetricFactory.CreateGauge("testgauge", HelpText);
            _gaugeInt64 = OurMetricFactory.CreateGaugeInt64("testgaugeInt64", HelpText);

            _theirGauge = TheirMetricFactory.CreateGauge("testgauge", HelpText);
        }
 public void ManyWithLabels_Baseline()
 {
     for (var i = 0; i < _metricsPerIteration; i++)
     {
         TheirMetricFactory.CreateHistogram(_metricNames[i], HelpText, "foo", "bar", "baz");
     }
 }
 public void Gauge_SingleBaseLine()
 {
     for (var i = 0; i < _metricsPerIteration; i++)
     {
         TheirMetricFactory.CreateGauge("testgauge", _help);
     }
 }
 public void SingleWithSharedLabels_Baseline()
 {
     for (var i = 0; i < _metricsPerIteration; i++)
     {
         TheirMetricFactory.CreateHistogram("testhistogram", HelpText, _labelNames);
     }
 }
 public void SingleLabels_Baseline()
 {
     for (var i = 0; i < _metricsPerIteration; i++)
     {
         TheirMetricFactory.CreateSummary("testsummary", HelpText, "foo", "bar", "baz");
     }
 }
 public void Single_Baseline()
 {
     for (var i = 0; i < _metricsPerIteration; i++)
     {
         TheirMetricFactory.CreateSummary("testsummary", HelpText);
     }
 }
 public void Many_Baseline()
 {
     for (var i = 0; i < _metricsPerIteration; i++)
     {
         TheirMetricFactory.CreateHistogram(_metricNames[i], HelpText);
     }
 }
 public void Single_Baseline()
 {
     for (var i = 0; i < _metricsPerIteration; i++)
     {
         TheirMetricFactory.CreateHistogram("testhistogram", HelpText);
     }
 }
 public void SingleWithLabels_Baseline()
 {
     for (var i = 0; i < _metricsPerIteration; i++)
     {
         TheirMetricFactory.CreateHistogram("testhistogram", HelpText, "foo", "bar", "baz");
     }
 }
 public void WithLabels_Baseline()
 {
     for (var i = 0; i < _metricsCount; i++)
     {
         var summary = TheirMetricFactory.CreateSummary(_metricNames[i], HelpText, "foo", "bar", "baz");
         summary.Observe(i / 100d);
     }
 }
 public void WithLabels_Baseline()
 {
     for (var i = 0; i < _metricsCount; i++)
     {
         var histogram = TheirMetricFactory.CreateHistogram(_metricNames[i], HelpText, "foo", "bar", "baz");
         histogram.Observe(i / 100d);
     }
 }
Beispiel #21
0
 public void NoLabels_Baseline()
 {
     for (var i = 0; i < _metricsCount; i++)
     {
         var counter = TheirMetricFactory.CreateCounter(_metricNames[i], HelpText);
         counter.Inc();
     }
 }
Beispiel #22
0
 public void WithLabels_Baseline()
 {
     for (var i = 0; i < _metricsCount; i++)
     {
         var gauge = TheirMetricFactory.CreateGauge(_metricNames[i], HelpText, "foo", "bar", "baz");
         gauge.Inc();
     }
 }
Beispiel #23
0
 public void WithLabelsAndSamples_Baseline()
 {
     for (var i = 0; i < _metricsCount; i++)
     {
         var gauge = TheirMetricFactory.CreateGauge(_metricNames[i], HelpText, "foo", "bar", "baz");
         for (var j = 0; j < _samplesCount; j++)
         {
             gauge.WithLabels(_labelValues[j][0], _labelValues[j][1], _labelValues[j][2]).Inc();
         }
     }
 }
Beispiel #24
0
 public void WithLabelsAndSamples_Baseline()
 {
     for (var i = 0; i < _metricsCount; i++)
     {
         var counter = TheirMetricFactory.CreateCounter(_metricNames[i], HelpText, "foo", "bar", "baz");
         for (var j = 0; j < _labelValues.Length; j++)
         {
             counter.WithLabels(_labelValues[j][0], _labelValues[j][1], _labelValues[j][2]).Inc();
         }
     }
 }
 public void WithLabelsAndSamples_Baseline()
 {
     for (var i = 0; i < _metricsCount; i++)
     {
         var summary = TheirMetricFactory.CreateSummary(_metricNames[i], HelpText, "foo", "bar", "baz");
         for (var j = 0; j < _samplesCount; j++)
         {
             summary.WithLabels(_labelValues[j][0], _labelValues[j][1], _labelValues[j][2]).Observe(i / 100d);
         }
     }
 }
        public void Setup()
        {
            _histogramDefaultBuckets = OurMetricFactory.CreateHistogram("testhistogram1", HelpText);
            _histogramManyBuckets    = OurMetricFactory.CreateHistogram("testhistogram2", HelpText, false, _bucketsMany);

            _theirHistogramDefaultBuckets = TheirMetricFactory.CreateHistogram("testhistogram1", HelpText);
            _theirHistogramManyBuckets    = TheirMetricFactory.CreateHistogram("testhistogram2", HelpText, new Their.Prometheus.HistogramConfiguration()
            {
                Buckets = _bucketsMany
            });
        }
        public void Setup()
        {
            _summary      = OurMetricFactory.CreateSummary("testSummary1", HelpText);
            _theirSummary = TheirMetricFactory.CreateSummary("testSummary1", HelpText);
            _dataset      = new double[_opIterations];

            var rnd = new Random();

            for (int i = 0; i < _opIterations; i++)
            {
                _dataset[i] = rnd.NextDouble() * 100_000d;
            }
        }
        public CounterCollectingBenchmarks()
        {
            var labelNames    = GenerateLabelNames(_labelsCount).ToArray();
            var labelVariants = GenerateLabelValues(_variantsCount, _labelsCount);
            var rnd           = new Random();

            foreach (var metric in GenerateMetricNames(_metricsCount))
            {
                var ourMetric   = OurMetricFactory.CreateCounter(metric, HelpText, labelNames);
                var theirMetric = TheirMetricFactory.CreateCounter(metric, HelpText, labelNames);

                foreach (var labels in labelVariants)
                {
                    var val = rnd.Next(10000);
                    ourMetric.WithLabels(labels).Inc(val);
                    theirMetric.WithLabels(labels).Inc(val);
                }
            }
        }
        public HistogramCollectingBenchmarks()
        {
            var labelNames    = GenerateLabelNames(_labelsCount).ToArray();
            var labelVariants = GenerateLabelValues(_variantsCount, _labelsCount);
            var rnd           = new Random();

            foreach (var metric in GenerateMetricNames(_metricsCount))
            {
                var ourMetric   = OurMetricFactory.CreateHistogram(metric, HelpText, labelNames);
                var theirMetric = TheirMetricFactory.CreateHistogram(metric, HelpText, labelNames);

                foreach (var labels in labelVariants)
                {
                    for (var i = 0; i < _observationsCount; i++)
                    {
                        var val = rnd.Next(10);
                        ourMetric.WithLabels(labels).Observe(val);
                        theirMetric.WithLabels(labels).Observe(val);
                    }
                }
            }
        }