commit | 2eaf8713fd1e069c63c5703fdd41ebb55356b29d | [log] [tgz] |
---|---|---|
author | Alex Hong <hongalex@google.com> | Wed Mar 18 12:40:56 2020 -0700 |
committer | Alex Hong <hongalex@google.com> | Wed Mar 18 19:48:15 2020 +0000 |
tree | 7f8afe6c8167f9f0375316a1945709da900083ea | |
parent | 499ecda05814402b44f5e29172bdb6f51d4f1e90 [diff] |
pubsub: limit goroutines in benchwrapper to 1 Benchmarker is currently failing as the fake does not support multiple subscriber clients yet. Change-Id: I1cd3c9ca64292ecfbc27a7bf1013dcc6a57e5198 Reviewed-on: https://code-review.googlesource.com/c/gocloud/+/53511 Reviewed-by: Tyler Bui-Palsulich <tbp@google.com>
diff --git a/pubsub/internal/benchwrapper/main.go b/pubsub/internal/benchwrapper/main.go index f9a05c4..2031c6f 100644 --- a/pubsub/internal/benchwrapper/main.go +++ b/pubsub/internal/benchwrapper/main.go
@@ -67,6 +67,7 @@ func (s *server) Recv(ctx context.Context, req *pb.PubsubRecv) (*pb.EmptyResponse, error) { sub := s.c.Subscription(req.SubName) + sub.ReceiveSettings.NumGoroutines = 1 err := sub.Receive(ctx, func(ctx context.Context, msg *pubsub.Message) { msg.Ack() })