public void SingleWithLabels_Tuple() { for (var i = 0; i < _metricsPerIteration; i++) { OurMetricFactory.CreateGauge("testgauge", HelpText, ("foo", "bar", "baz")); } }
public void Setup() { _gauge = OurMetricFactory.CreateGauge("testgauge", HelpText); _gaugeInt64 = OurMetricFactory.CreateGaugeInt64("testgaugeInt64", HelpText); _theirGauge = TheirMetricFactory.CreateGauge("testgauge", HelpText); }
public void ManyWithLabels_Tuple() { for (var i = 0; i < _metricsPerIteration; i++) { OurMetricFactory.CreateGauge(_metricNames[i], HelpText, ("foo", "bar", "baz")); } }
public void Single() { for (var i = 0; i < _metricsPerIteration; i++) { OurMetricFactory.CreateGauge("testgauge", HelpText, ValueTuple.Create()); } }
public void SingleWithSharedLabels_Array() { for (var i = 0; i < _metricsPerIteration; i++) { OurMetricFactory.CreateGauge("testgauge", HelpText, false, _labelNames); } }
public void Many() { for (var i = 0; i < _metricsPerIteration; i++) { OurMetricFactory.CreateGauge(_metricNames[i], HelpText, ValueTuple.Create()); } }
public void Gauge_ManyTuple() { for (var i = 0; i < _metricsPerIteration; i++) { OurMetricFactory.CreateGauge(_metricNames[i], _help); } }
public void Gauge_ManyWithLabels() { for (var i = 0; i < _metricsPerIteration; i++) { OurMetricFactory.CreateGauge(_metricNames[i], _help, MetricFlags.Default, "foo", "bar", "baz"); } }
public void Gauge_SingleSharedLabels() { for (var i = 0; i < _metricsPerIteration; i++) { OurMetricFactory.CreateGauge("testgauge", _help, MetricFlags.Default, _labelNames); } }
public void Gauge_SingleLabelsTuple() { for (var i = 0; i < _metricsPerIteration; i++) { OurMetricFactory.CreateGauge("testgauge", _help, ("foo", "bar", "baz")); } }
public void Gauge_SingleLabels() { for (var i = 0; i < _metricsPerIteration; i++) { OurMetricFactory.CreateGauge("testgauge", _help, MetricFlags.Default, "foo", "bar", "baz"); } }
public void Gauge_Single() { for (var i = 0; i < _metricsPerIteration; i++) { OurMetricFactory.CreateGauge("testgauge", _help); } }
public void WithLabels_Tuple() { for (var i = 0; i < _metricsCount; i++) { var gauge = OurMetricFactory.CreateGauge(_metricNames[i], HelpText, ("foo", "bar", "baz")); gauge.Inc(); } }
public void NoLabels() { for (var i = 0; i < _metricsCount; i++) { var gauge = OurMetricFactory.CreateGauge(_metricNames[i], HelpText); gauge.Inc(); } }
public void WithLabelsAndSamples_Tuple() { for (var i = 0; i < _metricsCount; i++) { var gauge = OurMetricFactory.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); } } }