mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
benchmark: move sample flag to root command
Sample is configuration for reports. This should be flag at top command.
This commit is contained in:
parent
323687e1f1
commit
c9e4e2b6dc
@ -46,8 +46,6 @@ var (
|
||||
|
||||
compactInterval time.Duration
|
||||
compactIndexDelta int64
|
||||
|
||||
sample bool
|
||||
)
|
||||
|
||||
func init() {
|
||||
@ -59,7 +57,6 @@ func init() {
|
||||
putCmd.Flags().BoolVar(&seqKeys, "sequential-keys", false, "Use sequential keys")
|
||||
putCmd.Flags().DurationVar(&compactInterval, "compact-interval", 0, `Interval to compact database (do not duplicate this with etcd's 'auto-compaction-retention' flag) (e.g. --compact-interval=5m compacts every 5-minute)`)
|
||||
putCmd.Flags().Int64Var(&compactIndexDelta, "compact-index-delta", 1000, "Delta between current revision and compact revision (e.g. current revision 10000, compact at 9000)")
|
||||
putCmd.Flags().BoolVar(&sample, "sample", false, "'true' to sample requests for every second")
|
||||
}
|
||||
|
||||
func putFunc(cmd *cobra.Command, args []string) {
|
||||
|
@ -42,7 +42,6 @@ func init() {
|
||||
RootCmd.AddCommand(rangeCmd)
|
||||
rangeCmd.Flags().IntVar(&rangeTotal, "total", 10000, "Total number of range requests")
|
||||
rangeCmd.Flags().StringVar(&rangeConsistency, "consistency", "l", "Linearizable(l) or Serializable(s)")
|
||||
rangeCmd.Flags().BoolVar(&sample, "sample", false, "'true' to sample requests for every second")
|
||||
}
|
||||
|
||||
func rangeFunc(cmd *cobra.Command, args []string) {
|
||||
|
@ -36,6 +36,7 @@ var (
|
||||
endpoints []string
|
||||
totalConns uint
|
||||
totalClients uint
|
||||
sample bool
|
||||
|
||||
bar *pb.ProgressBar
|
||||
results chan result
|
||||
@ -52,6 +53,7 @@ func init() {
|
||||
RootCmd.PersistentFlags().UintVar(&totalConns, "conns", 1, "Total number of gRPC connections")
|
||||
RootCmd.PersistentFlags().UintVar(&totalClients, "clients", 1, "Total number of gRPC clients")
|
||||
|
||||
RootCmd.PersistentFlags().BoolVar(&sample, "sample", false, "'true' to sample requests for every second")
|
||||
RootCmd.PersistentFlags().StringVar(&tls.CertFile, "cert", "", "identify HTTPS client using this SSL certificate file")
|
||||
RootCmd.PersistentFlags().StringVar(&tls.KeyFile, "key", "", "identify HTTPS client using this SSL key file")
|
||||
RootCmd.PersistentFlags().StringVar(&tls.CAFile, "cacert", "", "verify certificates of HTTPS-enabled servers using this CA bundle")
|
||||
|
@ -80,7 +80,6 @@ func init() {
|
||||
watchCmd.Flags().IntVar(&watchKeySize, "key-size", 32, "Key size of watch request")
|
||||
watchCmd.Flags().IntVar(&watchKeySpaceSize, "key-space-size", 1, "Maximum possible keys")
|
||||
watchCmd.Flags().BoolVar(&watchSeqKeys, "sequential-keys", false, "Use sequential keys")
|
||||
watchCmd.Flags().BoolVar(&sample, "sample", false, "'true' to sample requests for every second")
|
||||
}
|
||||
|
||||
func watchFunc(cmd *cobra.Command, args []string) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user