コード例 #1
0
ファイル: cmdline.go プロジェクト: knolleary/pat
func InitCommandLineFlags(config config.Config) {
	config.IntVar(&params.iterations, "iterations", 1, "number of pushes to attempt")
	config.IntVar(&params.concurrency, "concurrency", 1, "max number of pushes to attempt in parallel")
	config.BoolVar(&params.silent, "silent", false, "true to run the commands and print output the terminal")
	config.StringVar(&params.output, "output", "", "if specified, writes benchmark results to a CSV file")
	config.StringVar(&params.workload, "workload", "gcf: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 at n second interval, to be used with -stop")
	config.IntVar(&params.stop, "stop", 0, "stop a repeating interval after n second, to be used with -interval")
	config.BoolVar(&params.listWorkloads, "list-workloads", false, "Lists the available workloads")
	workloadList.DescribeParameters(config)
	store.DescribeParameters(config)
}
コード例 #2
0
ファイル: config.go プロジェクト: knolleary/pat
func DescribeParameters(config config.Config) {
	config.StringVar(&params.csvDir, "csv-dir", "output/csvs", "Directory to Store CSVs")
	config.BoolVar(&params.useRedis, "use-redis", false, "True if redis should be used (requires the -redis-host, -redis-port and -redis-password arguments)")
	config.StringVar(&params.redisHost, "redis-host", "localhost", "Redis hostname")
	config.IntVar(&params.redisPort, "redis-port", 6379, "Redis port")
	config.StringVar(&params.redisPassword, "redis-password", "", "Redis password")
	config.EnvVar(&params.vcapServices, "VCAP_SERVICES", "", "The VCAP_SERVICES environment variable")
}