backend_metric_data.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2022 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 #ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_BACKEND_METRIC_DATA_H
20 #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_BACKEND_METRIC_DATA_H
21 
23 
24 #include <map>
25 
26 #include "absl/strings/string_view.h"
27 
28 namespace grpc_core {
29 
30 // Represents backend metrics reported by the backend to the client.
33  double cpu_utilization = -1;
36  double mem_utilization = -1;
40  std::map<absl::string_view, double> request_cost;
44  std::map<absl::string_view, double> utilization;
45 };
46 
47 } // namespace grpc_core
48 
49 #endif // GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_BACKEND_METRIC_DATA_H
grpc_core::BackendMetricData::mem_utilization
double mem_utilization
Definition: backend_metric_data.h:36
grpc_core::BackendMetricData
Definition: backend_metric_data.h:31
grpc_core
Definition: call_metric_recorder.h:31
grpc_core::BackendMetricData::cpu_utilization
double cpu_utilization
CPU utilization expressed as a fraction of available CPU resources.
Definition: backend_metric_data.h:33
grpc_core::BackendMetricData::request_cost
std::map< absl::string_view, double > request_cost
Definition: backend_metric_data.h:40
grpc_core::BackendMetricData::utilization
std::map< absl::string_view, double > utilization
Definition: backend_metric_data.h:44
port_platform.h


grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:35