mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-12 20:13:59 +02:00
Add BenchmarkAbsURL
This commit is contained in:
@@ -276,3 +276,13 @@ func BenchmarkRelURL(b *testing.B) {
|
|||||||
_ = p.RelURL("https://base/foo/bar", false)
|
_ = p.RelURL("https://base/foo/bar", false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func BenchmarkAbsURL(b *testing.B) {
|
||||||
|
v := config.New()
|
||||||
|
v.Set("baseURL", "http://base/")
|
||||||
|
p := newTestPathSpecFromCfgAndLang(v, "")
|
||||||
|
b.ResetTimer()
|
||||||
|
for i := 0; i < b.N; i++ {
|
||||||
|
_ = p.AbsURL("foo/bar", false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user