aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/transport/bdp_estimator.cc
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-10-16 13:50:29 -0700
committerGravatar Craig Tiller <ctiller@google.com>2017-10-16 13:50:29 -0700
commit6014e8a945fa81fad7d0311a8a7cded0c2aaa827 (patch)
tree179de89f5b6bbaf861a6a9c0bcd2e4b5cfb83aca /src/core/lib/transport/bdp_estimator.cc
parent4979ce5f9341ff72c5974bd86e101016438660f0 (diff)
C++ize tracing
Diffstat (limited to 'src/core/lib/transport/bdp_estimator.cc')
-rw-r--r--src/core/lib/transport/bdp_estimator.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/lib/transport/bdp_estimator.cc b/src/core/lib/transport/bdp_estimator.cc
index 2a1c97c84e..82fcb9e562 100644
--- a/src/core/lib/transport/bdp_estimator.cc
+++ b/src/core/lib/transport/bdp_estimator.cc
@@ -23,8 +23,8 @@
#include <grpc/support/useful.h>
-grpc_tracer_flag grpc_bdp_estimator_trace =
- GRPC_TRACER_INITIALIZER(false, "bdp_estimator");
+grpc_core::Tracer grpc_bdp_estimator_trace
+ (false, "bdp_estimator");
namespace grpc_core {
@@ -45,7 +45,7 @@ void BdpEstimator::CompletePing(grpc_exec_ctx *exec_ctx) {
double dt = (double)dt_ts.tv_sec + 1e-9 * (double)dt_ts.tv_nsec;
double bw = dt > 0 ? ((double)accumulator_ / dt) : 0;
int start_inter_ping_delay = inter_ping_delay_;
- if (GRPC_TRACER_ON(grpc_bdp_estimator_trace)) {
+ if (grpc_bdp_estimator_trace.enabled()) {
gpr_log(GPR_DEBUG, "bdp[%s]:complete acc=%" PRId64 " est=%" PRId64
" dt=%lf bw=%lfMbs bw_est=%lfMbs",
name_, accumulator_, estimate_, dt, bw / 125000.0,
@@ -55,7 +55,7 @@ void BdpEstimator::CompletePing(grpc_exec_ctx *exec_ctx) {
if (accumulator_ > 2 * estimate_ / 3 && bw > bw_est_) {
estimate_ = GPR_MAX(accumulator_, estimate_ * 2);
bw_est_ = bw;
- if (GRPC_TRACER_ON(grpc_bdp_estimator_trace)) {
+ if (grpc_bdp_estimator_trace.enabled()) {
gpr_log(GPR_DEBUG, "bdp[%s]: estimate increased to %" PRId64, name_,
estimate_);
}
@@ -72,7 +72,7 @@ void BdpEstimator::CompletePing(grpc_exec_ctx *exec_ctx) {
}
if (start_inter_ping_delay != inter_ping_delay_) {
stable_estimate_count_ = 0;
- if (GRPC_TRACER_ON(grpc_bdp_estimator_trace)) {
+ if (grpc_bdp_estimator_trace.enabled()) {
gpr_log(GPR_DEBUG, "bdp[%s]:update_inter_time to %dms", name_,
inter_ping_delay_);
}