Benchmark a fresh generator's first Fake, where shipped loading now costs

This commit is contained in:
2026-10-03 17:31:39 +02:00
committed by Lillem4n
parent 8b3bbc4003
commit 77fb7b69f6
+13
View File
@@ -86,6 +86,19 @@ func BenchmarkHeldWide(b *testing.B) {
benchPath(b, dir, "row") benchPath(b, dir, "row")
} }
func BenchmarkFirstFake(b *testing.B) {
b.ReportAllocs()
for i := 0; i < b.N; i++ {
f, err := New(WithSeed(1))
if err != nil {
b.Fatal(err)
}
if _, err := f.Fake("sv_SE.address"); err != nil {
b.Fatal(err)
}
}
}
func BenchmarkNew(b *testing.B) { func BenchmarkNew(b *testing.B) {
b.ReportAllocs() b.ReportAllocs()
for i := 0; i < b.N; i++ { for i := 0; i < b.N; i++ {