forked from mirrors/statsd_exporter
Add test for gauge with sample rate
Signed-off-by: Amit Saha <amitsaha.in@gmail.com>
This commit is contained in:
parent
1bddef857d
commit
5b44b372d1
1 changed files with 10 additions and 0 deletions
|
@ -46,6 +46,16 @@ func TestHandlePacket(t *testing.T) {
|
||||||
labels: map[string]string{},
|
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",
|
name: "gauge decrement",
|
||||||
in: "foo:-10|g",
|
in: "foo:-10|g",
|
||||||
|
|
Loading…
Reference in a new issue