Skip to content
Snippets Groups Projects
Commit 14c384ba authored by Benjamin Wenger's avatar Benjamin Wenger
Browse files

hacked it so benchmark skips tests

parent be3045cf
No related branches found
No related tags found
No related merge requests found
......@@ -3,8 +3,8 @@ package cmd
import (
"fmt"
"github.com/spf13/cobra"
"gitlab.com/privategrity/server/benchmark"
jww "github.com/spf13/jwalterweatherman"
"gitlab.com/privategrity/server/benchmark"
"time"
)
......@@ -12,8 +12,12 @@ var benchBatchSize uint64
var nodeCount int
var iterations int
var debug bool
var benchmarking = false
func init() {
benchmarking = true
benchmarkCmd.Flags().Uint64VarP(&benchBatchSize, "batch", "b", 1,
"Batch size to use for node server rounds")
benchmarkCmd.Flags().IntVarP(&nodeCount, "numnodes", "n", 1,
......@@ -24,6 +28,7 @@ func init() {
"Show debug and warning info (default is to only show errors and above)")
rootCmd.AddCommand(benchmarkCmd)
}
var benchmarkCmd = &cobra.Command{
......
......@@ -76,6 +76,8 @@ func init() {
// initConfig reads in config file and ENV variables if set.
func initConfig() {
// TODO: get rid of this hack
if !benchmarking {
//Use default config location if none is passed
if cfgFile == "" {
// Find home directory.
......@@ -98,6 +100,7 @@ func initConfig() {
}
f.Close()
}
viper.SetConfigFile(cfgFile)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment