forked from mirrors/statsd_exporter
Fix test
Signed-off-by: Amit Saha <amitsaha.in@gmail.com>
This commit is contained in:
parent
028531e953
commit
d64c674394
1 changed files with 21 additions and 1 deletions
|
@ -159,13 +159,33 @@ func TestHandlePacket(t *testing.T) {
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
name: "histogram with sampling",
|
name: "histogram with sampling",
|
||||||
in: "foo:0.01|h|@0.1|#tag1:bar,#tag2:baz",
|
in: "foo:0.01|h|@0.2|#tag1:bar,#tag2:baz",
|
||||||
out: Events{
|
out: Events{
|
||||||
&TimerEvent{
|
&TimerEvent{
|
||||||
metricName: "foo",
|
metricName: "foo",
|
||||||
value: 0.01,
|
value: 0.01,
|
||||||
labels: map[string]string{"tag1": "bar", "tag2": "baz"},
|
labels: map[string]string{"tag1": "bar", "tag2": "baz"},
|
||||||
},
|
},
|
||||||
|
&TimerEvent{
|
||||||
|
metricName: "foo",
|
||||||
|
value: 0.01,
|
||||||
|
labels: map[string]string{"tag1": "bar", "tag2": "baz"},
|
||||||
|
},
|
||||||
|
&TimerEvent{
|
||||||
|
metricName: "foo",
|
||||||
|
value: 0.01,
|
||||||
|
labels: map[string]string{"tag1": "bar", "tag2": "baz"},
|
||||||
|
},
|
||||||
|
&TimerEvent{
|
||||||
|
metricName: "foo",
|
||||||
|
value: 0.01,
|
||||||
|
labels: map[string]string{"tag1": "bar", "tag2": "baz"},
|
||||||
|
},
|
||||||
|
&TimerEvent{
|
||||||
|
metricName: "foo",
|
||||||
|
value: 0.01,
|
||||||
|
labels: map[string]string{"tag1": "bar", "tag2": "baz"},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
name: "datadog tag extension with multiple colons",
|
name: "datadog tag extension with multiple colons",
|
||||||
|
|
Loading…
Reference in a new issue