aboutsummaryrefslogtreecommitdiffhomepage
path: root/helpers
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2023-06-12 15:15:28 +0200
committerBjørn Erik Pedersen <[email protected]>2023-06-12 15:15:28 +0200
commitded6866001d0c6299708b518aacf154176afe972 (patch)
tree24fedae2a9369901f8eaf7eaee1975726e6a4970 /helpers
parente1d43021cab6ff538de5855f1b35d72e9c4e867f (diff)
downloadhugo-ded6866001d0c6299708b518aacf154176afe972.tar.gz
hugo-ded6866001d0c6299708b518aacf154176afe972.zip
Add BenchmarkAbsURL
Diffstat (limited to 'helpers')
-rw-r--r--helpers/url_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/helpers/url_test.go b/helpers/url_test.go
index 6d496ce8e..716719522 100644
--- a/helpers/url_test.go
+++ b/helpers/url_test.go
@@ -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)
+ }
+}