Skip to content

Commit 9012294

Browse files
committed
feat: add benchmark for hashpassword
1 parent 85dc468 commit 9012294

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

infrastructure/hash/hash_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,12 @@ func TestHashFormat(t *testing.T) {
105105
require.NotEmpty(t, parts[4]) // salt
106106
require.NotEmpty(t, parts[5]) // hash
107107
}
108+
109+
func BenchmarkHashPassword(b *testing.B) {
110+
password := random.RandomString(12)
111+
b.ResetTimer()
112+
113+
for i := 0; i < b.N; i++ {
114+
_, _ = HashPassword(password)
115+
}
116+
}

0 commit comments

Comments
 (0)