Files
mtusi2026lab7/app/internal/password/benchmark_test.go
T

17 lines
283 B
Go

package password
import (
"context"
"testing"
)
func BenchmarkDefaultHash(b *testing.B) {
h := NewHasher(Default, 1)
b.ReportAllocs()
for i := 0; i < b.N; i++ {
if _, err := h.Hash(context.Background(), "synthetic-benchmark-password"); err != nil {
b.Fatal(err)
}
}
}