Go to the documentation of this file.
19 #ifndef GRPC_SRC_CPP_SERVER_LOAD_REPORTER_LOAD_DATA_STORE_H
20 #define GRPC_SRC_CPP_SERVER_LOAD_REPORTER_LOAD_DATA_STORE_H
31 #include <unordered_map>
37 namespace load_reporter {
105 *
seed ^= std::hash<std::string>()(
k) + 0x9e3779b9 + (*
seed << 6) +
140 double total_metric_value);
182 const std::unordered_map<std::string, CallMetricValue>&
call_metrics()
const {
200 std::unordered_map<LoadRecordKey, LoadRecordValue, LoadRecordKey::Hasher>;
223 return "[PerBalancerStore lb_id_=" +
lb_id_ +
" load_key_=" +
load_key_ +
277 std::unordered_map<std::string, std::set<std::string>>
283 std::unordered_map<std::string, std::unique_ptr<PerBalancerStore>>
312 const string& lb_id);
349 #endif // GRPC_SRC_CPP_SERVER_LOAD_REPORTER_LOAD_DATA_STORE_H
void MergeRow(const LoadRecordKey &key, const LoadRecordValue &value)
uint64_t bytes_recv() const
PerBalancerStore * FindPerBalancerStore(const std::string &hostname, const std::string &lb_id) const
void ReportStreamCreated(const std::string &hostname, const std::string &lb_id, const std::string &load_key)
uint64_t error_count() const
PerBalancerStore * FindPerBalancerStore(const std::string &lb_id) const
uint64_t last_reported_num_calls_in_progress_
std::unordered_map< std::string, std::unique_ptr< PerBalancerStore > > per_balancer_stores_
void MergeFrom(const LoadRecordValue &other)
const std::string & lb_tag() const
uint64_t start_count() const
static const uint8_t seed[20]
uint64_t num_calls() const
double total_metric_value() const
const std::string & lb_id() const
LoadRecordKey(std::string lb_id, std::string lb_tag, std::string user_id, std::string client_ip_hex)
void AssignOrphanedStore(PerBalancerStore *orphaned_store, const std::string &new_receiver)
uint64_t latency_ms() const
std::unordered_map< LoadRecordKey, LoadRecordValue, LoadRecordKey::Hasher > LoadRecordMap
const std::string & load_key() const
const std::string & user_id() const
int64_t GetNumCallsInProgressDelta() const
LoadRecordMap load_record_map_
void ReportStreamClosed(const std::string &lb_id)
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
const std::string & lb_id() const
std::unordered_map< std::string, uint64_t > unknown_balancer_id_trackers_
unsigned __int64 uint64_t
const std::set< PerBalancerStore * > * GetAssignedStores(const string &hostname, const string &lb_id)
LoadRecordValue(uint64_t start_count=0, uint64_t ok_count=0, uint64_t error_count=0, uint64_t bytes_sent=0, uint64_t bytes_recv=0, uint64_t latency_ms=0)
std::string client_ip_hex_
void MergeFrom(CallMetricValue other)
double total_metric_value_
size_t operator()(const LoadRecordKey &k) const
std::unordered_map< std::string, CallMetricValue > call_metrics_
std::unordered_map< std::string, PerHostStore > per_host_stores_
void ReportStreamCreated(const std::string &lb_id, const std::string &load_key)
void ClearLoadRecordMap()
void hash_combine(size_t *seed, const std::string &k) const
bool operator==(const LoadRecordKey &other) const
void ReportStreamClosed(const std::string &hostname, const std::string &lb_id)
bool IsTrackedUnknownBalancerId(const std::string &lb_id) const
const std::string & client_ip_hex() const
const LoadRecordMap & load_record_map() const
uint64_t bytes_sent() const
CallMetricValue(uint64_t num_calls=0, double total_metric_value=0)
uint64_t num_calls_in_progress_
bool InsertCallMetric(const std::string &metric_name, const CallMetricValue &metric_value)
std::string GetClientIpBytes() const
uint64_t GetNumCallsInProgressForReport()
std::string ToString() const
PerBalancerStore(std::string lb_id, std::string load_key)
std::string ToString() const
void SetUpForNewLbId(const std::string &lb_id, const std::string &load_key)
std::unordered_map< std::string, std::set< PerBalancerStore * > > assigned_stores_
const std::set< PerBalancerStore * > * GetAssignedStores(const std::string &lb_id) const
static bool to_string(zval *from)
bool IsNumCallsInProgressChangedSinceLastReport() const
std::unordered_map< std::string, std::set< std::string > > load_key_to_receiving_lb_ids_
uint64_t ok_count() const
const std::unordered_map< std::string, CallMetricValue > & call_metrics() const
void MergeRow(const std::string &hostname, const LoadRecordKey &key, const LoadRecordValue &value)
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:00:29