rename bench commands and args

lower case and dash separated
This commit is contained in:
jaffee 2016-11-28 11:30:27 -07:00
parent ea88941cff
commit a3b69f9066
9 changed files with 75 additions and 75 deletions

View file

@ -21,25 +21,25 @@ type DiagonalSetBits struct {
func (b *DiagonalSetBits) Usage() string {
return `
DiagonalSetBits sets bits with increasing profile id and bitmap id.
diagonal-set-bits sets bits with increasing profile id and bitmap id.
Usage: DiagonalSetBits [arguments]
Usage: diagonal-set-bits [arguments]
The following arguments are available:
-BaseBitmapID int
-base-bitmap-id int
bits being set will all be greater than BaseBitmapID
-BaseProfileID int
-base-profile-id int
profile id num to start from
-Iterations int
-iterations int
number of bits to set
-DB string
-db string
pilosa db to use
-ClientType string
-client-type string
Can be 'single' (all agents hitting one host) or 'round_robin'
`[1:]
@ -48,11 +48,11 @@ The following arguments are available:
func (b *DiagonalSetBits) ConsumeFlags(args []string) ([]string, error) {
fs := flag.NewFlagSet("DiagonalSetBits", flag.ContinueOnError)
fs.SetOutput(ioutil.Discard)
fs.IntVar(&b.BaseBitmapID, "BaseBitmapID", 0, "")
fs.IntVar(&b.BaseProfileID, "BaseProfileID", 0, "")
fs.IntVar(&b.Iterations, "Iterations", 100, "")
fs.StringVar(&b.DB, "DB", "benchdb", "")
fs.StringVar(&b.ClientType, "ClientType", "single", "")
fs.IntVar(&b.BaseBitmapID, "base-bitmap-id", 0, "")
fs.IntVar(&b.BaseProfileID, "base-profile-id", 0, "")
fs.IntVar(&b.Iterations, "iterations", 100, "")
fs.StringVar(&b.DB, "db", "benchdb", "")
fs.StringVar(&b.ClientType, "client-type", "single", "")
if err := fs.Parse(args); err != nil {
return nil, err

View file

@ -19,22 +19,22 @@ type MultiDBSetBits struct {
func (b *MultiDBSetBits) Usage() string {
return `
MultiDBSetBits sets bits with increasing profile id and bitmap id using a different DB for each agent.
multi-db-set-bits sets bits with increasing profile id and bitmap id using a different DB for each agent.
Usage: MultiDBSetBits [arguments]
Usage: multi-db-set-bits [arguments]
The following arguments are available:
-BaseBitmapID int
bits being set will all be greater than BaseBitmapID
-base-bitmap-id int
bits being set will all be greater than base-bitmap-id
-BaseProfileID int
-base-profile-id int
profile id num to start from
-Iterations int
-iterations int
number of bits to set
-ClientType string
-client-type string
Can be 'single' (all agents hitting one host) or 'round_robin'
`[1:]
@ -43,10 +43,10 @@ The following arguments are available:
func (b *MultiDBSetBits) ConsumeFlags(args []string) ([]string, error) {
fs := flag.NewFlagSet("MultiDBSetBits", flag.ContinueOnError)
fs.SetOutput(ioutil.Discard)
fs.IntVar(&b.BaseBitmapID, "BaseBitmapID", 0, "")
fs.IntVar(&b.BaseProfileID, "BaseProfileID", 0, "")
fs.IntVar(&b.Iterations, "Iterations", 100, "")
fs.StringVar(&b.ClientType, "ClientType", "single", "")
fs.IntVar(&b.BaseBitmapID, "base-bitmap-id", 0, "")
fs.IntVar(&b.BaseProfileID, "base-profile-id", 0, "")
fs.IntVar(&b.Iterations, "iterations", 100, "")
fs.StringVar(&b.ClientType, "client-type", "single", "")
if err := fs.Parse(args); err != nil {
return nil, err

View file

@ -26,34 +26,34 @@ type RandomSetBits struct {
func (b *RandomSetBits) Usage() string {
return `
RandomSetBits sets random bits
random-set-bits sets random bits
Usage: RandomSetBits [arguments]
Usage: random-set-bits [arguments]
The following arguments are available:
-BaseBitmapID int
bitmap id to start from
-base-bitmap-id int
bits being set will all be greater than BaseBitmapID
-BitmapIDRange int
-bitmap-id-range int
number of possible bitmap ids that can be set
-BaseProfileID int
-base-profile-id int
profile id num to start from
-ProfileIDRange int
-profile-id-range int
number of possible profile ids that can be set
-Iterations int
-iterations int
number of bits to set
-Seed int
-seed int
Seed for RNG
-DB string
-db string
pilosa db to use
-ClientType string
-client-type string
Can be 'single' (all agents hitting one host) or 'round_robin'
`[1:]
}
@ -61,14 +61,14 @@ The following arguments are available:
func (b *RandomSetBits) ConsumeFlags(args []string) ([]string, error) {
fs := flag.NewFlagSet("RandomSetBits", flag.ContinueOnError)
fs.SetOutput(ioutil.Discard)
fs.Int64Var(&b.BaseBitmapID, "BaseBitmapID", 0, "")
fs.Int64Var(&b.BitmapIDRange, "BitmapIDRange", 100000, "")
fs.Int64Var(&b.BaseProfileID, "BaseProfileID", 0, "")
fs.Int64Var(&b.ProfileIDRange, "ProfileIDRange", 100000, "")
fs.Int64Var(&b.Seed, "Seed", 1, "")
fs.IntVar(&b.Iterations, "Iterations", 100, "")
fs.StringVar(&b.DB, "DB", "benchdb", "")
fs.StringVar(&b.ClientType, "ClientType", "single", "")
fs.Int64Var(&b.BaseBitmapID, "base-bitmap-id", 0, "")
fs.Int64Var(&b.BitmapIDRange, "bitmap-id-range", 100000, "")
fs.Int64Var(&b.BaseProfileID, "base-profile-id", 0, "")
fs.Int64Var(&b.ProfileIDRange, "profile-id-range", 100000, "")
fs.Int64Var(&b.Seed, "seed", 1, "")
fs.IntVar(&b.Iterations, "iterations", 100, "")
fs.StringVar(&b.DB, "db", "benchdb", "")
fs.StringVar(&b.ClientType, "client-type", "single", "")
if err := fs.Parse(args); err != nil {
return nil, err

View file

@ -25,37 +25,37 @@ type RandomQuery struct {
func (b *RandomQuery) Usage() string {
return `
RandomQuery constructs random queries
random-query constructs random queries
Usage: RandomQuery [arguments]
Usage: random-query [arguments]
The following arguments are available:
-MaxDepth int
-max-depth int
Maximum nesting depth of queries
-MaxArgs int
-max-args int
Maximum number of args for Union/Intersect/Difference Queries
-MaxN int
-max-n int
Maximum N value for TopN queries.
-BaseBitmapID int
-base-bitmap-id int
bitmap id to start from
-BitmapIDRange int
-bitmap-id-range int
number of possible bitmap ids that can be set
-Iterations int
-iterations int
number of bits to set
-Seed int
-seed int
Seed for RNG
-DBs string
-dbs string
Comma separated list of DBs to query against
-ClientType string
-client-type string
Can be 'single' (all agents hitting one host) or 'round_robin'
`[1:]
}
@ -63,16 +63,16 @@ The following arguments are available:
func (b *RandomQuery) ConsumeFlags(args []string) ([]string, error) {
fs := flag.NewFlagSet("RandomQuery", flag.ContinueOnError)
fs.SetOutput(ioutil.Discard)
fs.IntVar(&b.MaxDepth, "MaxDepth", 4, "")
fs.IntVar(&b.MaxArgs, "MaxArgs", 4, "")
fs.IntVar(&b.MaxN, "MaxN", 4, "")
fs.Int64Var(&b.BaseBitmapID, "BaseBitmapID", 0, "")
fs.Int64Var(&b.BitmapIDRange, "BitmapIDRange", 100000, "")
fs.Int64Var(&b.Seed, "Seed", 1, "")
fs.IntVar(&b.Iterations, "Iterations", 100, "")
fs.IntVar(&b.MaxDepth, "max-depth", 4, "")
fs.IntVar(&b.MaxArgs, "max-args", 4, "")
fs.IntVar(&b.MaxN, "max-n", 4, "")
fs.Int64Var(&b.BaseBitmapID, "base-bitmap-id", 0, "")
fs.Int64Var(&b.BitmapIDRange, "bitmap-id-range", 100000, "")
fs.Int64Var(&b.Seed, "seed", 1, "")
fs.IntVar(&b.Iterations, "iterations", 100, "")
var dbs string
fs.StringVar(&dbs, "DBs", "benchdb", "")
fs.StringVar(&b.ClientType, "ClientType", "single", "")
fs.StringVar(&dbs, "dbs", "benchdb", "")
fs.StringVar(&b.ClientType, "client-type", "single", "")
if err := fs.Parse(args); err != nil {
return nil, err

View file

@ -1329,13 +1329,13 @@ func (cmd *BagentCommand) ParseFlags(args []string) error {
switch remArgs[0] {
case "-help", "-h":
return flag.ErrHelp
case "DiagonalSetBits":
case "diagonal-set-bits":
bm = &bench.DiagonalSetBits{}
case "RandomSetBits":
case "random-set-bits":
bm = &bench.RandomSetBits{}
case "MultiDBSetBits":
case "multi-db-set-bits":
bm = &bench.MultiDBSetBits{}
case "RandomQuery":
case "random-query":
bm = &bench.RandomQuery{}
default:
return fmt.Errorf("Unknown benchmark cmd: %v", remArgs[0])
@ -1373,10 +1373,10 @@ The following arguments are available:
An integer differentiating this agent from others in the fleet.
subcommands:
DiagonalSetBits
RandomSetBits
MultiDBSetBits
RandomQuery
diagonal-set-bits
random-set-bits
multi-db-set-bits
random-query

View file

@ -4,7 +4,7 @@
"Benchmarks": [
{
"Num": 3,
"Args": ["MultiDBSetBits", "-Iterations", "30000", "-ClientType", "round_robin"]
"Args": ["multi-db-set-bits", "-iterations", "30000", "-client-type", "round_robin"]
}
]
}

View file

@ -5,8 +5,8 @@
{
"Num": 3,
"Args": [
"RandomSetBits", "-Iterations", "30000", "-ProfileIDRange", "1000000", "-BitmapIDRange", "1000000", "-Seed", "2345", "-ClientType", "round_robin", "-DB", "randsetandquery",
"RandomQuery", "-Iterations", "1000", "-BitmapIDRange", "1000000", "-Seed", "1239", "-DBs", "randsetandquery"
"random-set-bits", "-iterations", "30000", "-profile-id-range", "1000000", "-bitmap-id-range", "1000000", "-seed", "2345", "-client-type", "round_robin", "-db", "randsetandquery",
"random-query", "-iterations", "1000", "-bitmap-id-range", "1000000", "-seed", "1239", "-dbs", "randsetandquery"
]
}
]

View file

@ -4,7 +4,7 @@
"Benchmarks": [
{
"Num": 3,
"Args": ["RandomSetBits", "-Iterations", "30000", "-ProfileIDRange", "1000000", "-BitmapIDRange", "1000000", "-Seed", "2345", "-ClientType", "round_robin"]
"Args": ["random-set-bits", "-iterations", "30000", "-profile-id-range", "1000000", "-bitmap-id-range", "1000000", "-seed", "2345", "-client-type", "round_robin"]
}
]
}

View file

@ -4,7 +4,7 @@
"Benchmarks": [
{
"Num": 3,
"Args": ["DiagonalSetBits", "-Iterations", "30000", "-ClientType", "round_robin"]
"Args": ["diagonal-set-bits", "-iterations", "30000", "-client-type", "round_robin"]
}
]
}