Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
server
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
server
Commits
14c384ba
Commit
14c384ba
authored
Apr 12, 2018
by
Benjamin Wenger
Browse files
Options
Downloads
Patches
Plain Diff
hacked it so benchmark skips tests
parent
be3045cf
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmd/benchmark.go
+6
-1
6 additions, 1 deletion
cmd/benchmark.go
cmd/root.go
+19
-16
19 additions, 16 deletions
cmd/root.go
with
25 additions
and
17 deletions
cmd/benchmark.go
+
6
−
1
View file @
14c384ba
...
...
@@ -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
{
...
...
This diff is collapsed.
Click to expand it.
cmd/root.go
+
19
−
16
View file @
14c384ba
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment