aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ruby/qps
diff options
context:
space:
mode:
authorGravatar Yuchen Zeng <zyc@google.com>2017-01-18 18:49:07 -0800
committerGravatar Yuchen Zeng <zyc@google.com>2017-01-18 18:49:07 -0800
commit04ec4701e303b8b41d90d5ce6861689c7f0fab7f (patch)
treeb37a55fead11bb07956718671aa1b1ed1bbb3991 /src/ruby/qps
parentb0023d25dc783ba77164c03a39bb7dcc7e446fe8 (diff)
parent6da1dc87aa3384594e9ab6218b1e0886573108de (diff)
Merge remote-tracking branch 'upstream/master' into cares_buildin
Diffstat (limited to 'src/ruby/qps')
-rw-r--r--src/ruby/qps/client.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ruby/qps/client.rb b/src/ruby/qps/client.rb
index 8aed866da5..817192626b 100644
--- a/src/ruby/qps/client.rb
+++ b/src/ruby/qps/client.rb
@@ -134,6 +134,7 @@ class BenchmarkClient
resp = stub.streaming_call(q.each_item)
start = Time.now
q.push(req)
+ pushed_sentinal = false
resp.each do |r|
@histogram.add((Time.now-start)*1e9)
if !@done
@@ -141,8 +142,9 @@ class BenchmarkClient
start = Time.now
q.push(req)
else
- q.push(self)
- break
+ q.push(self) unless pushed_sentinal
+ # Continue polling on the responses to consume and release resources
+ pushed_sentinal = true
end
end
end