public static void TimingWithTags() { var tags = new Dictionary <string, string> { ["foo"] = "bar", ["another"] = "tag" }; var message = StatsDMessage.Timing(128, "bucket", tags); Check(message, "prefix.bucket;foo=bar;another=tag:128|ms"); }
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 TimingSampled() { var message = StatsDMessage.Timing(128, "bucket"); Check(message, 0.5, "prefix.bucket:128|ms|@0.5"); }
public static void Timing() { var message = StatsDMessage.Timing(128, "bucket"); Check(message, "prefix.bucket:128|ms"); }