Skip to content
Snippets Groups Projects
Commit 3d48cf4e authored by Alexander Polcyn's avatar Alexander Polcyn
Browse files

dont break out of response stream iterator in benchmark client

parent 03fc1987
No related branches found
No related tags found
No related merge requests found
...@@ -134,6 +134,7 @@ class BenchmarkClient ...@@ -134,6 +134,7 @@ class BenchmarkClient
resp = stub.streaming_call(q.each_item) resp = stub.streaming_call(q.each_item)
start = Time.now start = Time.now
q.push(req) q.push(req)
pushed_sentinal = false
resp.each do |r| resp.each do |r|
@histogram.add((Time.now-start)*1e9) @histogram.add((Time.now-start)*1e9)
if !@done if !@done
...@@ -141,8 +142,9 @@ class BenchmarkClient ...@@ -141,8 +142,9 @@ class BenchmarkClient
start = Time.now start = Time.now
q.push(req) q.push(req)
else else
q.push(self) q.push(self) unless pushed_sentinal
break # Continue polling on the responses to consume and release resources
pushed_sentinal = true
end end
end end
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment