mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
benchmark: submit keepalive requests concurrently with report.Run()
Otherwise report won't consume the results and the benchmark hangs.
This commit is contained in:
parent
71f8f3ceb6
commit
c1d115b322
@ -68,10 +68,14 @@ func leaseKeepaliveFunc(cmd *cobra.Command, args []string) {
|
|||||||
}(clients[i])
|
}(clients[i])
|
||||||
}
|
}
|
||||||
|
|
||||||
for i := 0; i < leaseKeepaliveTotal; i++ {
|
wg.Add(1)
|
||||||
requests <- struct{}{}
|
go func() {
|
||||||
}
|
defer wg.Done()
|
||||||
close(requests)
|
for i := 0; i < leaseKeepaliveTotal; i++ {
|
||||||
|
requests <- struct{}{}
|
||||||
|
}
|
||||||
|
close(requests)
|
||||||
|
}()
|
||||||
|
|
||||||
rc := r.Run()
|
rc := r.Run()
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user