summaryrefslogtreecommitdiffstats
path: root/commands/benchmark.go
diff options
context:
space:
mode:
authorHenrique Dias <hacdias@gmail.com>2016-02-13 12:46:08 +0000
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-02-14 13:50:03 +0100
commitad176055d9e87c02da4be405210b297036dd2500 (patch)
tree0bc08d591528de62818a1c984bc8cb413789195b /commands/benchmark.go
parentce7c267140610ea3435a810100dc79a5dee01d5f (diff)
Export MainSite var
Fixes hacdias/caddy-hugo#46
Diffstat (limited to 'commands/benchmark.go')
-rw-r--r--commands/benchmark.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/commands/benchmark.go b/commands/benchmark.go
index c90f64516..d10289be4 100644
--- a/commands/benchmark.go
+++ b/commands/benchmark.go
@@ -14,9 +14,10 @@
package commands
import (
- "github.com/spf13/cobra"
"os"
"runtime/pprof"
+
+ "github.com/spf13/cobra"
)
var (
@@ -56,7 +57,7 @@ func benchmark(cmd *cobra.Command, args []string) error {
return err
}
for i := 0; i < benchmarkTimes; i++ {
- mainSite = nil
+ MainSite = nil
_ = buildSite()
}
pprof.WriteHeapProfile(f)
@@ -75,7 +76,7 @@ func benchmark(cmd *cobra.Command, args []string) error {
pprof.StartCPUProfile(f)
defer pprof.StopCPUProfile()
for i := 0; i < benchmarkTimes; i++ {
- mainSite = nil
+ MainSite = nil
_ = buildSite()
}
}