• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2019 The gRPC Authors
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// This file contains a copy of the ORCA load reporting protos, with the
16// validation options stripped out to avoid the extra dependency on
17// protoc-gen-validate.
18//
19// TODO(juanlishen): This file is a hack to avoid a problem we're
20// currently having where we can't depend on a proto file in an external
21// repo due to bazel limitations.  Once that's fixed, this should be
22// removed.  Until this, it should be used in the gRPC tests only, or else it
23// will cause a conflict due to the same proto messages being defined in
24// multiple files in the same binary.
25
26syntax = "proto3";
27
28package udpa.data.orca.v1;
29
30option java_outer_classname = "OrcaLoadReportProto";
31option java_multiple_files = true;
32option java_package = "io.envoyproxy.udpa.data.orca.v1";
33option go_package = "v1";
34
35// See section `ORCA load report format` of the design document in
36// :ref:`https://github.com/envoyproxy/envoy/issues/6614`.
37
38message OrcaLoadReport {
39  // CPU utilization expressed as a fraction of available CPU resources. This
40  // should be derived from the latest sample or measurement.
41  double cpu_utilization = 1;
42
43  // Memory utilization expressed as a fraction of available memory
44  // resources. This should be derived from the latest sample or measurement.
45  double mem_utilization = 2;
46
47  // Total RPS being served by an endpoint. This should cover all services that an endpoint is
48  // responsible for.
49  uint64 rps = 3;
50
51  // Application specific requests costs. Each value is an absolute cost (e.g. 3487 bytes of
52  // storage) associated with the request.
53  map<string, double> request_cost = 4;
54
55  // Resource utilization values. Each value is expressed as a fraction of total resources
56  // available, derived from the latest sample or measurement.
57  map<string, double> utilization = 5;
58}
59