From 12f46b5d26ecc1fd8a36a15e84200420a7f0258f Mon Sep 17 00:00:00 2001 From: Peter Mattis Date: Sat, 12 May 2018 14:00:14 -0400 Subject: [PATCH] cmd/workload: remove benchmark result output Nothing was using the benchmark result output. Fix specification of a url during `run` and `init` commands. Release note: None --- pkg/cmd/workload/run.go | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pkg/cmd/workload/run.go b/pkg/cmd/workload/run.go index 5875f1a611c7..629a5f18672d 100644 --- a/pkg/cmd/workload/run.go +++ b/pkg/cmd/workload/run.go @@ -25,7 +25,6 @@ import ( "sync" "sync/atomic" "syscall" - "testing" "time" "golang.org/x/time/rate" @@ -76,13 +75,21 @@ func init() { genFlags = f.Flags().FlagSet } - genInitCmd := setCmdDefaults(&cobra.Command{Use: meta.Name, Short: meta.Description}) + genInitCmd := setCmdDefaults(&cobra.Command{ + Use: meta.Name, + Short: meta.Description, + Args: cobra.ArbitraryArgs, + }) genInitCmd.Flags().AddFlagSet(initFlags) genInitCmd.Flags().AddFlagSet(genFlags) genInitCmd.Run = cmdHelper(gen, runInit) initCmd.AddCommand(genInitCmd) - genRunCmd := setCmdDefaults(&cobra.Command{Use: meta.Name, Short: meta.Description}) + genRunCmd := setCmdDefaults(&cobra.Command{ + Use: meta.Name, + Short: meta.Description, + Args: cobra.ArbitraryArgs, + }) genRunCmd.Flags().AddFlagSet(runFlags) genRunCmd.Flags().AddFlagSet(genFlags) initFlags.VisitAll(func(initFlag *pflag.Flag) { @@ -372,8 +379,6 @@ func runRun(gen workload.Generator, urls []string, dbName string) error { benchmarkName += fmt.Sprintf(`/%s=%s`, f.Name, f.Value) }) } - result := testing.BenchmarkResult{N: int(resultTick.Ops), T: startElapsed} - fmt.Printf("\n%s\t%s\n", benchmarkName, result) if *histFile == "-" { if err := histwriter.WriteDistribution(