1
0
mirror of https://github.com/gohugoio/hugo.git synced 2024-05-11 05:54:58 +00:00

Add BenchmarkAbsURL

This commit is contained in:
Bjørn Erik Pedersen
2023-06-12 15:15:28 +02:00
parent e1d43021ca
commit ded6866001

View File

@ -276,3 +276,13 @@ func BenchmarkRelURL(b *testing.B) {
_ = 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)
}
}