mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
parent
bb048d811d
commit
7730d683e8
1 changed files with 6 additions and 4 deletions
|
@ -194,11 +194,13 @@ func doBenchmarkPartial(b *testing.B, f func(ns *partials.Namespace) error) {
|
|||
ns := partials.New(de)
|
||||
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
if err := f(ns); err != nil {
|
||||
b.Fatalf("error executing template: %s", err)
|
||||
b.RunParallel(func(pb *testing.PB) {
|
||||
for pb.Next() {
|
||||
if err := f(ns); err != nil {
|
||||
b.Fatalf("error executing template: %s", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func newTestFuncster() *templateFuncster {
|
||||
|
|
Loading…
Reference in a new issue