mirror of
https://github.com/gohugoio/hugo.git
synced 2024-05-11 05:54:58 +00:00
Add BenchmarkAbsURL
This commit is contained in:
@ -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)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user