Add a benchmark for ssf.Sampled
@@ -93,3 +93,12 @@ func TestOptions(t *testing.T) {
})
}
}
+
+func BenchmarkSampled(b *testing.B) {
+ samples := make([]*SSFSample, 1000000)
+ for i := range samples {
+ samples[i] = Count("testing.counter", float32(i), nil)
+ }
+ b.ResetTimer()
+ samples = Sampled(0.2, samples...)
+}
