diff options
author | David Garcia Quintas <dgq@google.com> | 2016-05-18 10:53:14 -0700 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2016-05-18 10:53:14 -0700 |
commit | f1945f2a67575d3e3a5d9f59862de9f412cc776f (patch) | |
tree | 0e3c1f077a5ceee1df539ee69360b4e4f7436b5c /src/core/lib/channel | |
parent | 3e71f774c8c004d97fea6d48dbb89341c71195ad (diff) | |
parent | fcbe7daf832dcb616fc93ca59c3b1aab279f510e (diff) |
Merge branch 'master' of github.com:grpc/grpc into compression_incoming_checks
Diffstat (limited to 'src/core/lib/channel')
-rw-r--r-- | src/core/lib/channel/compress_filter.c | 12 | ||||
-rw-r--r-- | src/core/lib/channel/compress_filter.h | 2 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c index 5510c79b18..0e548c61b8 100644 --- a/src/core/lib/channel/compress_filter.c +++ b/src/core/lib/channel/compress_filter.c @@ -47,7 +47,7 @@ #include "src/core/lib/support/string.h" #include "src/core/lib/transport/static_metadata.h" -int grpc_compress_filter_trace = 0; +int grpc_compression_trace = 0; typedef struct call_data { gpr_slice_buffer slices; /**< Buffers up input slices to be compressed */ @@ -171,7 +171,7 @@ static void finish_send_message(grpc_exec_ctx *exec_ctx, did_compress = grpc_msg_compress(calld->compression_algorithm, &calld->slices, &tmp); if (did_compress) { - if (grpc_compress_filter_trace) { + if (grpc_compression_trace) { char *algo_name; const size_t before_size = calld->slices.length; const size_t after_size = tmp.length; @@ -185,12 +185,14 @@ static void finish_send_message(grpc_exec_ctx *exec_ctx, gpr_slice_buffer_swap(&calld->slices, &tmp); calld->send_flags |= GRPC_WRITE_INTERNAL_COMPRESS; } else { - if (grpc_compress_filter_trace) { + if (grpc_compression_trace) { char *algo_name; GPR_ASSERT(grpc_compression_algorithm_name(calld->compression_algorithm, &algo_name)); - gpr_log(GPR_DEBUG, "Algorithm '%s' enabled but decided not to compress.", - algo_name); + gpr_log( + GPR_DEBUG, + "Algorithm '%s' enabled but decided not to compress. Input size: %d", + algo_name, calld->slices.length); } } diff --git a/src/core/lib/channel/compress_filter.h b/src/core/lib/channel/compress_filter.h index cf5879d82e..0ce5d08837 100644 --- a/src/core/lib/channel/compress_filter.h +++ b/src/core/lib/channel/compress_filter.h @@ -38,7 +38,7 @@ #define GRPC_COMPRESS_REQUEST_ALGORITHM_KEY "grpc-internal-encoding-request" -extern int grpc_compress_filter_trace; +extern int grpc_compression_trace; /** Compression filter for outgoing data. * |