[chttp2] Cache-align BDP estimator (#34893)
This commit is contained in:
parent
12df94b848
commit
4b091c1fa0
|
|
@ -30,12 +30,12 @@ grpc_core::TraceFlag grpc_bdp_estimator_trace(false, "bdp_estimator");
|
|||
namespace grpc_core {
|
||||
|
||||
BdpEstimator::BdpEstimator(absl::string_view name)
|
||||
: ping_state_(PingState::UNSCHEDULED),
|
||||
accumulator_(0),
|
||||
: accumulator_(0),
|
||||
estimate_(65536),
|
||||
ping_start_time_(gpr_time_0(GPR_CLOCK_MONOTONIC)),
|
||||
inter_ping_delay_(Duration::Milliseconds(100)), // start at 100ms
|
||||
stable_estimate_count_(0),
|
||||
ping_state_(PingState::UNSCHEDULED),
|
||||
bw_est_(0),
|
||||
name_(name) {}
|
||||
|
||||
|
|
|
|||
|
|
@ -81,13 +81,13 @@ class BdpEstimator {
|
|||
private:
|
||||
enum class PingState { UNSCHEDULED, SCHEDULED, STARTED };
|
||||
|
||||
PingState ping_state_;
|
||||
int64_t accumulator_;
|
||||
int64_t estimate_;
|
||||
// when was the current ping started?
|
||||
gpr_timespec ping_start_time_;
|
||||
Duration inter_ping_delay_;
|
||||
int stable_estimate_count_;
|
||||
PingState ping_state_;
|
||||
double bw_est_;
|
||||
absl::string_view name_;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue