aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/ruby/qps/client.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ruby/qps/client.rb b/src/ruby/qps/client.rb
index aa57b06c97..30d096831b 100644
--- a/src/ruby/qps/client.rb
+++ b/src/ruby/qps/client.rb
@@ -115,6 +115,21 @@ class BenchmarkClient
end
end
def streaming_ping_ponger(req, stub, config, waiter)
+ q = EnumeratorQueue.new(self)
+ resp = stub.streaming_call(q.each_item)
+ start = Time.now
+ q.push(req)
+ resp.each do |r|
+ @histogram.add((Time.now-start)*1e9)
+ if !@done
+ wait_to_issue(waiter)
+ start = Time.now
+ q.push(req)
+ else
+ q.push(self)
+ break
+ end
+ end
end
def mark(reset)
lat = Grpc::Testing::HistogramData.new(