mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
Adjust benchmark
This commit is contained in:
parent
ded6866001
commit
29e5cbb699
1 changed files with 10 additions and 3 deletions
|
@ -282,7 +282,14 @@ func BenchmarkAbsURL(b *testing.B) {
|
|||
v.Set("baseURL", "http://base/")
|
||||
p := newTestPathSpecFromCfgAndLang(v, "")
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
_ = p.AbsURL("foo/bar", false)
|
||||
}
|
||||
b.Run("relurl", func(b *testing.B) {
|
||||
for i := 0; i < b.N; i++ {
|
||||
_ = p.AbsURL("foo/bar", false)
|
||||
}
|
||||
})
|
||||
b.Run("absurl", func(b *testing.B) {
|
||||
for i := 0; i < b.N; i++ {
|
||||
_ = p.AbsURL("https://base/foo/bar", false)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue