mirror of
https://github.com/prometheus/statsd_exporter.git
synced 2024-11-25 16:51:00 +00:00
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{},
|
||||
},
|
||||
},
|
||||
}, {
|
||||
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",
|
||||
|
|
Loading…
Reference in a new issue