mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 15:28:54 +00:00
all: Fix some benchmarks broken by modernize
It's not possible to use `b.Loop()` when `b.N` is used to prepare test data.
See 264022a75a
See #14107
This commit is contained in:
@@ -284,7 +284,7 @@ D.
|
||||
builders[i] = hugolib.NewIntegrationTestBuilder(cfg)
|
||||
}
|
||||
|
||||
for i := 0; b.Loop(); i++ {
|
||||
for i := 0; i < b.N; i++ {
|
||||
builders[i].Build()
|
||||
}
|
||||
}
|
||||
@@ -343,7 +343,7 @@ FENCE
|
||||
|
||||
b.ResetTimer()
|
||||
|
||||
for i := 0; b.Loop(); i++ {
|
||||
for i := 0; i < b.N; i++ {
|
||||
builders[i].Build()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user