save 1-loc

This commit is contained in:
xtaci
2019-05-15 16:14:14 +08:00
parent 4299d21e8f
commit f5fa48311f
2 changed files with 13 additions and 5 deletions
+10 -1
View File
@@ -1,6 +1,9 @@
package smux
import "testing"
import (
"math/rand"
"testing"
)
func TestAllocGet(t *testing.T) {
alloc := NewAllocator()
@@ -70,3 +73,9 @@ func TestAllocPutThenGet(t *testing.T) {
}
}
}
func BenchmarkMSB(b *testing.B) {
for i := 0; i < b.N; i++ {
msb(rand.Int())
}
}