#include <load_reporter.h>
Classes | |
| struct | LoadBalancingFeedbackRecord |
Public Member Functions | |
| CensusViewProvider * | census_view_provider () |
| CpuStatsProvider * | cpu_stats_provider () |
| void | FetchAndSample () |
| std::string | GenerateLbId () |
| grpc::lb::v1::LoadBalancingFeedback | GenerateLoadBalancingFeedback () |
| ::google::protobuf::RepeatedPtrField< grpc::lb::v1::Load > | GenerateLoads (const std::string &hostname, const std::string &lb_id) |
| LoadReporter (uint32_t feedback_sample_window_seconds, std::unique_ptr< CensusViewProvider > census_view_provider, std::unique_ptr< CpuStatsProvider > cpu_stats_provider) | |
| void | ReportStreamClosed (const std::string &hostname, const std::string &lb_id) |
| void | ReportStreamCreated (const std::string &hostname, const std::string &lb_id, const std::string &load_key) |
Private Member Functions | |
| void | AppendNewFeedbackRecord (uint64_t rpcs, uint64_t errors) |
| void | AttachOrphanLoadId (grpc::lb::v1::Load *load, const PerBalancerStore &per_balancer_store) |
| bool | IsRecordInWindow (const LoadBalancingFeedbackRecord &record, std::chrono::system_clock::time_point now) |
| void | ProcessViewDataCallEnd (const CensusViewProvider::ViewDataMap &view_data_map) |
| void | ProcessViewDataCallStart (const CensusViewProvider::ViewDataMap &view_data_map) |
| void | ProcessViewDataOtherCallMetrics (const CensusViewProvider::ViewDataMap &view_data_map) |
Private Attributes | |
| std::unique_ptr< CensusViewProvider > | census_view_provider_ |
| std::unique_ptr< CpuStatsProvider > | cpu_stats_provider_ |
| grpc_core::Mutex | feedback_mu_ |
| std::deque< LoadBalancingFeedbackRecord > | feedback_records_ |
| const std::chrono::seconds | feedback_sample_window_seconds_ |
| LoadDataStore | load_data_store_ |
| std::atomic< int64_t > | next_lb_id_ {0} |
| grpc_core::Mutex | store_mu_ |
Definition at line 126 of file load_reporter.h.
|
inline |
Definition at line 129 of file load_reporter.h.
|
private |
Definition at line 376 of file load_reporter.cc.
|
private |
Definition at line 362 of file load_reporter.cc.
|
inline |
Definition at line 176 of file load_reporter.h.
|
inline |
Definition at line 179 of file load_reporter.h.
| void grpc::load_reporter::LoadReporter::FetchAndSample | ( | ) |
Definition at line 506 of file load_reporter.cc.
| std::string grpc::load_reporter::LoadReporter::GenerateLbId | ( | ) |
Definition at line 227 of file load_reporter.cc.
| grpc::lb::v1::LoadBalancingFeedback grpc::load_reporter::LoadReporter::GenerateLoadBalancingFeedback | ( | ) |
Definition at line 251 of file load_reporter.cc.
| google::protobuf::RepeatedPtrField< grpc::lb::v1::Load > grpc::load_reporter::LoadReporter::GenerateLoads | ( | const std::string & | hostname, |
| const std::string & | lb_id | ||
| ) |
Definition at line 301 of file load_reporter.cc.
|
inlineprivate |
Definition at line 212 of file load_reporter.h.
|
private |
Definition at line 427 of file load_reporter.cc.
|
private |
Definition at line 407 of file load_reporter.cc.
|
private |
Definition at line 480 of file load_reporter.cc.
| void grpc::load_reporter::LoadReporter::ReportStreamClosed | ( | const std::string & | hostname, |
| const std::string & | lb_id | ||
| ) |
Definition at line 399 of file load_reporter.cc.
| void grpc::load_reporter::LoadReporter::ReportStreamCreated | ( | const std::string & | hostname, |
| const std::string & | lb_id, | ||
| const std::string & | load_key | ||
| ) |
Definition at line 389 of file load_reporter.cc.
|
private |
Definition at line 232 of file load_reporter.h.
|
private |
Definition at line 233 of file load_reporter.h.
|
private |
Definition at line 226 of file load_reporter.h.
|
private |
Definition at line 227 of file load_reporter.h.
|
private |
Definition at line 225 of file load_reporter.h.
|
private |
Definition at line 231 of file load_reporter.h.
|
private |
Definition at line 224 of file load_reporter.h.
|
private |
Definition at line 230 of file load_reporter.h.