An untyped version of a gauge for reporting purposes
Esempio n. 1
0
        public void Can_gauge_scalar_value()
        {
            var queue = new Queue<int>();
            var gauge = new GaugeMetric<int>(() => queue.Count);

            queue.Enqueue(5);
            Assert.AreEqual(1, gauge.Value);

            queue.Enqueue(6);
            queue.Dequeue();
            Assert.AreEqual(1, gauge.Value);

            queue.Dequeue();
            Assert.AreEqual(0, gauge.Value);
        }
 protected void WriteGauge(StringBuilder sb, GaugeMetric gauge)
 {
     sb.Append("    value = ");
     sb.AppendLine(gauge.ValueAsString);
 }
Esempio n. 3
0
 private void WriteGauge(GaugeMetric gauge)
 {
     _out.Write("    value = ");
     _out.WriteLine(gauge.ValueAsString);
 }
 private void LogGauge(IRequest request, MetricName metricName, GaugeMetric metric, long timestamp)
 {
     LogGauge(request, metricName.Name, System.Convert.ToInt64(metric.ValueAsString), timestamp);
 }