public void Setup() { _gauge = OurMetricFactory.CreateGauge("testgauge", HelpText); _gaugeInt64 = OurMetricFactory.CreateGaugeInt64("testgaugeInt64", HelpText); _theirGauge = TheirMetricFactory.CreateGauge("testgauge", HelpText); }
public void Single_Baseline() { for (var i = 0; i < _metricsPerIteration; i++) { TheirMetricFactory.CreateGauge("testgauge", HelpText); } }
public void SingleWithLabels_Baseline() { for (var i = 0; i < _metricsPerIteration; i++) { TheirMetricFactory.CreateGauge("testgauge", HelpText, "foo", "bar", "baz"); } }
public void Many_Baseline() { for (var i = 0; i < _metricsPerIteration; i++) { TheirMetricFactory.CreateGauge(_metricNames[i], HelpText); } }
public void ManyWithLabels_Baseline() { for (var i = 0; i < _metricsPerIteration; i++) { TheirMetricFactory.CreateGauge(_metricNames[i], HelpText, "foo", "bar", "baz"); } }
public void Gauge_ManyWithLabelsBaseLine() { for (var i = 0; i < _metricsPerIteration; i++) { TheirMetricFactory.CreateGauge(_metricNames[i], _help, "foo", "bar", "baz"); } }
public void SingleWithSharedLabels_Baseline() { for (var i = 0; i < _metricsPerIteration; i++) { TheirMetricFactory.CreateGauge("testgauge", HelpText, _labelNames); } }
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"); } }
public void Gauge_SingleBaseLine() { for (var i = 0; i < _metricsPerIteration; i++) { TheirMetricFactory.CreateGauge("testgauge", _help); } }
public void WithLabels_Baseline() { for (var i = 0; i < _metricsCount; i++) { var gauge = TheirMetricFactory.CreateGauge(_metricNames[i], HelpText, "foo", "bar", "baz"); gauge.Inc(); } }
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(); } } }
public GaugeCollectingBenchmarks() { var labelNames = GenerateLabelNames(_labelsCount); var labelVariants = GenerateLabelValues(_variantsCount, _labelsCount); var rnd = new Random(); foreach (var metric in GenerateMetricNames(_metricsCount)) { var ourMetric = OurMetricFactory.CreateGauge(metric, _helpText, labelNames); var theirMetric = TheirMetricFactory.CreateGauge(metric, _helpText, labelNames); foreach (var labels in labelVariants) { var val = rnd.Next(10000); ourMetric.WithLabels(labels).Inc(val); theirMetric.WithLabels(labels).Inc(val); } } }