diff options
author | Bjørn Erik Pedersen <[email protected]> | 2023-06-12 15:15:28 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2023-06-12 15:15:28 +0200 |
commit | ded6866001d0c6299708b518aacf154176afe972 (patch) | |
tree | 24fedae2a9369901f8eaf7eaee1975726e6a4970 /helpers | |
parent | e1d43021cab6ff538de5855f1b35d72e9c4e867f (diff) | |
download | hugo-ded6866001d0c6299708b518aacf154176afe972.tar.gz hugo-ded6866001d0c6299708b518aacf154176afe972.zip |
Add BenchmarkAbsURL
Diffstat (limited to 'helpers')
-rw-r--r-- | helpers/url_test.go | 10 |
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) + } +} |