19 #ifndef GRPC_CORE_LIB_TRANSPORT_BDP_ESTIMATOR_H
20 #define GRPC_CORE_LIB_TRANSPORT_BDP_ESTIMATOR_H
54 accumulator_, estimate_);
56 GPR_ASSERT(ping_state_ == PingState::UNSCHEDULED);
57 ping_state_ = PingState::SCHEDULED;
67 accumulator_, estimate_);
69 GPR_ASSERT(ping_state_ == PingState::SCHEDULED);
70 ping_state_ = PingState::STARTED;
80 enum class PingState { UNSCHEDULED, SCHEDULED, STARTED };
82 PingState ping_state_;
87 int inter_ping_delay_;
88 int stable_estimate_count_;
grpc_core::TraceFlag grpc_bdp_estimator_trace
Definition: bdp_estimator.h:38
BdpEstimator(const char *name)
Definition: bdp_estimator.cc:32
double EstimateBandwidth() const
Definition: bdp_estimator.h:44
~BdpEstimator()
Definition: bdp_estimator.h:41
int64_t EstimateBdp() const
Definition: bdp_estimator.h:43
void SchedulePing()
Definition: bdp_estimator.h:51
grpc_millis CompletePing()
Definition: bdp_estimator.cc:42
void StartPing()
Definition: bdp_estimator.h:64
void AddIncomingBytes(int64_t num_bytes)
Definition: bdp_estimator.h:46
int64_t accumulator()
Definition: bdp_estimator.h:77
int64_t grpc_millis
Definition: exec_ctx.h:37
@ GPR_CLOCK_MONOTONIC
Monotonic clock.
Definition: gpr_types.h:33
GPRAPI gpr_timespec gpr_now(gpr_clock_type clock)
Return the current time measured from the given clocks epoch.
#define GPR_ASSERT(x)
abort() the process if x is zero, having written a line to the log.
Definition: log.h:92
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
Log a message.
#define GPR_INFO
Definition: log.h:54
Round Robin Policy.
Definition: backend_metric.cc:26
Analogous to struct timespec.
Definition: gpr_types.h:47
#define GRPC_TRACE_FLAG_ENABLED(f)
Definition: trace.h:112