mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Add BenchmarkAbsURL
This commit is contained in:
parent
e1d43021ca
commit
ded6866001
1 changed files with 10 additions and 0 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue