Skip to content

Commit

Permalink
benchmark new
Browse files Browse the repository at this point in the history
  • Loading branch information
schollz committed Sep 23, 2024
1 parent 9be175f commit 5c5e003
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/crypt/crypt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@ func BenchmarkDecrypt(b *testing.B) {
}
}

func BenchmarkNewPbkdf2(b *testing.B) {
b.ResetTimer()
for i := 0; i < b.N; i++ {
New([]byte("password"), nil)
}
}

func BenchmarkNewArgon2(b *testing.B) {
b.ResetTimer()
for i := 0; i < b.N; i++ {
NewArgon2([]byte("password"), nil)
}
}

func BenchmarkEncryptChaCha(b *testing.B) {
bob, _, _ := NewArgon2([]byte("password"), nil)
for i := 0; i < b.N; i++ {
Expand Down

0 comments on commit 5c5e003

Please sign in to comment.