summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--helpers/url_test.go13
1 files changed, 10 insertions, 3 deletions
diff --git a/helpers/url_test.go b/helpers/url_test.go
index 716719522..a31cb6c06 100644
--- a/helpers/url_test.go
+++ b/helpers/url_test.go
@@ -282,7 +282,14 @@ func BenchmarkAbsURL(b *testing.B) {
v.Set("baseURL", "http://base/")
p := newTestPathSpecFromCfgAndLang(v, "")
b.ResetTimer()
- for i := 0; i < b.N; i++ {
- _ = p.AbsURL("foo/bar", false)
- }
+ b.Run("relurl", func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ _ = p.AbsURL("foo/bar", false)
+ }
+ })
+ b.Run("absurl", func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ _ = p.AbsURL("https://base/foo/bar", false)
+ }
+ })
}