go-tta/filter/filter_test.go
2017-08-23 15:32:30 +08:00

26 lines
426 B
Go

package filter
import (
"testing"
)
func BenchmarkCompatEncode(b *testing.B) {
f := New([8]byte{1, 2, 3, 4, 5, 6, 7, 8}, 8)
var in int32
b.RunParallel(func(pb *testing.PB) {
for pb.Next() {
CompatEncode(f, &in)
}
})
}
func BenchmarkCompatDecode(b *testing.B) {
f := New([8]byte{1, 2, 3, 4, 5, 6, 7, 8}, 8)
var in int32
b.RunParallel(func(pb *testing.PB) {
for pb.Next() {
CompatDecode(f, &in)
}
})
}