diff --git a/interop-testing/src/main/java/io/grpc/testing/integration/AbstractInteropTest.java b/interop-testing/src/main/java/io/grpc/testing/integration/AbstractInteropTest.java index 970b2d1e83..882353b0fc 100644 --- a/interop-testing/src/main/java/io/grpc/testing/integration/AbstractInteropTest.java +++ b/interop-testing/src/main/java/io/grpc/testing/integration/AbstractInteropTest.java @@ -1750,7 +1750,7 @@ public abstract class AbstractInteropTest { .putUtilization("util", 0.30499) .build(); blockingStub.withOption(ORCA_RPC_REPORT_KEY, reportHolder).unaryCall( - SimpleRequest.newBuilder().setOrcaPerRpcReport(answer).build()); + SimpleRequest.newBuilder().setOrcaPerQueryReport(answer).build()); assertThat(reportHolder.get()).isEqualTo(answer); } diff --git a/interop-testing/src/main/java/io/grpc/testing/integration/TestServiceImpl.java b/interop-testing/src/main/java/io/grpc/testing/integration/TestServiceImpl.java index bb2c845378..6162eece7c 100644 --- a/interop-testing/src/main/java/io/grpc/testing/integration/TestServiceImpl.java +++ b/interop-testing/src/main/java/io/grpc/testing/integration/TestServiceImpl.java @@ -123,7 +123,7 @@ public class TestServiceImpl extends TestServiceGrpc.TestServiceImplBase { return; } - echoCallMetricsFromPayload(req.getOrcaPerRpcReport()); + echoCallMetricsFromPayload(req.getOrcaPerQueryReport()); echoMetricsFromPayload(req.getOrcaOobReport()); responseObserver.onNext(responseBuilder.build()); responseObserver.onCompleted(); diff --git a/interop-testing/src/main/proto/grpc/testing/messages.proto b/interop-testing/src/main/proto/grpc/testing/messages.proto index d71ac13282..2016115462 100644 --- a/interop-testing/src/main/proto/grpc/testing/messages.proto +++ b/interop-testing/src/main/proto/grpc/testing/messages.proto @@ -101,20 +101,13 @@ message SimpleRequest { // Whether SimpleResponse should include grpclb_route_type. bool fill_grpclb_route_type = 10; - // Whether server should update per-rpc metrics. - TestOrcaReport orca_per_rpc_report = 11; + // If set the server should record this metrics report data for the current RPC. + TestOrcaReport orca_per_query_report = 11; - // Whether server should update OOB metrics. + // If set the server should update this metrics report data at the OOB server. TestOrcaReport orca_oob_report = 12; } -message TestOrcaReport { - double cpu_utilization = 1; - double memory_utilization = 2; - map request_cost = 3; - map utilization = 4; -} - // Unary response, as configured by the request. message SimpleResponse { // Payload to increase message size. @@ -283,3 +276,13 @@ message ClientConfigureRequest { // Response for updating a test client's configuration. message ClientConfigureResponse {} + +// Metrics data the server will update and send to the client. It mirrors orca load report +// https://github.com/cncf/xds/blob/eded343319d09f30032952beda9840bbd3dcf7ac/xds/data/orca/v3/orca_load_report.proto#L15, +// but avoids orca dependency. Used by both per-query and out-of-band reporting tests. +message TestOrcaReport { + double cpu_utilization = 1; + double memory_utilization = 2; + map request_cost = 3; + map utilization = 4; +}