Sha256: 8fd03565169a58906b68453d72d526ef7e4e0768e3a392c6ec9edcc3d6ed3938

Contents?: true

Size: 1.76 KB

Versions: 20

Compression:

Stored size: 1.76 KB

Contents

/*
 *
 * Copyright 2022 gRPC authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_BACKEND_METRIC_DATA_H
#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_BACKEND_METRIC_DATA_H

#include <grpc/support/port_platform.h>

#include <map>

#include "absl/strings/string_view.h"

namespace grpc_core {

// Represents backend metrics reported by the backend to the client.
struct BackendMetricData {
  /// CPU utilization expressed as a fraction of available CPU resources.
  double cpu_utilization = -1;
  /// Memory utilization expressed as a fraction of available memory
  /// resources.
  double mem_utilization = -1;
  /// Application-specific requests cost metrics.  Metric names are
  /// determined by the application.  Each value is an absolute cost
  /// (e.g. 3487 bytes of storage) associated with the request.
  std::map<absl::string_view, double> request_cost;
  /// Application-specific resource utilization metrics.  Metric names
  /// are determined by the application.  Each value is expressed as a
  /// fraction of total resources available.
  std::map<absl::string_view, double> utilization;
};

}  // namespace grpc_core

#endif  // GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_BACKEND_METRIC_DATA_H

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
rubypitaya-3.12.5 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/grpc-1.50.0-x86_64-linux/src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h
rubypitaya-3.12.4 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/grpc-1.50.0-x86_64-linux/src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h
grpc-1.51.0-x86_64-linux src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h
grpc-1.51.0 src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h
rubypitaya-3.12.3 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/grpc-1.50.0-x86_64-linux/src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h
rubypitaya-3.12.2 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/grpc-1.50.0-x86_64-linux/src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h
grpc-1.50.0 src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h
grpc-1.50.0-x86_64-linux src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h
grpc-1.50.0.pre1 src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h
grpc-1.50.0.pre1-x86_64-linux src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h
grpc-1.49.1 src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h
grpc-1.49.1-x86_64-linux src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h
grpc-1.49.0.pre1 src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h
grpc-1.49.0.pre1-x86_64-linux src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h
grpc-1.48.0-x86_64-linux src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h
grpc-1.48.0 src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h
grpc-1.48.0.pre1 src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h
grpc-1.48.0.pre1-x86_64-linux src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h
grpc-1.47.0 src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h
grpc-1.47.0-x86_64-linux src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h