[chttp2] Cache-align BDP estimator (#34893)

This commit is contained in:
Alisha Nanda 2023-11-07 15:13:28 -08:00 committed by GitHub
parent 12df94b848
commit 4b091c1fa0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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) {}

View File

@ -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_;
};