summaryrefslogtreecommitdiffstats
path: root/commands/benchmark.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-01-10 10:55:03 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-02-04 11:37:25 +0700
commitc71e1b106e6011d148cac899f83c4685dee33a22 (patch)
treec5c7090f0c2398c7771e4908ebcc97aa7714ffd2 /commands/benchmark.go
parent0ada40591216572b0e4c6a8ab986b0aa4fb13c13 (diff)
all: Refactor to nonglobal file systems
Updates #2701 Fixes #2951
Diffstat (limited to 'commands/benchmark.go')
-rw-r--r--commands/benchmark.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/commands/benchmark.go b/commands/benchmark.go
index a879e8941..42966c67a 100644
--- a/commands/benchmark.go
+++ b/commands/benchmark.go
@@ -49,10 +49,13 @@ func init() {
func benchmark(cmd *cobra.Command, args []string) error {
cfg, err := InitializeConfig(benchmarkCmd)
+
if err != nil {
return err
}
+ c := commandeer{cfg}
+
var memProf *os.File
if memProfileFile != "" {
memProf, err = os.Create(memProfileFile)
@@ -79,7 +82,7 @@ func benchmark(cmd *cobra.Command, args []string) error {
t := time.Now()
for i := 0; i < benchmarkTimes; i++ {
- if err = resetAndBuildSites(cfg, false); err != nil {
+ if err = c.resetAndBuildSites(false); err != nil {
return err
}
}