Skip to content

Commit

Permalink
Add BenchmarkAbsURL
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Jun 12, 2023
1 parent e1d4302 commit ded6866
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions helpers/url_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

0 comments on commit ded6866

Please sign in to comment.