Add test for gauge with sample rate

Signed-off-by: Amit Saha <amitsaha.in@gmail.com>
This commit is contained in:
Amit Saha 2019-09-13 14:30:52 +10:00
parent 1bddef857d
commit 5b44b372d1

View file

@ -46,6 +46,16 @@ func TestHandlePacket(t *testing.T) {
labels: map[string]string{},
},
},
}, {
name: "gauge with sampling",
in: "foo:3|g|@0.2",
out: Events{
&GaugeEvent{
metricName: "foo",
value: 3,
labels: map[string]string{},
},
},
}, {
name: "gauge decrement",
in: "foo:-10|g",