From 12876ec991982de27773d127e2030b1eeb2826b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 27 Jan 2016 22:28:05 +0100 Subject: [PATCH] Fix hugo benchmark Appending to the site 13 times doesn't sound realistic. --- commands/benchmark.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/commands/benchmark.go b/commands/benchmark.go index 4803bdc04..7e746535f 100644 --- a/commands/benchmark.go +++ b/commands/benchmark.go @@ -53,6 +53,7 @@ func benchmark(cmd *cobra.Command, args []string) error { return err } for i := 0; i < benchmarkTimes; i++ { + mainSite = nil _ = buildSite() } pprof.WriteHeapProfile(f) @@ -71,6 +72,7 @@ func benchmark(cmd *cobra.Command, args []string) error { pprof.StartCPUProfile(f) defer pprof.StopCPUProfile() for i := 0; i < benchmarkTimes; i++ { + mainSite = nil _ = buildSite() } }