From c567debcd94e4d5aaf46dddccb1d17f06b992c89 Mon Sep 17 00:00:00 2001 From: Qiao Longfei Date: Wed, 13 Mar 2019 19:01:53 +0800 Subject: [PATCH] optimize log --- paddle/fluid/operators/distributed/communicator.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/paddle/fluid/operators/distributed/communicator.cc b/paddle/fluid/operators/distributed/communicator.cc index 72f26e91b21..3661c2763db 100644 --- a/paddle/fluid/operators/distributed/communicator.cc +++ b/paddle/fluid/operators/distributed/communicator.cc @@ -128,8 +128,11 @@ void Communicator::SendThread() { task_f.wait(); } auto after_run_send_graph = GetCurrentUS(); - VLOG(3) << "run send graph use time " - << after_run_send_graph - before_run_send_graph; + auto send_graph_use_time = after_run_send_graph - before_run_send_graph; + if (send_graph_use_time > 10) { + VLOG(1) << "run send graph use time " + << after_run_send_graph - before_run_send_graph; + } if (!FLAGS_communicator_independent_recv_thread) { RecvAll(); } @@ -156,7 +159,7 @@ void Communicator::RecvAll() { task.wait(); } auto after_recv = GetCurrentUS(); - VLOG(3) << "run recv graph use time " << after_recv - before_send; + VLOG(1) << "run recv graph use time " << after_recv - before_send; } void Communicator::RecvThread() { -- GitLab