Browse Source

benchmark: use separate connection for get in watch-get

The watcher traffic interferes with the get latency when sharing connections.
Anthony Romano 9 years ago
parent
commit
2aa4dd52cc
1 changed files with 2 additions and 1 deletions
  1. 2 1
      tools/benchmark/cmd/watch_get.go

+ 2 - 1
tools/benchmark/cmd/watch_get.go

@@ -48,6 +48,7 @@ func init() {
 
 
 func watchGetFunc(cmd *cobra.Command, args []string) {
 func watchGetFunc(cmd *cobra.Command, args []string) {
 	clients := mustCreateClients(totalClients, totalConns)
 	clients := mustCreateClients(totalClients, totalConns)
+	getClient := mustCreateClients(1, 1)
 
 
 	// setup keys for watchers
 	// setup keys for watchers
 	watchRev := int64(0)
 	watchRev := int64(0)
@@ -78,7 +79,7 @@ func watchGetFunc(cmd *cobra.Command, args []string) {
 	wg.Add(len(streams))
 	wg.Add(len(streams))
 	ctx, cancel := context.WithCancel(context.TODO())
 	ctx, cancel := context.WithCancel(context.TODO())
 	f := func() {
 	f := func() {
-		doSerializedGet(ctx, clients[0], results)
+		doSerializedGet(ctx, getClient[0], results)
 	}
 	}
 	for i := range streams {
 	for i := range streams {
 		go doUnsyncWatch(streams[i], watchRev, f)
 		go doUnsyncWatch(streams[i], watchRev, f)