From 4565d8fb643042ad899086cff5f8c0eaf387bdc6 Mon Sep 17 00:00:00 2001 From: Chengyuan Zhang Date: Thu, 15 Oct 2020 17:17:54 -0700 Subject: [PATCH] Add message and service definition for querying test client's real-time stats. --- src/proto/grpc/testing/messages.proto | 10 ++++++++++ src/proto/grpc/testing/test.proto | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/src/proto/grpc/testing/messages.proto b/src/proto/grpc/testing/messages.proto index 70e34277607..e4abe3c4d52 100644 --- a/src/proto/grpc/testing/messages.proto +++ b/src/proto/grpc/testing/messages.proto @@ -212,3 +212,13 @@ message LoadBalancerStatsResponse { int32 num_failures = 2; map rpcs_by_method = 3; } + +// Real-time stats for RPCs sent by a test client. +message LoadBalancerRealTimeStatsResponse { + // The real-time total number of RPCs issued. + int32 num_rpcs_started = 1; + // The real-time total number of RPCs completed successfully for each peer. + map num_rpcs_succeeded_by_peer = 2; + // The real-time total number of RPCs failed. + int32 num_rpcs_failed = 3; +} diff --git a/src/proto/grpc/testing/test.proto b/src/proto/grpc/testing/test.proto index 1da43f48989..a2c9dcd8460 100644 --- a/src/proto/grpc/testing/test.proto +++ b/src/proto/grpc/testing/test.proto @@ -85,6 +85,13 @@ service LoadBalancerStatsService { returns (LoadBalancerStatsResponse) {} } +// A service used to obtain real-time stats for verifying LB behavior. +service LoadBalancerRealTimeStatsService { + // Gets the real-time stats for RPCs sent by a test client. + rpc GetClientRealTimeStats(grpc.testing.Empty) + returns (LoadBalancerRealTimeStatsResponse) {} +} + // A service to remotely control health status of an xDS test server. service XdsUpdateHealthService { rpc SetServing(grpc.testing.Empty) returns (grpc.testing.Empty);