From: Bjørn Erik Pedersen Date: Wed, 27 Jan 2016 21:28:05 +0000 (+0100) Subject: Fix hugo benchmark X-Git-Tag: v0.16~405 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=12876ec991982de27773d127e2030b1eeb2826b2;p=brevno-suite%2Fhugo Fix hugo benchmark Appending to the site 13 times doesn't sound realistic. --- diff --git a/commands/benchmark.go b/commands/benchmark.go index 4803bdc0..7e746535 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() } }