mirror of
https://github.com/octoleo/restic.git
synced 2024-11-26 06:46:34 +00:00
Use correct buffer size for benchmark
This commit is contained in:
parent
4fd8222da6
commit
be03a31bdd
@ -156,12 +156,11 @@ func BenchmarkEncrypt(b *testing.B) {
|
||||
b.ResetTimer()
|
||||
b.SetBytes(int64(size))
|
||||
|
||||
buf := restic.GetChunkBuf("BenchmarkEncrypt")
|
||||
buf := make([]byte, len(data)+restic.CiphertextExtension)
|
||||
for i := 0; i < b.N; i++ {
|
||||
_, err := k.Encrypt(buf, data)
|
||||
ok(b, err)
|
||||
}
|
||||
restic.FreeChunkBuf("BenchmarkEncrypt", buf)
|
||||
}
|
||||
|
||||
func BenchmarkDecryptReader(b *testing.B) {
|
||||
|
Loading…
Reference in New Issue
Block a user