Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tools/benchmark/cmd/put.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ var (

keySpaceSize int
seqKeys bool
prefix string

compactInterval time.Duration
compactIndexDelta int64
Expand All @@ -66,6 +67,7 @@ func init() {
putCmd.Flags().IntVar(&putTotal, "total", 10000, "Total number of put requests")
putCmd.Flags().IntVar(&keySpaceSize, "key-space-size", 1, "Maximum possible keys")
putCmd.Flags().BoolVar(&seqKeys, "sequential-keys", false, "Use sequential keys")
putCmd.Flags().StringVar(&prefix, "prefix", "", "Prefix for 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(&checkHashkv, "check-hashkv", false, "'true' to check hashkv")
Expand Down Expand Up @@ -111,7 +113,7 @@ func putFunc(cmd *cobra.Command, _ []string) {
} else {
binary.PutVarint(k, int64(rand.Intn(keySpaceSize)))
}
requests <- v3.OpPut(string(k), v)
requests <- v3.OpPut(prefix+string(k), v)
}
close(requests)
}()
Expand Down