dont break out of response stream iterator in benchmark client

pull/8843/head
Alexander Polcyn 8 years ago
parent 03fc19876d
commit 3d48cf4ed3
  1. 6
      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

Loading…
Cancel
Save