diff options
author | 2015-07-10 10:23:10 -0700 | |
---|---|---|
committer | 2015-07-10 10:23:10 -0700 | |
commit | 080d6c50bbed3dde739b2de610023d8bd8d7966f (patch) | |
tree | 647488fcbb5e1be2ef9d0f36f75b6d3382700623 /test/core/util | |
parent | 75105868f667443ac059b7c4f779697932aca509 (diff) | |
parent | a9a8eb70604b5da61f8e768bc52192910ba60251 (diff) |
Merge github.com:grpc/grpc into footprints-on-the-sands-of-time
Diffstat (limited to 'test/core/util')
-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) {} |