Skip to content

Commit

Permalink
Enable fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
serathius committed Nov 29, 2024
1 parent 8f91eb1 commit e026647
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tools/benchmark/cmd/watch_latency.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@ var (
watchLStreams int
watchLWatchersPerStream int
watchLPrevKV bool
watchLFragment bool
)

func init() {
RootCmd.AddCommand(watchLatencyCmd)
watchLatencyCmd.Flags().IntVar(&watchLStreams, "streams", 10, "Total watch streams")
watchLatencyCmd.Flags().IntVar(&watchLWatchersPerStream, "watchers-per-stream", 10, "Total watchers per stream")
watchLatencyCmd.Flags().BoolVar(&watchLPrevKV, "prevkv", false, "PrevKV enabled on watch requests")
watchLatencyCmd.Flags().BoolVar(&watchLFragment, "fragment", false, "Fragment enabled on watch requests")

watchLatencyCmd.Flags().IntVar(&watchLPutTotal, "put-total", 1000, "Total number of put requests")
watchLatencyCmd.Flags().IntVar(&watchLPutRate, "put-rate", 100, "Number of keys to put per second")
Expand Down Expand Up @@ -142,6 +144,9 @@ func setupWatchChannels(key string) []clientv3.WatchChan {
if watchLPrevKV {
opts = append(opts, clientv3.WithPrevKV())
}
if watchLFragment {
opts = append(opts, clientv3.WithFragment())
}
wchs := make([]clientv3.WatchChan, len(streams)*watchLWatchersPerStream)
for i := 0; i < len(streams); i++ {
for j := 0; j < watchLWatchersPerStream; j++ {
Expand Down

0 comments on commit e026647

Please sign in to comment.