Пример #1
0
func InitCommandLineFlags(config config.Config) {
	config.StringVar(&params.app, "app", "assets/dora", "filepath to app, defaults to provided dora in assets")
	config.StringVar(&params.manifest, "app:manifest", "", "filepath to cf manifest for the app")
	config.IntVar(&params.iterations, "iterations", 1, "number of pushes to attempt")
	config.StringVar(&params.concurrency, "concurrency", "1", "number of workers to execute the workload in parallel, can be static or ramping up, i.e. 1..3")
	config.IntVar(&params.concurrencyStepTime, "concurrency:timeBetweenSteps", 60, "seconds between adding additonal workers when ramping works up")
	config.BoolVar(&params.silent, "silent", false, "true to run silently and exit without interaction when finished")
	config.StringVar(&params.workload, "workload", "cf:push", "a comma-separated list of operations a user should issue (use -list-workloads to see available workload options)")
	config.IntVar(&params.interval, "interval", 0, "repeat a workload every n seconds, to be used with -stop")
	config.IntVar(&params.stop, "stop", 0, "repeat a repeating interval until n seconds, to be used with -interval")
	config.BoolVar(&params.listWorkloads, "list-workloads", false, "Lists the available workloads")
	config.StringVar(&params.restTarget, "rest:target", "", "the target for the REST api")
	config.StringVar(&params.restUser, "rest:username", "", "username for REST api")
	config.StringVar(&params.restPass, "rest:password", "", "password for REST api")
	config.StringVar(&params.restSpace, "rest:space", "dev", "space to target for REST api")
	benchmarker.DescribeParameters(config)
	store.DescribeParameters(config)
}
Пример #2
0
func InitCommandLineFlags(config config.Config) {
	config.EnvVar(&params.port, "VCAP_APP_PORT", "8080", "The port to bind to")
	store.DescribeParameters(config)
	benchmarker.DescribeParameters(config)
}