diff options
Diffstat (limited to 'tools')
18 files changed, 1868 insertions, 34 deletions
diff --git a/tools/README.md b/tools/README.md index d051846c33..62e91246d0 100644 --- a/tools/README.md +++ b/tools/README.md @@ -16,3 +16,6 @@ internal_ci: Support for running tests on an internal CI platform. jenkins: Support for running tests on Jenkins. run_tests: Scripts to run gRPC tests in parallel. + +run_tests/performance: See the [README](./run_tests/performance/README.md) for +more notes on the performance tests. diff --git a/tools/dockerfile/test/multilang_jessie_x64/Dockerfile b/tools/dockerfile/test/multilang_jessie_x64/Dockerfile index 5d0c1686f1..ea57d88c87 100644 --- a/tools/dockerfile/test/multilang_jessie_x64/Dockerfile +++ b/tools/dockerfile/test/multilang_jessie_x64/Dockerfile @@ -135,6 +135,10 @@ RUN pip install pip --upgrade RUN pip install virtualenv RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0 +# Install coverage for Python test coverage reporting +RUN pip install coverage +ENV PATH ~/.local/bin:$PATH + # Prepare ccache RUN ln -s /usr/bin/ccache /usr/local/bin/gcc RUN ln -s /usr/bin/ccache /usr/local/bin/g++ diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 2469b90bdb..59e619749a 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -870,6 +870,12 @@ include/grpc++/support/string_ref.h \ include/grpc++/support/stub_options.h \ include/grpc++/support/sync_stream.h \ include/grpc++/support/time.h \ +include/grpc/byte_buffer.h \ +include/grpc/byte_buffer_reader.h \ +include/grpc/compression.h \ +include/grpc/grpc.h \ +include/grpc/grpc_posix.h \ +include/grpc/grpc_security_constants.h \ include/grpc/impl/codegen/atm.h \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ @@ -888,7 +894,11 @@ include/grpc/impl/codegen/status.h \ include/grpc/impl/codegen/sync.h \ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ -include/grpc/impl/codegen/sync_windows.h +include/grpc/impl/codegen/sync_windows.h \ +include/grpc/load_reporting.h \ +include/grpc/slice.h \ +include/grpc/slice_buffer.h \ +include/grpc/status.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 117738aed8..6d171e3299 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -871,6 +871,12 @@ include/grpc++/support/string_ref.h \ include/grpc++/support/stub_options.h \ include/grpc++/support/sync_stream.h \ include/grpc++/support/time.h \ +include/grpc/byte_buffer.h \ +include/grpc/byte_buffer_reader.h \ +include/grpc/compression.h \ +include/grpc/grpc.h \ +include/grpc/grpc_posix.h \ +include/grpc/grpc_security_constants.h \ include/grpc/impl/codegen/atm.h \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ @@ -890,6 +896,246 @@ include/grpc/impl/codegen/sync.h \ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_windows.h \ +include/grpc/load_reporting.h \ +include/grpc/slice.h \ +include/grpc/slice_buffer.h \ +include/grpc/status.h \ +src/core/lib/channel/channel_args.c \ +src/core/lib/channel/channel_args.h \ +src/core/lib/channel/channel_stack.c \ +src/core/lib/channel/channel_stack.h \ +src/core/lib/channel/channel_stack_builder.c \ +src/core/lib/channel/channel_stack_builder.h \ +src/core/lib/channel/compress_filter.c \ +src/core/lib/channel/compress_filter.h \ +src/core/lib/channel/connected_channel.c \ +src/core/lib/channel/connected_channel.h \ +src/core/lib/channel/context.h \ +src/core/lib/channel/deadline_filter.c \ +src/core/lib/channel/deadline_filter.h \ +src/core/lib/channel/handshaker.c \ +src/core/lib/channel/handshaker.h \ +src/core/lib/channel/handshaker_factory.c \ +src/core/lib/channel/handshaker_factory.h \ +src/core/lib/channel/handshaker_registry.c \ +src/core/lib/channel/handshaker_registry.h \ +src/core/lib/channel/http_client_filter.c \ +src/core/lib/channel/http_client_filter.h \ +src/core/lib/channel/http_server_filter.c \ +src/core/lib/channel/http_server_filter.h \ +src/core/lib/channel/max_age_filter.c \ +src/core/lib/channel/max_age_filter.h \ +src/core/lib/channel/message_size_filter.c \ +src/core/lib/channel/message_size_filter.h \ +src/core/lib/compression/algorithm_metadata.h \ +src/core/lib/compression/compression.c \ +src/core/lib/compression/message_compress.c \ +src/core/lib/compression/message_compress.h \ +src/core/lib/debug/trace.c \ +src/core/lib/debug/trace.h \ +src/core/lib/http/format_request.c \ +src/core/lib/http/format_request.h \ +src/core/lib/http/httpcli.c \ +src/core/lib/http/httpcli.h \ +src/core/lib/http/parser.c \ +src/core/lib/http/parser.h \ +src/core/lib/iomgr/closure.c \ +src/core/lib/iomgr/closure.h \ +src/core/lib/iomgr/combiner.c \ +src/core/lib/iomgr/combiner.h \ +src/core/lib/iomgr/endpoint.c \ +src/core/lib/iomgr/endpoint.h \ +src/core/lib/iomgr/endpoint_pair.h \ +src/core/lib/iomgr/endpoint_pair_posix.c \ +src/core/lib/iomgr/endpoint_pair_uv.c \ +src/core/lib/iomgr/endpoint_pair_windows.c \ +src/core/lib/iomgr/error.c \ +src/core/lib/iomgr/error.h \ +src/core/lib/iomgr/error_internal.h \ +src/core/lib/iomgr/ev_epoll_linux.c \ +src/core/lib/iomgr/ev_epoll_linux.h \ +src/core/lib/iomgr/ev_poll_posix.c \ +src/core/lib/iomgr/ev_poll_posix.h \ +src/core/lib/iomgr/ev_posix.c \ +src/core/lib/iomgr/ev_posix.h \ +src/core/lib/iomgr/exec_ctx.c \ +src/core/lib/iomgr/exec_ctx.h \ +src/core/lib/iomgr/executor.c \ +src/core/lib/iomgr/executor.h \ +src/core/lib/iomgr/iocp_windows.c \ +src/core/lib/iomgr/iocp_windows.h \ +src/core/lib/iomgr/iomgr.c \ +src/core/lib/iomgr/iomgr.h \ +src/core/lib/iomgr/iomgr_internal.h \ +src/core/lib/iomgr/iomgr_posix.c \ +src/core/lib/iomgr/iomgr_posix.h \ +src/core/lib/iomgr/iomgr_uv.c \ +src/core/lib/iomgr/iomgr_windows.c \ +src/core/lib/iomgr/load_file.c \ +src/core/lib/iomgr/load_file.h \ +src/core/lib/iomgr/network_status_tracker.c \ +src/core/lib/iomgr/network_status_tracker.h \ +src/core/lib/iomgr/polling_entity.c \ +src/core/lib/iomgr/polling_entity.h \ +src/core/lib/iomgr/pollset.h \ +src/core/lib/iomgr/pollset_set.h \ +src/core/lib/iomgr/pollset_set_uv.c \ +src/core/lib/iomgr/pollset_set_windows.c \ +src/core/lib/iomgr/pollset_set_windows.h \ +src/core/lib/iomgr/pollset_uv.c \ +src/core/lib/iomgr/pollset_uv.h \ +src/core/lib/iomgr/pollset_windows.c \ +src/core/lib/iomgr/pollset_windows.h \ +src/core/lib/iomgr/port.h \ +src/core/lib/iomgr/resolve_address.h \ +src/core/lib/iomgr/resolve_address_posix.c \ +src/core/lib/iomgr/resolve_address_uv.c \ +src/core/lib/iomgr/resolve_address_windows.c \ +src/core/lib/iomgr/resource_quota.c \ +src/core/lib/iomgr/resource_quota.h \ +src/core/lib/iomgr/sockaddr.h \ +src/core/lib/iomgr/sockaddr_posix.h \ +src/core/lib/iomgr/sockaddr_utils.c \ +src/core/lib/iomgr/sockaddr_utils.h \ +src/core/lib/iomgr/sockaddr_windows.h \ +src/core/lib/iomgr/socket_factory_posix.c \ +src/core/lib/iomgr/socket_factory_posix.h \ +src/core/lib/iomgr/socket_mutator.c \ +src/core/lib/iomgr/socket_mutator.h \ +src/core/lib/iomgr/socket_utils.h \ +src/core/lib/iomgr/socket_utils_common_posix.c \ +src/core/lib/iomgr/socket_utils_linux.c \ +src/core/lib/iomgr/socket_utils_posix.c \ +src/core/lib/iomgr/socket_utils_posix.h \ +src/core/lib/iomgr/socket_utils_uv.c \ +src/core/lib/iomgr/socket_utils_windows.c \ +src/core/lib/iomgr/socket_windows.c \ +src/core/lib/iomgr/socket_windows.h \ +src/core/lib/iomgr/tcp_client.h \ +src/core/lib/iomgr/tcp_client_posix.c \ +src/core/lib/iomgr/tcp_client_posix.h \ +src/core/lib/iomgr/tcp_client_uv.c \ +src/core/lib/iomgr/tcp_client_windows.c \ +src/core/lib/iomgr/tcp_posix.c \ +src/core/lib/iomgr/tcp_posix.h \ +src/core/lib/iomgr/tcp_server.h \ +src/core/lib/iomgr/tcp_server_posix.c \ +src/core/lib/iomgr/tcp_server_utils_posix.h \ +src/core/lib/iomgr/tcp_server_utils_posix_common.c \ +src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c \ +src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c \ +src/core/lib/iomgr/tcp_server_uv.c \ +src/core/lib/iomgr/tcp_server_windows.c \ +src/core/lib/iomgr/tcp_uv.c \ +src/core/lib/iomgr/tcp_uv.h \ +src/core/lib/iomgr/tcp_windows.c \ +src/core/lib/iomgr/tcp_windows.h \ +src/core/lib/iomgr/time_averaged_stats.c \ +src/core/lib/iomgr/time_averaged_stats.h \ +src/core/lib/iomgr/timer.h \ +src/core/lib/iomgr/timer_generic.c \ +src/core/lib/iomgr/timer_generic.h \ +src/core/lib/iomgr/timer_heap.c \ +src/core/lib/iomgr/timer_heap.h \ +src/core/lib/iomgr/timer_uv.c \ +src/core/lib/iomgr/timer_uv.h \ +src/core/lib/iomgr/udp_server.c \ +src/core/lib/iomgr/udp_server.h \ +src/core/lib/iomgr/unix_sockets_posix.c \ +src/core/lib/iomgr/unix_sockets_posix.h \ +src/core/lib/iomgr/unix_sockets_posix_noop.c \ +src/core/lib/iomgr/wakeup_fd_cv.c \ +src/core/lib/iomgr/wakeup_fd_cv.h \ +src/core/lib/iomgr/wakeup_fd_eventfd.c \ +src/core/lib/iomgr/wakeup_fd_nospecial.c \ +src/core/lib/iomgr/wakeup_fd_pipe.c \ +src/core/lib/iomgr/wakeup_fd_pipe.h \ +src/core/lib/iomgr/wakeup_fd_posix.c \ +src/core/lib/iomgr/wakeup_fd_posix.h \ +src/core/lib/iomgr/workqueue.h \ +src/core/lib/iomgr/workqueue_uv.c \ +src/core/lib/iomgr/workqueue_uv.h \ +src/core/lib/iomgr/workqueue_windows.c \ +src/core/lib/iomgr/workqueue_windows.h \ +src/core/lib/json/json.c \ +src/core/lib/json/json.h \ +src/core/lib/json/json_common.h \ +src/core/lib/json/json_reader.c \ +src/core/lib/json/json_reader.h \ +src/core/lib/json/json_string.c \ +src/core/lib/json/json_writer.c \ +src/core/lib/json/json_writer.h \ +src/core/lib/slice/b64.c \ +src/core/lib/slice/b64.h \ +src/core/lib/slice/percent_encoding.c \ +src/core/lib/slice/percent_encoding.h \ +src/core/lib/slice/slice.c \ +src/core/lib/slice/slice_buffer.c \ +src/core/lib/slice/slice_hash_table.c \ +src/core/lib/slice/slice_hash_table.h \ +src/core/lib/slice/slice_intern.c \ +src/core/lib/slice/slice_internal.h \ +src/core/lib/slice/slice_string_helpers.c \ +src/core/lib/slice/slice_string_helpers.h \ +src/core/lib/surface/alarm.c \ +src/core/lib/surface/api_trace.c \ +src/core/lib/surface/api_trace.h \ +src/core/lib/surface/byte_buffer.c \ +src/core/lib/surface/byte_buffer_reader.c \ +src/core/lib/surface/call.c \ +src/core/lib/surface/call.h \ +src/core/lib/surface/call_details.c \ +src/core/lib/surface/call_log_batch.c \ +src/core/lib/surface/call_test_only.h \ +src/core/lib/surface/channel.c \ +src/core/lib/surface/channel.h \ +src/core/lib/surface/channel_init.c \ +src/core/lib/surface/channel_init.h \ +src/core/lib/surface/channel_ping.c \ +src/core/lib/surface/channel_stack_type.c \ +src/core/lib/surface/channel_stack_type.h \ +src/core/lib/surface/completion_queue.c \ +src/core/lib/surface/completion_queue.h \ +src/core/lib/surface/completion_queue_factory.c \ +src/core/lib/surface/completion_queue_factory.h \ +src/core/lib/surface/event_string.c \ +src/core/lib/surface/event_string.h \ +src/core/lib/surface/init.h \ +src/core/lib/surface/lame_client.c \ +src/core/lib/surface/lame_client.h \ +src/core/lib/surface/metadata_array.c \ +src/core/lib/surface/server.c \ +src/core/lib/surface/server.h \ +src/core/lib/surface/validate_metadata.c \ +src/core/lib/surface/validate_metadata.h \ +src/core/lib/surface/version.c \ +src/core/lib/transport/bdp_estimator.c \ +src/core/lib/transport/bdp_estimator.h \ +src/core/lib/transport/byte_stream.c \ +src/core/lib/transport/byte_stream.h \ +src/core/lib/transport/connectivity_state.c \ +src/core/lib/transport/connectivity_state.h \ +src/core/lib/transport/error_utils.c \ +src/core/lib/transport/error_utils.h \ +src/core/lib/transport/http2_errors.h \ +src/core/lib/transport/metadata.c \ +src/core/lib/transport/metadata.h \ +src/core/lib/transport/metadata_batch.c \ +src/core/lib/transport/metadata_batch.h \ +src/core/lib/transport/pid_controller.c \ +src/core/lib/transport/pid_controller.h \ +src/core/lib/transport/service_config.c \ +src/core/lib/transport/service_config.h \ +src/core/lib/transport/static_metadata.c \ +src/core/lib/transport/static_metadata.h \ +src/core/lib/transport/status_conversion.c \ +src/core/lib/transport/status_conversion.h \ +src/core/lib/transport/timeout_encoding.c \ +src/core/lib/transport/timeout_encoding.h \ +src/core/lib/transport/transport.c \ +src/core/lib/transport/transport.h \ +src/core/lib/transport/transport_impl.h \ +src/core/lib/transport/transport_op_string.c \ src/cpp/README.md \ src/cpp/client/channel_cc.cc \ src/cpp/client/client_context.cc \ @@ -942,7 +1188,14 @@ src/cpp/util/byte_buffer_cc.cc \ src/cpp/util/slice_cc.cc \ src/cpp/util/status.cc \ src/cpp/util/string_ref.cc \ -src/cpp/util/time_cc.cc +src/cpp/util/time_cc.cc \ +third_party/nanopb/pb.h \ +third_party/nanopb/pb_common.c \ +third_party/nanopb/pb_common.h \ +third_party/nanopb/pb_decode.c \ +third_party/nanopb/pb_decode.h \ +third_party/nanopb/pb_encode.c \ +third_party/nanopb/pb_encode.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index 272bb4cebf..e6ca9cb845 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -822,7 +822,6 @@ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/propagation_bits.h \ include/grpc/impl/codegen/slice.h \ -include/grpc/impl/codegen/slice.h \ include/grpc/impl/codegen/status.h \ include/grpc/impl/codegen/sync.h \ include/grpc/impl/codegen/sync.h \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index a15b624f34..a9343499e7 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -822,7 +822,6 @@ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/propagation_bits.h \ include/grpc/impl/codegen/slice.h \ -include/grpc/impl/codegen/slice.h \ include/grpc/impl/codegen/status.h \ include/grpc/impl/codegen/sync.h \ include/grpc/impl/codegen/sync.h \ @@ -1041,6 +1040,8 @@ src/core/lib/channel/http_client_filter.c \ src/core/lib/channel/http_client_filter.h \ src/core/lib/channel/http_server_filter.c \ src/core/lib/channel/http_server_filter.h \ +src/core/lib/channel/max_age_filter.c \ +src/core/lib/channel/max_age_filter.h \ src/core/lib/channel/message_size_filter.c \ src/core/lib/channel/message_size_filter.h \ src/core/lib/compression/algorithm_metadata.h \ @@ -1225,10 +1226,10 @@ src/core/lib/security/transport/security_handshaker.h \ src/core/lib/security/transport/server_auth_filter.c \ src/core/lib/security/transport/tsi_error.c \ src/core/lib/security/transport/tsi_error.h \ -src/core/lib/security/util/b64.c \ -src/core/lib/security/util/b64.h \ src/core/lib/security/util/json_util.c \ src/core/lib/security/util/json_util.h \ +src/core/lib/slice/b64.c \ +src/core/lib/slice/b64.h \ src/core/lib/slice/percent_encoding.c \ src/core/lib/slice/percent_encoding.h \ src/core/lib/slice/slice.c \ diff --git a/tools/gce/linux_performance_worker_init.sh b/tools/gce/linux_performance_worker_init.sh index 3380f3de3e..63fb0d81c5 100755 --- a/tools/gce/linux_performance_worker_init.sh +++ b/tools/gce/linux_performance_worker_init.sh @@ -166,3 +166,5 @@ echo 4096 | sudo tee /proc/sys/kernel/perf_event_mlock_kb # on benchmarks git clone -v https://github.com/brendangregg/FlameGraph ~/FlameGraph +# Install scipy and numpy for benchmarking scripts +sudo apt-get install python-scipy python-numpy diff --git a/tools/profiling/latency_profile/run_latency_profile.sh b/tools/jenkins/run_performance_profile_daily.sh index 41423fc3c1..f239fad188 100755 --- a/tools/profiling/latency_profile/run_latency_profile.sh +++ b/tools/jenkins/run_performance_profile_daily.sh @@ -30,9 +30,7 @@ set -ex -cd $(dirname $0)/../../.. - -CPUS=`python -c 'import multiprocessing; print multiprocessing.cpu_count()'` +cd $(dirname $0)/../.. # try to use pypy for generating reports # each trace dumps 7-8gig of text to disk, and processing this into a report is @@ -44,9 +42,4 @@ else PYTHON=python2.7 fi -make CONFIG=opt memory_profile_test memory_profile_client memory_profile_server -bins/opt/memory_profile_test -bq load microbenchmarks.memory memory_usage.csv - -$PYTHON tools/run_tests/run_microbenchmark.py --collect summary perf latency --bigquery_upload - +$PYTHON tools/run_tests/run_microbenchmark.py --collect summary perf latency diff --git a/tools/jenkins/run_performance_profile_hourly.sh b/tools/jenkins/run_performance_profile_hourly.sh new file mode 100755 index 0000000000..dfcc2bb116 --- /dev/null +++ b/tools/jenkins/run_performance_profile_hourly.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +set -ex + +cd $(dirname $0)/../.. + +CPUS=`python -c 'import multiprocessing; print multiprocessing.cpu_count()'` + +make CONFIG=opt memory_profile_test memory_profile_client memory_profile_server -j $CPUS +bins/opt/memory_profile_test +bq load microbenchmarks.memory memory_usage.csv + +tools/run_tests/run_microbenchmark.py --collect summary --bigquery_upload diff --git a/tools/profiling/microbenchmarks/bm_diff.py b/tools/profiling/microbenchmarks/bm_diff.py index 857d397095..2337f2b282 100755 --- a/tools/profiling/microbenchmarks/bm_diff.py +++ b/tools/profiling/microbenchmarks/bm_diff.py @@ -61,12 +61,12 @@ def min_change(pct): return lambda n, o: abs(changed_ratio(n,o)) > pct/100.0 nanos = { - 'abs_diff': 10, + 'abs_diff': 5, 'pct_diff': 10, } counter = { - 'abs_diff': 1, - 'pct_diff': 1, + 'abs_diff': 0.5, + 'pct_diff': 10, } _INTERESTING = { @@ -101,7 +101,7 @@ argp.add_argument('-t', '--track', help='Which metrics to track') argp.add_argument('-b', '--benchmarks', nargs='+', choices=_AVAILABLE_BENCHMARK_TESTS, default=['bm_cq']) argp.add_argument('-d', '--diff_base', type=str) -argp.add_argument('-r', '--repetitions', type=int, default=7) +argp.add_argument('-r', '--repetitions', type=int, default=4) argp.add_argument('-p', '--p_threshold', type=float, default=0.01) args = argp.parse_args() @@ -176,7 +176,7 @@ class Benchmark: self.samples[new][f].append(float(data[f])) def process(self): - for f in args.track: + for f in sorted(args.track): new = self.samples[True][f] old = self.samples[False][f] if not new or not old: continue @@ -185,7 +185,10 @@ class Benchmark: old_mdn = median(old) delta = new_mdn - old_mdn ratio = changed_ratio(new_mdn, old_mdn) - if p < args.p_threshold and abs(delta) > _INTERESTING[f]['abs_diff'] and abs(ratio) > _INTERESTING[f]['pct_diff']: + print '%s: new=%r old=%r new_mdn=%f old_mdn=%f delta=%f(%f:%f) ratio=%f(%f:%f) p=%f' % ( + f, new, old, new_mdn, old_mdn, delta, abs(delta), _INTERESTING[f]['abs_diff'], ratio, abs(ratio), _INTERESTING[f]['pct_diff']/100.0, p + ) + if p < args.p_threshold and abs(delta) > _INTERESTING[f]['abs_diff'] and abs(ratio) > _INTERESTING[f]['pct_diff']/100.0: self.final[f] = delta return self.final.keys() @@ -209,16 +212,19 @@ for bm in comparables: js_old_opt = json.loads(f.read()) for row in bm_json.expand_json(js_new_ctr, js_new_opt): + print row name = row['cpp_name'] if name.endswith('_mean') or name.endswith('_stddev'): continue benchmarks[name].add_sample(row, True) for row in bm_json.expand_json(js_old_ctr, js_old_opt): + print row name = row['cpp_name'] if name.endswith('_mean') or name.endswith('_stddev'): continue benchmarks[name].add_sample(row, False) really_interesting = set() for name, bm in benchmarks.items(): + print name really_interesting.update(bm.process()) fields = [f for f in args.track if f in args.track] diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index 6dfb1d6ed6..be1d8768bd 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -912,7 +912,7 @@ "language": "c", "name": "grpc_b64_test", "src": [ - "test/core/security/b64_test.c" + "test/core/slice/b64_test.c" ], "third_party": false, "type": "target" @@ -5738,6 +5738,7 @@ }, { "deps": [ + "gpr", "grpc", "grpc++_base", "grpc++_codegen_base", @@ -7144,6 +7145,8 @@ "test/core/end2end/tests/large_metadata.c", "test/core/end2end/tests/load_reporting_hook.c", "test/core/end2end/tests/max_concurrent_streams.c", + "test/core/end2end/tests/max_connection_age.c", + "test/core/end2end/tests/max_connection_idle.c", "test/core/end2end/tests/max_message_length.c", "test/core/end2end/tests/negative_deadline.c", "test/core/end2end/tests/network_status_change.c", @@ -7216,6 +7219,8 @@ "test/core/end2end/tests/large_metadata.c", "test/core/end2end/tests/load_reporting_hook.c", "test/core/end2end/tests/max_concurrent_streams.c", + "test/core/end2end/tests/max_connection_age.c", + "test/core/end2end/tests/max_connection_idle.c", "test/core/end2end/tests/max_message_length.c", "test/core/end2end/tests/negative_deadline.c", "test/core/end2end/tests/network_status_change.c", @@ -7457,7 +7462,6 @@ "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", "include/grpc/impl/codegen/sync.h", "include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_posix.h", @@ -7474,7 +7478,6 @@ "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", "include/grpc/impl/codegen/sync.h", "include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_posix.h", @@ -7511,6 +7514,7 @@ "src/core/lib/channel/handshaker_registry.h", "src/core/lib/channel/http_client_filter.h", "src/core/lib/channel/http_server_filter.h", + "src/core/lib/channel/max_age_filter.h", "src/core/lib/channel/message_size_filter.h", "src/core/lib/compression/algorithm_metadata.h", "src/core/lib/compression/message_compress.h", @@ -7577,6 +7581,7 @@ "src/core/lib/json/json_common.h", "src/core/lib/json/json_reader.h", "src/core/lib/json/json_writer.h", + "src/core/lib/slice/b64.h", "src/core/lib/slice/percent_encoding.h", "src/core/lib/slice/slice_hash_table.h", "src/core/lib/slice/slice_internal.h", @@ -7646,6 +7651,8 @@ "src/core/lib/channel/http_client_filter.h", "src/core/lib/channel/http_server_filter.c", "src/core/lib/channel/http_server_filter.h", + "src/core/lib/channel/max_age_filter.c", + "src/core/lib/channel/max_age_filter.h", "src/core/lib/channel/message_size_filter.c", "src/core/lib/channel/message_size_filter.h", "src/core/lib/compression/algorithm_metadata.h", @@ -7786,7 +7793,8 @@ "src/core/lib/json/json_string.c", "src/core/lib/json/json_writer.c", "src/core/lib/json/json_writer.h", - "src/core/lib/security/util/b64.c", + "src/core/lib/slice/b64.c", + "src/core/lib/slice/b64.h", "src/core/lib/slice/percent_encoding.c", "src/core/lib/slice/percent_encoding.h", "src/core/lib/slice/slice.c", @@ -7942,6 +7950,7 @@ "include/grpc/impl/codegen/exec_ctx_fwd.h", "include/grpc/impl/codegen/grpc_types.h", "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/slice.h", "include/grpc/impl/codegen/status.h" ], "is_filegroup": true, @@ -7954,6 +7963,7 @@ "include/grpc/impl/codegen/exec_ctx_fwd.h", "include/grpc/impl/codegen/grpc_types.h", "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/slice.h", "include/grpc/impl/codegen/status.h" ], "third_party": false, @@ -7993,6 +8003,7 @@ "gpr", "grpc_base", "grpc_client_channel", + "grpc_secure", "nanopb" ], "headers": [ @@ -8152,7 +8163,6 @@ "src/core/lib/security/transport/security_connector.h", "src/core/lib/security/transport/security_handshaker.h", "src/core/lib/security/transport/tsi_error.h", - "src/core/lib/security/util/b64.h", "src/core/lib/security/util/json_util.h" ], "is_filegroup": true, @@ -8200,8 +8210,6 @@ "src/core/lib/security/transport/server_auth_filter.c", "src/core/lib/security/transport/tsi_error.c", "src/core/lib/security/transport/tsi_error.h", - "src/core/lib/security/util/b64.c", - "src/core/lib/security/util/b64.h", "src/core/lib/security/util/json_util.c", "src/core/lib/security/util/json_util.h", "src/core/lib/surface/init_secure.c" @@ -8362,6 +8370,7 @@ "deps": [ "gpr", "grpc_base", + "grpc_client_channel", "grpc_transport_chttp2" ], "headers": [ @@ -8541,7 +8550,10 @@ }, { "deps": [ - "grpc++_codegen_base" + "gpr", + "grpc++_codegen_base", + "grpc_base", + "nanopb" ], "headers": [ "include/grpc++/alarm.h", diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json index fc2aba0332..f2228a9e92 100644 --- a/tools/run_tests/generated/tests.json +++ b/tools/run_tests/generated/tests.json @@ -6304,6 +6304,54 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_connection_idle" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_census_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -7456,6 +7504,54 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_connection_idle" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_compress_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -8581,6 +8677,52 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_connection_idle" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -9639,6 +9781,29 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -10745,6 +10910,54 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_connection_idle" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -11787,6 +12000,44 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_connection_idle" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -12824,6 +13075,54 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_connection_idle" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -13978,6 +14277,54 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_http_proxy_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_connection_idle" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_http_proxy_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -15153,6 +15500,54 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_load_reporting_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_connection_idle" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_load_reporting_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -16330,6 +16725,54 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_connection_idle" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -17410,6 +17853,30 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -18466,6 +18933,30 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -19522,6 +20013,30 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -20602,6 +21117,32 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [ + "msan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -21745,6 +22286,54 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_connection_idle" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -22897,6 +23486,54 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_connection_idle" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -23954,6 +24591,30 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -25032,6 +25693,52 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_connection_idle" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -26161,6 +26868,54 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_connection_idle" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -27290,6 +28045,54 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_connection_idle" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -28348,6 +29151,29 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -29431,6 +30257,54 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_connection_idle" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -30454,6 +31328,44 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_connection_idle" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -31468,6 +32380,54 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_connection_idle" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -32598,6 +33558,54 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_http_proxy_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_connection_idle" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_http_proxy_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -33750,6 +34758,54 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_load_reporting_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_connection_idle" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_load_reporting_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -34783,6 +35839,30 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_proxy_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -35815,6 +36895,30 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -36847,6 +37951,30 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -37901,6 +39029,32 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [ + "msan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -38996,6 +40150,52 @@ }, { "args": [ + "max_connection_age" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_uds_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_connection_idle" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_uds_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ "max_message_length" ], "ci_platforms": [ @@ -39678,6 +40878,31 @@ { "args": [ "--scenarios_json", + "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_client_unary_1channel_64wide_128Breq_8MBresp_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 8388608, \"req_size\": 128}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}" + ], + "boringssl": true, + "ci_platforms": [ + "linux" + ], + "cpu_cost": "capacity", + "defaults": "boringssl", + "exclude_configs": [ + "tsan", + "asan" + ], + "excluded_poll_engines": [], + "flaky": false, + "language": "c++", + "name": "json_run_localhost", + "platforms": [ + "linux" + ], + "shortname": "json_run_localhost:cpp_protobuf_async_client_unary_1channel_64wide_128Breq_8MBresp_secure", + "timeout_seconds": 360 + }, + { + "args": [ + "--scenarios_json", "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_client_sync_server_streaming_qps_unconstrained_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"server_config\": {\"async_server_threads\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"SYNC_SERVER\"}, \"num_servers\": 1, \"num_clients\": 0, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}" ], "boringssl": true, @@ -40057,6 +41282,31 @@ { "args": [ "--scenarios_json", + "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_client_unary_1channel_64wide_128Breq_8MBresp_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 8388608, \"req_size\": 128}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}" + ], + "boringssl": true, + "ci_platforms": [ + "linux" + ], + "cpu_cost": "capacity", + "defaults": "boringssl", + "exclude_configs": [ + "tsan", + "asan" + ], + "excluded_poll_engines": [], + "flaky": false, + "language": "c++", + "name": "json_run_localhost", + "platforms": [ + "linux" + ], + "shortname": "json_run_localhost:cpp_protobuf_async_client_unary_1channel_64wide_128Breq_8MBresp_insecure", + "timeout_seconds": 360 + }, + { + "args": [ + "--scenarios_json", "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_client_sync_server_streaming_qps_unconstrained_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"server_config\": {\"async_server_threads\": 0, \"security_params\": null, \"server_type\": \"SYNC_SERVER\"}, \"num_servers\": 1, \"num_clients\": 0, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}" ], "boringssl": true, @@ -40508,6 +41758,43 @@ { "args": [ "--scenarios_json", + "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_client_unary_1channel_64wide_128Breq_8MBresp_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 8388608, \"req_size\": 128}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}" + ], + "boringssl": true, + "ci_platforms": [ + "linux" + ], + "cpu_cost": "capacity", + "defaults": "boringssl", + "exclude_configs": [ + "asan-noleaks", + "asan-trace-cmp", + "basicprof", + "counters", + "dbg", + "gcov", + "helgrind", + "lto", + "memcheck", + "msan", + "mutrace", + "opt", + "stapprof", + "ubsan" + ], + "excluded_poll_engines": [], + "flaky": false, + "language": "c++", + "name": "json_run_localhost", + "platforms": [ + "linux" + ], + "shortname": "json_run_localhost:cpp_protobuf_async_client_unary_1channel_64wide_128Breq_8MBresp_secure_low_thread_count", + "timeout_seconds": 360 + }, + { + "args": [ + "--scenarios_json", "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_client_sync_server_streaming_qps_unconstrained_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"server_config\": {\"async_server_threads\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"SYNC_SERVER\"}, \"num_servers\": 1, \"num_clients\": 0, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 10, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}" ], "boringssl": true, @@ -41067,6 +42354,43 @@ { "args": [ "--scenarios_json", + "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_client_unary_1channel_64wide_128Breq_8MBresp_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 1, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 8388608, \"req_size\": 128}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}" + ], + "boringssl": true, + "ci_platforms": [ + "linux" + ], + "cpu_cost": "capacity", + "defaults": "boringssl", + "exclude_configs": [ + "asan-noleaks", + "asan-trace-cmp", + "basicprof", + "counters", + "dbg", + "gcov", + "helgrind", + "lto", + "memcheck", + "msan", + "mutrace", + "opt", + "stapprof", + "ubsan" + ], + "excluded_poll_engines": [], + "flaky": false, + "language": "c++", + "name": "json_run_localhost", + "platforms": [ + "linux" + ], + "shortname": "json_run_localhost:cpp_protobuf_async_client_unary_1channel_64wide_128Breq_8MBresp_insecure_low_thread_count", + "timeout_seconds": 360 + }, + { + "args": [ + "--scenarios_json", "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_client_sync_server_streaming_qps_unconstrained_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"server_config\": {\"async_server_threads\": 0, \"security_params\": null, \"server_type\": \"SYNC_SERVER\"}, \"num_servers\": 1, \"num_clients\": 0, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 10, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}" ], "boringssl": true, @@ -148098,6 +149422,29 @@ }, { "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/clusterfuzz-testcase-5417405008314368" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/crash-0f4b135c0242669ce425d2662168e9440f8a628d" ], "ci_platforms": [ diff --git a/tools/run_tests/helper_scripts/post_tests_php.sh b/tools/run_tests/helper_scripts/post_tests_php.sh index 23dc202322..43b665e23e 100755 --- a/tools/run_tests/helper_scripts/post_tests_php.sh +++ b/tools/run_tests/helper_scripts/post_tests_php.sh @@ -43,4 +43,4 @@ genhtml $tmp2 --output-directory $out rm $tmp2 rm $tmp1 -cp -rv $root/src/php/coverage $root/reports/php +# todo(mattkwong): generate coverage report for php and copy to reports/php diff --git a/tools/run_tests/helper_scripts/post_tests_python.sh b/tools/run_tests/helper_scripts/post_tests_python.sh new file mode 100755 index 0000000000..4f5986b3a1 --- /dev/null +++ b/tools/run_tests/helper_scripts/post_tests_python.sh @@ -0,0 +1,39 @@ +#!/bin/bash +# Copyright 2017, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +set -ex + +if [ "$CONFIG" != "gcov" ] ; then exit ; fi + +# change to directory of Python coverage files +cd $(dirname $0)/../../../src/python/grpcio_tests/ + +coverage combine . +coverage html -i -d ./../../../reports/python diff --git a/tools/run_tests/performance/README.md b/tools/run_tests/performance/README.md new file mode 100644 index 0000000000..5fd64f6ee9 --- /dev/null +++ b/tools/run_tests/performance/README.md @@ -0,0 +1,106 @@ +# Overview of performance test suite, with steps for manual runs: + +For design of the tests, see +http://www.grpc.io/docs/guides/benchmarking.html. + +## Pre-reqs for running these manually: +In general the benchmark workers and driver build scripts expect +[linux_performance_worker_init.sh](../../gce/linux_performance_worker_init.sh) to have been ran already. + +### To run benchmarks locally: +* From the grpc repo root, start the +[run_performance_tests.py](../run_performance_tests.py) runner script. + +### On remote machines, to start the driver and workers manually: +The [run_performance_test.py](../run_performance_tests.py) top-level runner script can also +be used with remote machines, but for e.g., profiling the server, +it might be useful to run workers manually. + +1. You'll need a "driver" and separate "worker" machines. +For example, you might use one GCE "driver" machine and 3 other +GCE "worker" machines that are in the same zone. + +2. Connect to each worker machine and start up a benchmark worker with a "driver_port". + * For example, to start the grpc-go benchmark worker: + [grpc-go worker main.go](https://github.com/grpc/grpc-go/blob/master/benchmark/worker/main.go) --driver_port <driver_port> + +#### Comands to start workers in different languages: + * Note that these commands are what the top-level + [run_performance_test.py](../run_performance_tests.py) script uses to + build and run different workers through the + [build_performance.sh](./build_performance.sh) script and "run worker" + scripts (such as the [run_worker_java.sh](./run_worker_java.sh)). + +##### Running benchmark workers for C-core wrapped languages (C++, Python, C#, Node, Ruby): + * These are more simple since they all live in the main grpc repo. + +``` +$ cd <grpc_repo_root> +$ tools/run_tests/performance/build_performance.sh +$ tools/run_tests/performance/run_worker_<language>.sh +``` + + * Note that there is one "run_worker" script per language, e.g., + [run_worker_csharp.sh](./run_worker_csharp.sh) for c#. + +##### Running benchmark workers for gRPC-Java: + * You'll need the [grpc-java](https://github.com/grpc/grpc-java) repo. + +``` +$ cd <grpc-java-repo> +$ ./gradlew -PskipCodegen=true :grpc-benchmarks:installDist +$ benchmarks/build/install/grpc-benchmarks/bin/benchmark_worker --driver_port <driver_port> +``` + +##### Running benchmark workers for gRPC-Go: + * You'll need the [grpc-go repo](https://github.com/grpc/grpc-go) + +``` +$ cd <grpc-go-repo>/benchmark/worker && go install +$ # if profiling, it might be helpful to turn off inlining by building with "-gcflags=-l" +$ $GOPATH/bin/worker --driver_port <driver_port> +``` + +#### Build the driver: +* Connect to the driver machine (if using a remote driver) and from the grpc repo root: +``` +$ tools/run_tests/performance/build_performance.sh +``` + +#### Run the driver: +1. Get the 'scenario_json' relevant for the scenario to run. Note that "scenario + json" configs are generated from [scenario_config.py](./scenario_config.py). + The [driver](../../../test/cpp/qps/qps_json_driver.cc) takes a list of these configs as a json string of the form: `{scenario: <json_list_of_scenarios> }` + in its `--scenarios_json` command argument. + One quick way to get a valid json string to pass to the driver is by running + the [run_performance_tests.py](./run_performance_tests.py) locally and copying the logged scenario json command arg. + +2. From the grpc repo root: + +* Set `QPS_WORKERS` environment variable to a comma separated list of worker +machines. Note that the driver will start the "benchmark server" on the first +entry in the list, and the rest will be told to run as clients against the +benchmark server. + +Example running and profiling of go benchmark server: +``` +$ export QPS_WORKERS=<host1>:<10000>,<host2>,10000,<host3>:10000 +$ bins/opt/qps_json_driver --scenario_json='<scenario_json_scenario_config_string>' +``` + +### Example profiling commands + +While running the benchmark, a profiler can be attached to the server. + +Example to count syscalls in grpc-go server during a benchmark: +* Connect to server machine and run: +``` +$ netstat -tulpn | grep <driver_port> # to get pid of worker +$ perf stat -p <worker_pid> -e syscalls:sys_enter_write # stop after test complete +``` + +Example memory profile of grpc-go server, with `go tools pprof`: +* After a run is done on the server, see its alloc profile with: +``` +$ go tool pprof --text --alloc_space http://localhost:<pprof_port>/debug/heap +``` diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index 1870a738ca..7169c47433 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -258,6 +258,19 @@ class CXXLanguage: excluded_poll_engines = ['poll-cv']) yield _ping_pong_scenario( + 'cpp_protobuf_async_client_unary_1channel_64wide_128Breq_8MBresp_%s' % + (secstr), + rpc_type='UNARY', + client_type='ASYNC_CLIENT', + server_type='ASYNC_SERVER', + channels=1, + outstanding=64, + req_size=128, + resp_size=8*1024*1024, + secure=secure, + categories=smoketest_categories + [SCALABLE]) + + yield _ping_pong_scenario( 'cpp_protobuf_async_client_sync_server_streaming_qps_unconstrained_%s' % secstr, rpc_type='STREAMING', client_type='ASYNC_CLIENT', diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 00dd4ca605..0b4f26ca44 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -614,7 +614,10 @@ class PythonLanguage(object): return [config.build for config in self.pythons] def post_tests_steps(self): - return [] + if self.config != 'gcov': + return [] + else: + return [['tools/run_tests/helper_scripts/post_tests_python.sh']] def makefile_name(self): return 'Makefile' @@ -1270,7 +1273,9 @@ if any(language.make_options() for language in languages): print('languages with custom make options cannot be built simultaneously with other languages') sys.exit(1) else: - language_make_options = next(iter(languages)).make_options() + # Combining make options is not clean and just happens to work. It allows C/C++ and C# to build + # together, and is only used under gcov. All other configs should build languages individually. + language_make_options = list(set([make_option for lang in languages for make_option in lang.make_options()])) if args.use_docker: if not args.travis: diff --git a/tools/run_tests/sanity/check_sources_and_headers.py b/tools/run_tests/sanity/check_sources_and_headers.py index f2e0bfeb3d..42892ea69d 100755 --- a/tools/run_tests/sanity/check_sources_and_headers.py +++ b/tools/run_tests/sanity/check_sources_and_headers.py @@ -77,14 +77,14 @@ for target in js: for line in src: m = re_inc1.match(line) if m: - if not target_has_header(target, m.group(1)) and not target['is_filegroup']: + if not target_has_header(target, m.group(1)): print ( 'target %s (%s) does not name header %s as a dependency' % ( target['name'], fn, m.group(1))) errors += 1 m = re_inc2.match(line) if m: - if not target_has_header(target, 'include/' + m.group(1)) and not target['is_filegroup']: + if not target_has_header(target, 'include/' + m.group(1)): print ( 'target %s (%s) does not name header %s as a dependency' % ( target['name'], fn, m.group(1))) |