reset timer before benchmark

pull/2034/head
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
1 changed files with 1 additions and 0 deletions

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