diff options
author | Bjørn Erik Pedersen <[email protected]> | 2023-06-12 15:18:41 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2023-06-12 15:18:41 +0200 |
commit | 29e5cbb699c691f8c4b67080e3f57ca1d2509d8c (patch) | |
tree | 4364292a0cfb49b62211646c51297c62768e87f7 /helpers | |
parent | ded6866001d0c6299708b518aacf154176afe972 (diff) | |
download | hugo-29e5cbb699c691f8c4b67080e3f57ca1d2509d8c.tar.gz hugo-29e5cbb699c691f8c4b67080e3f57ca1d2509d8c.zip |
Adjust benchmark
Diffstat (limited to 'helpers')
-rw-r--r-- | helpers/url_test.go | 13 |
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) + } + }) } |