mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-11 20:03:58 +02:00
Adjust benchmark
This commit is contained in:
@@ -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)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user