benchmark: use separate connection for get in watch-get

The watcher traffic interferes with the get latency when sharing connections.
This commit is contained in:
Anthony Romano 2016-05-11 02:37:59 -07:00
parent ca105a1c89
commit 2aa4dd52cc

View File

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