diff options
Diffstat (limited to 'internal/speed/speed_test.go')
-rw-r--r-- | internal/speed/speed_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/speed/speed_test.go b/internal/speed/speed_test.go index 5f3001b..39ef918 100644 --- a/internal/speed/speed_test.go +++ b/internal/speed/speed_test.go @@ -3,6 +3,7 @@ package speed import ( "crypto/aes" "crypto/cipher" + "fmt" "testing" "golang.org/x/crypto/chacha20poly1305" @@ -38,6 +39,13 @@ func BenchmarkGoGCM(b *testing.B) { bGoGCM(b) } +func BenchmarkGoGCMBlockSize(b *testing.B) { + for blockSize := 1024; blockSize <= 1024*1024; blockSize *= 2 { + name := fmt.Sprintf("%d", blockSize) + b.Run(name, func(b *testing.B) { bGoGCMBlockSize(b, blockSize) }) + } +} + func BenchmarkGoGCMDecrypt(b *testing.B) { gAES, err := aes.NewCipher(randBytes(32)) if err != nil { |