diff options
Diffstat (limited to 'test/core/util/grpc_profiler.c')
-rw-r--r-- | test/core/util/grpc_profiler.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/test/core/util/grpc_profiler.c b/test/core/util/grpc_profiler.c index d5b6cfeef1..c2c0c9cf53 100644 --- a/test/core/util/grpc_profiler.c +++ b/test/core/util/grpc_profiler.c @@ -43,11 +43,17 @@ void grpc_profiler_stop() { ProfilerStop(); } #include <grpc/support/log.h> void grpc_profiler_start(const char *filename) { - gpr_log(GPR_DEBUG, - "You do not have google-perftools installed, profiling is disabled [for %s]", filename); - gpr_log(GPR_DEBUG, - "To install on ubuntu: sudo apt-get install google-perftools " - "libgoogle-perftools-dev"); + static int printed_warning = 0; + if (!printed_warning) { + gpr_log(GPR_DEBUG, + "You do not have google-perftools installed, profiling is disabled " + "[for %s]", + filename); + gpr_log(GPR_DEBUG, + "To install on ubuntu: sudo apt-get install google-perftools " + "libgoogle-perftools-dev"); + printed_warning = 1; + } } void grpc_profiler_stop(void) {} |