1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 01:57:12 -05:00

reset timer before benchmark

This commit is contained in:
v2ray 2016-08-17 10:28:30 +02:00
parent 99821dc2fb
commit 99a63f1633
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -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)
}