Skip to content

Commit

Permalink
Merge pull request etcd-io#6610 from heyitsanthony/bench-lease
Browse files Browse the repository at this point in the history
benchmark: submit keepalive requests concurrently with report.Run()
  • Loading branch information
Anthony Romano authored Oct 10, 2016
2 parents fd60205 + c1d115b commit 3a6fe61
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tools/benchmark/cmd/lease.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,14 @@ func leaseKeepaliveFunc(cmd *cobra.Command, args []string) {
}(clients[i])
}

for i := 0; i < leaseKeepaliveTotal; i++ {
requests <- struct{}{}
}
close(requests)
wg.Add(1)
go func() {
defer wg.Done()
for i := 0; i < leaseKeepaliveTotal; i++ {
requests <- struct{}{}
}
close(requests)
}()

rc := r.Run()
wg.Wait()
Expand Down

0 comments on commit 3a6fe61

Please sign in to comment.