mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-19 14:15:47 +00:00
Adjust benchmark
This commit is contained in:
1 file changed
+10
-3
+10
-3
@@ -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)
|
||||
}
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user