reset timer before benchmark

pull/2034/head
v2ray 8 years ago
parent 99821dc2fb
commit 99a63f1633
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

@ -13,6 +13,7 @@ func benchmarkStream(b *testing.B, c cipher.Stream) {
b.SetBytes(benchSize)
input := make([]byte, benchSize)
output := make([]byte, benchSize)
b.ResetTimer()
for i := 0; i < b.N; i++ {
c.XORKeyStream(output, input)
}

Loading…
Cancel
Save