mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
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:
parent
ca105a1c89
commit
2aa4dd52cc
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user