summaryrefslogtreecommitdiffstats
path: root/hugolib/hugo_smoke_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'hugolib/hugo_smoke_test.go')
-rw-r--r--hugolib/hugo_smoke_test.go46
1 files changed, 34 insertions, 12 deletions
diff --git a/hugolib/hugo_smoke_test.go b/hugolib/hugo_smoke_test.go
index 62bece032..274b1be93 100644
--- a/hugolib/hugo_smoke_test.go
+++ b/hugolib/hugo_smoke_test.go
@@ -339,20 +339,42 @@ func TestBenchmarkBaseline(t *testing.T) {
}
func BenchmarkBaseline(b *testing.B) {
- cfg := IntegrationTestConfig{
- T: b,
- TxtarString: benchmarkBaselineFiles(),
- }
- builders := make([]*IntegrationTestBuilder, b.N)
+ b.Run("withrender", func(b *testing.B) {
+ cfg := IntegrationTestConfig{
+ T: b,
+ TxtarString: benchmarkBaselineFiles(),
+ }
+ builders := make([]*IntegrationTestBuilder, b.N)
- for i := range builders {
- builders[i] = NewIntegrationTestBuilder(cfg)
- }
+ for i := range builders {
+ builders[i] = NewIntegrationTestBuilder(cfg)
+ }
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- builders[i].Build()
- }
+ b.ResetTimer()
+ for i := 0; i < b.N; i++ {
+ builders[i].Build()
+ }
+ })
+
+ b.Run("skiprender", func(b *testing.B) {
+ cfg := IntegrationTestConfig{
+ T: b,
+ TxtarString: benchmarkBaselineFiles(),
+ BuildCfg: BuildCfg{
+ SkipRender: true,
+ },
+ }
+ builders := make([]*IntegrationTestBuilder, b.N)
+
+ for i := range builders {
+ builders[i] = NewIntegrationTestBuilder(cfg)
+ }
+
+ b.ResetTimer()
+ for i := 0; i < b.N; i++ {
+ builders[i].Build()
+ }
+ })
}
func benchmarkBaselineFiles() string {