aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/transport/bdp_estimator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lib/transport/bdp_estimator.cc')
-rw-r--r--src/core/lib/transport/bdp_estimator.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/lib/transport/bdp_estimator.cc b/src/core/lib/transport/bdp_estimator.cc
index 044183e8fd..70b308230b 100644
--- a/src/core/lib/transport/bdp_estimator.cc
+++ b/src/core/lib/transport/bdp_estimator.cc
@@ -40,7 +40,8 @@ BdpEstimator::BdpEstimator(const char* name)
grpc_millis BdpEstimator::CompletePing() {
gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC);
gpr_timespec dt_ts = gpr_time_sub(now, ping_start_time_);
- double dt = static_cast<double>(dt_ts.tv_sec) + 1e-9 * static_cast<double>(dt_ts.tv_nsec);
+ double dt = static_cast<double>(dt_ts.tv_sec) +
+ 1e-9 * static_cast<double>(dt_ts.tv_nsec);
double bw = dt > 0 ? (static_cast<double>(accumulator_) / dt) : 0;
int start_inter_ping_delay = inter_ping_delay_;
if (grpc_bdp_estimator_trace.enabled()) {
@@ -64,8 +65,8 @@ grpc_millis BdpEstimator::CompletePing() {
stable_estimate_count_++;
if (stable_estimate_count_ >= 2) {
inter_ping_delay_ +=
- 100 +
- static_cast<int>(rand() * 100.0 / RAND_MAX); // if the ping estimate is steady,
+ 100 + static_cast<int>(rand() * 100.0 /
+ RAND_MAX); // if the ping estimate is steady,
// slowly ramp down the probe time
}
}