Explorer reports addition
We have added a new Explorer feature to reports, with a timeline scrubber and easy anomaly detection.
Guide on load testing gRPC streaming APIs (client, server, bidirectional) with LoadForge using Locust.
LoadForge can record your browser, graphically build tests, scan your site with a wizard and more. Sign up now to run your first test.
gRPC supports streaming RPCs—client-side, server-side, and bidirectional streams—over HTTP/2. Locust with GrpcUser can simulate these streaming calls to measure performance under load.
# locust.py
from locust import task, between
from locust_plugins.users import GrpcUser
import streaming_pb2
class StreamingUser(GrpcUser):
host = "grpc.server.com:50051"
wait_time = between(1, 2)
@task
def client_stream(self):
requests = (streaming_pb2.StreamRequest(value=i) for i in range(10))
response = self.call(requests, "/streaming.StreamService/ClientStream")
_ = response.value
@task
def server_stream(self):
request = streaming_pb2.Empty()
responses = self.call(request, "/streaming.StreamService/ServerStream")
for msg in responses:
_ = msg.value
@task
def bidi_stream(self):
requests = (streaming_pb2.StreamRequest(value=i) for i in range(5))
responses = self.call(requests, "/streaming.StreamService/BidiStream")
for msg in responses:
_ = msg.value
Notes:
protoc with streaming definitions.locust-plugins, grpcio, grpcio-tools if you wish to test locally.