From 2c461b7cd2e7e178895cfede94fae88249913138 Mon Sep 17 00:00:00 2001 From: ctiller <10120821+ctiller@users.noreply.github.com> Date: Wed, 31 Jul 2024 04:27:31 +0000 Subject: [PATCH] Automated change: Fix sanity tests --- CMakeLists.txt | 84 ++++++++++++++++++++++++++++ build_autogenerated.yaml | 35 ++++++++++++ tools/run_tests/generated/tests.json | 44 +++++++++++++++ 3 files changed, 163 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 80051054921..a1c41b5439b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -907,12 +907,18 @@ if(gRPC_BUILD_TESTS) if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) add_dependencies(buildtests_c bm_inproc) endif() + if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) + add_dependencies(buildtests_c bm_load_balanced_call_destination) + endif() if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) add_dependencies(buildtests_c bm_metadata) endif() if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) add_dependencies(buildtests_c bm_party) endif() + if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) + add_dependencies(buildtests_c bm_picker) + endif() if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) add_dependencies(buildtests_c fd_conservation_posix_test) endif() @@ -6214,6 +6220,45 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) ) +endif() +endif() +if(gRPC_BUILD_TESTS) +if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) + + add_executable(bm_load_balanced_call_destination + test/core/client_channel/bm_load_balanced_call_destination.cc + ) + if(WIN32 AND MSVC) + if(BUILD_SHARED_LIBS) + target_compile_definitions(bm_load_balanced_call_destination + PRIVATE + "GPR_DLL_IMPORTS" + "GRPC_DLL_IMPORTS" + ) + endif() + endif() + target_compile_features(bm_load_balanced_call_destination PUBLIC cxx_std_14) + target_include_directories(bm_load_balanced_call_destination + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/include + ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} + ${_gRPC_SSL_INCLUDE_DIR} + ${_gRPC_UPB_GENERATED_DIR} + ${_gRPC_UPB_GRPC_GENERATED_DIR} + ${_gRPC_UPB_INCLUDE_DIR} + ${_gRPC_XXHASH_INCLUDE_DIR} + ${_gRPC_ZLIB_INCLUDE_DIR} + ) + + target_link_libraries(bm_load_balanced_call_destination + ${_gRPC_ALLTARGETS_LIBRARIES} + ${_gRPC_BENCHMARK_LIBRARIES} + grpc + ) + + endif() endif() if(gRPC_BUILD_TESTS) @@ -6292,6 +6337,45 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) ) +endif() +endif() +if(gRPC_BUILD_TESTS) +if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) + + add_executable(bm_picker + test/core/load_balancing/bm_picker.cc + ) + if(WIN32 AND MSVC) + if(BUILD_SHARED_LIBS) + target_compile_definitions(bm_picker + PRIVATE + "GPR_DLL_IMPORTS" + "GRPC_DLL_IMPORTS" + ) + endif() + endif() + target_compile_features(bm_picker PUBLIC cxx_std_14) + target_include_directories(bm_picker + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/include + ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} + ${_gRPC_SSL_INCLUDE_DIR} + ${_gRPC_UPB_GENERATED_DIR} + ${_gRPC_UPB_GRPC_GENERATED_DIR} + ${_gRPC_UPB_INCLUDE_DIR} + ${_gRPC_XXHASH_INCLUDE_DIR} + ${_gRPC_ZLIB_INCLUDE_DIR} + ) + + target_link_libraries(bm_picker + ${_gRPC_ALLTARGETS_LIBRARIES} + ${_gRPC_BENCHMARK_LIBRARIES} + grpc + ) + + endif() endif() if(gRPC_BUILD_TESTS) diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index f835595b41b..16205e03169 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -5279,6 +5279,24 @@ targets: - linux - posix uses_polling: false +- name: bm_load_balanced_call_destination + build: test + language: c + headers: + - test/core/transport/call_spine_benchmarks.h + src: + - test/core/client_channel/bm_load_balanced_call_destination.cc + deps: + - benchmark + - grpc + args: + - --benchmark_min_time=0.001s + benchmark: true + defaults: benchmark + platforms: + - linux + - posix + uses_polling: false - name: bm_metadata build: test language: c @@ -5314,6 +5332,23 @@ targets: - linux - posix uses_polling: false +- name: bm_picker + build: test + language: c + headers: [] + src: + - test/core/load_balancing/bm_picker.cc + deps: + - benchmark + - grpc + args: + - --benchmark_min_time=0.001s + benchmark: true + defaults: benchmark + platforms: + - linux + - posix + uses_polling: false - name: fd_conservation_posix_test build: test language: c diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json index 0454b996991..e69d28d8ef1 100644 --- a/tools/run_tests/generated/tests.json +++ b/tools/run_tests/generated/tests.json @@ -155,6 +155,28 @@ ], "uses_polling": false }, + { + "args": [ + "--benchmark_min_time=0.001s" + ], + "benchmark": true, + "ci_platforms": [ + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "gtest": false, + "language": "c", + "name": "bm_load_balanced_call_destination", + "platforms": [ + "linux", + "posix" + ], + "uses_polling": false + }, { "args": [ "--benchmark_min_time=0.001s" @@ -199,6 +221,28 @@ ], "uses_polling": false }, + { + "args": [ + "--benchmark_min_time=0.001s" + ], + "benchmark": true, + "ci_platforms": [ + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "gtest": false, + "language": "c", + "name": "bm_picker", + "platforms": [ + "linux", + "posix" + ], + "uses_polling": false + }, { "args": [], "benchmark": false,