grpc/test/core
Soheil Hassas Yeganeh ad1b3e5094 Introduce grpc_byte_buffer_reader_peek and use it for Protobuf parsing.
grpc_byte_buffer_reader_next() copies and references the slice. This
is not always necessary since the caller will not use the slice
after destroying the byte buffer.

A prominent example is the protobuf parser, which
calls grpc_byte_buffer_reader_next() and immediately unrefs the slice
after the call. This ref() and unref() calls can be very expensive
in the hot path.

This commit introduces grpc_byte_buffer_reader_peek() which
essentialy return a pointer to the slice in the buffer, i.e.,
no copies, and no refs.

QPS of 1MiB 1 Channel callback benchmark increases by 5%.
More importantly insructions per cycle is increased by 10%.

Also add tests and benchmarks for byte_buffer_reader_peek()

This commit reaplies 509e77a5a3
2019-03-21 06:03:45 -04:00
..
avl Fix BUILD files. Manually edit bzl files 2018-12-06 14:37:52 -08:00
backoff Fix BUILD files. Manually edit bzl files 2018-12-06 14:37:52 -08:00
bad_client Implement TCP_INQ for gRPC in Linux 2019-03-06 22:15:53 -05:00
bad_connection Revert "Windows builds for gRPC C++ tests" 2019-03-15 17:15:20 +01:00
bad_ssl Promote gpr_test_util to part of grpc_test_util, add a sample to show it works, build.yaml change first 2018-12-06 13:40:12 -08:00
channel Revert "Merge pull request #18093 from grpc/revert-17770-lb_policy_picker_api" 2019-02-19 13:19:24 -08:00
client_channel Revert "Windows builds for gRPC C++ tests" 2019-03-15 17:15:20 +01:00
compression Fix BUILD files. Manually edit bzl files 2018-12-06 14:37:52 -08:00
debug Fix BUILD files. Manually edit bzl files 2018-12-06 14:37:52 -08:00
end2end fix clang-tidy errors 2019-03-15 12:57:25 -07:00
fling Fix bazel build for fling, memory_usage test 2018-12-21 15:49:15 -08:00
gpr fix more detected mu/cv leaks 2019-02-16 00:00:50 +08:00
gprpp fix more detected mu/cv leaks 2019-02-16 00:00:50 +08:00
handshake Implement TCP_INQ for gRPC in Linux 2019-03-06 22:15:53 -05:00
http Fix BUILD files. Manually edit bzl files 2018-12-06 14:37:52 -08:00
iomgr Fix CFStreamTests 2019-03-18 10:47:41 -07:00
json Revert "Merge pull request #18146 from grpc/revert-17308-shutdown" 2019-02-25 10:11:06 -08:00
memory_usage Revert "Merge pull request #18146 from grpc/revert-17308-shutdown" 2019-02-25 10:11:06 -08:00
nanopb clang-format 2017-12-06 18:55:05 -08:00
network_benchmarks Fix BUILD files. Manually edit bzl files 2018-12-06 14:37:52 -08:00
profiling
security Implement TCP_INQ for gRPC in Linux 2019-03-06 22:15:53 -05:00
slice Fix fuzzer test 2019-03-06 15:43:12 -08:00
surface Introduce grpc_byte_buffer_reader_peek and use it for Protobuf parsing. 2019-03-21 06:03:45 -04:00
transport Implement TCP_INQ for gRPC in Linux 2019-03-06 22:15:53 -05:00
tsi Merge pull request #18171 from huynq0911/fix_duplicated_word 2019-02-27 19:15:53 -08:00
util LB policy API cleanup 2019-03-14 12:19:09 -07:00