diff options
author | Alexander Polcyn <apolcyn@google.com> | 2016-11-23 09:50:22 -0800 |
---|---|---|
committer | Alexander Polcyn <apolcyn@google.com> | 2016-11-23 09:50:22 -0800 |
commit | 3d48cf4ed30032d417c3b64df11b7fb45220388c (patch) | |
tree | bbd334a1ef53cd42d24c177b6811e03f088b3de3 /src/ruby/qps | |
parent | 03fc19876de683e3c8b4ca3ddc71af6c9756b07a (diff) |
dont break out of response stream iterator in benchmark client
Diffstat (limited to 'src/ruby/qps')
-rw-r--r-- | src/ruby/qps/client.rb | 6 |
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 |