public static void CounterRegularWithTags() { var tags = new Dictionary <string, string> { ["foo"] = "bar", ["another"] = "tag" }; var message = StatsDMessage.Counter(128, "bucket", tags); Check(message, "prefix.bucket;foo=bar;another=tag:128|c"); }
public void BufferBased() { Dictionary <string, string> tags = new Dictionary <string, string>(); tags.Add("key", " value"); tags.Add("key2", " value2"); FormatterBuffer.TryFormat(StatsDMessage.Gauge(255, "some.neat.bucket", null), 1, Buffer, out _); FormatterBuffer.TryFormat(StatsDMessage.Timing(255, "some.neat.bucket", null), 1, Buffer, out _); FormatterBuffer.TryFormat(StatsDMessage.Counter(255, "some.neat.bucket", null), 1, Buffer, out _); FormatterBuffer.TryFormat(StatsDMessage.Gauge(255, "some.neat.bucket", tags), 1, Buffer, out _); FormatterBuffer.TryFormat(StatsDMessage.Timing(255, "some.neat.bucket", tags), 1, Buffer, out _); FormatterBuffer.TryFormat(StatsDMessage.Counter(255, "some.neat.bucket", tags), 1, Buffer, out _); }
public void BufferBased() { FormatterBuffer.TryFormat(StatsDMessage.Gauge(255, "some.neat.bucket"), 1, Buffer, out _); FormatterBuffer.TryFormat(StatsDMessage.Timing(255, "some.neat.bucket"), 1, Buffer, out _); FormatterBuffer.TryFormat(StatsDMessage.Counter(255, "some.neat.bucket"), 1, Buffer, out _); }
public static void CounterNegative() { var message = StatsDMessage.Counter(-128, "bucket"); Check(message, "prefix.bucket:-128|c"); }
public static void CounterRegular() { var message = StatsDMessage.Counter(128, "bucket"); Check(message, "prefix.bucket:128|c"); }
public static void CounterSampled() { var message = StatsDMessage.Counter(128, "bucket"); Check(message, 0.5, "prefix.bucket:128|c|@0.5"); }