Skip to content

Commit

Permalink
Collect memory stats during AEAD benchmarks.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 614563652
Change-Id: Ic84d75c34efc724b1f8a4a62bebe3b1d62f9e66e
  • Loading branch information
chuckx authored and copybara-github committed Mar 11, 2024
1 parent 2cf8ef2 commit 4109003
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions aead/aead_benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ import (

// Benchmarks for AEAD algorithms.

const plaintextSize = 16 * 1024
const associatedDataSize = 256

func BenchmarkEncryptDecrypt(b *testing.B) {
var testCases = []struct {
const (
plaintextSize = 16 * 1024
associatedDataSize = 256
)

testCases := []struct {
name string
template *tinkpb.KeyTemplate
}{
Expand Down Expand Up @@ -63,6 +65,8 @@ func BenchmarkEncryptDecrypt(b *testing.B) {
}
for _, tc := range testCases {
b.Run(tc.name, func(b *testing.B) {
b.ReportAllocs()

handle, err := keyset.NewHandle(tc.template)
if err != nil {
b.Fatal(err)
Expand Down

0 comments on commit 4109003

Please sign in to comment.