|
|
|
@ -14,7 +14,7 @@ |
|
|
|
|
|
|
|
|
|
licenses(["notice"]) # Apache v2 |
|
|
|
|
|
|
|
|
|
load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package") |
|
|
|
|
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_package") |
|
|
|
|
|
|
|
|
|
grpc_package(name = "test/cpp/microbenchmarks") |
|
|
|
|
|
|
|
|
@ -48,75 +48,98 @@ grpc_cc_library( |
|
|
|
|
], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
grpc_cc_binary( |
|
|
|
|
name = "bm_closure", |
|
|
|
|
# Need a secure version of helpers to benchmark opencensus |
|
|
|
|
grpc_cc_library( |
|
|
|
|
name = "helpers_secure", |
|
|
|
|
testonly = 1, |
|
|
|
|
srcs = ["helpers.cc"], |
|
|
|
|
hdrs = [ |
|
|
|
|
"fullstack_context_mutators.h", |
|
|
|
|
"fullstack_fixtures.h", |
|
|
|
|
"helpers.h", |
|
|
|
|
], |
|
|
|
|
external_deps = [ |
|
|
|
|
"benchmark", |
|
|
|
|
], |
|
|
|
|
tags = ["no_windows"], |
|
|
|
|
deps = [ |
|
|
|
|
"//:grpc++", |
|
|
|
|
"//src/proto/grpc/testing:echo_proto", |
|
|
|
|
"//test/core/util:grpc_test_util", |
|
|
|
|
"//test/cpp/util:test_config", |
|
|
|
|
], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
grpc_cc_test( |
|
|
|
|
name = "bm_closure", |
|
|
|
|
srcs = ["bm_closure.cc"], |
|
|
|
|
tags = ["no_windows"], |
|
|
|
|
deps = [":helpers"], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
grpc_cc_binary( |
|
|
|
|
grpc_cc_test( |
|
|
|
|
name = "bm_alarm", |
|
|
|
|
testonly = 1, |
|
|
|
|
srcs = ["bm_alarm.cc"], |
|
|
|
|
tags = ["no_windows"], |
|
|
|
|
deps = [":helpers"], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
grpc_cc_binary( |
|
|
|
|
grpc_cc_test( |
|
|
|
|
name = "bm_arena", |
|
|
|
|
testonly = 1, |
|
|
|
|
size = "enormous", |
|
|
|
|
srcs = ["bm_arena.cc"], |
|
|
|
|
tags = ["no_windows"], |
|
|
|
|
tags = [ |
|
|
|
|
"no_windows", |
|
|
|
|
"notsan", |
|
|
|
|
], |
|
|
|
|
uses_polling = False, |
|
|
|
|
deps = [":helpers"], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
grpc_cc_binary( |
|
|
|
|
grpc_cc_test( |
|
|
|
|
name = "bm_byte_buffer", |
|
|
|
|
testonly = 1, |
|
|
|
|
srcs = ["bm_byte_buffer.cc"], |
|
|
|
|
tags = ["no_windows"], |
|
|
|
|
uses_polling = False, |
|
|
|
|
deps = [":helpers"], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
grpc_cc_binary( |
|
|
|
|
grpc_cc_test( |
|
|
|
|
name = "bm_channel", |
|
|
|
|
testonly = 1, |
|
|
|
|
srcs = ["bm_channel.cc"], |
|
|
|
|
tags = ["no_windows"], |
|
|
|
|
uses_polling = False, |
|
|
|
|
deps = [":helpers"], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
grpc_cc_binary( |
|
|
|
|
grpc_cc_test( |
|
|
|
|
name = "bm_call_create", |
|
|
|
|
testonly = 1, |
|
|
|
|
srcs = ["bm_call_create.cc"], |
|
|
|
|
tags = ["no_windows"], |
|
|
|
|
uses_polling = False, |
|
|
|
|
deps = [":helpers"], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
grpc_cc_binary( |
|
|
|
|
grpc_cc_test( |
|
|
|
|
name = "bm_cq", |
|
|
|
|
testonly = 1, |
|
|
|
|
srcs = ["bm_cq.cc"], |
|
|
|
|
tags = ["no_windows"], |
|
|
|
|
deps = [":helpers"], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
grpc_cc_binary( |
|
|
|
|
grpc_cc_test( |
|
|
|
|
name = "bm_cq_multiple_threads", |
|
|
|
|
testonly = 1, |
|
|
|
|
srcs = ["bm_cq_multiple_threads.cc"], |
|
|
|
|
tags = ["no_windows"], |
|
|
|
|
uses_polling = False, |
|
|
|
|
deps = [":helpers"], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
grpc_cc_binary( |
|
|
|
|
grpc_cc_test( |
|
|
|
|
name = "bm_error", |
|
|
|
|
testonly = 1, |
|
|
|
|
srcs = ["bm_error.cc"], |
|
|
|
|
tags = ["no_windows"], |
|
|
|
|
uses_polling = False, |
|
|
|
|
deps = [":helpers"], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
@ -130,9 +153,9 @@ grpc_cc_library( |
|
|
|
|
deps = [":helpers"], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
grpc_cc_binary( |
|
|
|
|
grpc_cc_test( |
|
|
|
|
name = "bm_fullstack_streaming_ping_pong", |
|
|
|
|
testonly = 1, |
|
|
|
|
size = "large", |
|
|
|
|
srcs = [ |
|
|
|
|
"bm_fullstack_streaming_ping_pong.cc", |
|
|
|
|
], |
|
|
|
@ -152,9 +175,8 @@ grpc_cc_library( |
|
|
|
|
deps = [":helpers"], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
grpc_cc_binary( |
|
|
|
|
grpc_cc_test( |
|
|
|
|
name = "bm_fullstack_streaming_pump", |
|
|
|
|
testonly = 1, |
|
|
|
|
srcs = [ |
|
|
|
|
"bm_fullstack_streaming_pump.cc", |
|
|
|
|
], |
|
|
|
@ -165,13 +187,16 @@ grpc_cc_binary( |
|
|
|
|
deps = [":fullstack_streaming_pump_h"], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
grpc_cc_binary( |
|
|
|
|
grpc_cc_test( |
|
|
|
|
name = "bm_fullstack_trickle", |
|
|
|
|
testonly = 1, |
|
|
|
|
size = "enormous", |
|
|
|
|
srcs = ["bm_fullstack_trickle.cc"], |
|
|
|
|
tags = [ |
|
|
|
|
"no_mac", # to emulate "excluded_poll_engines: poll" |
|
|
|
|
"no_windows", |
|
|
|
|
"noasan", |
|
|
|
|
"nomsan", |
|
|
|
|
"notsan", |
|
|
|
|
], |
|
|
|
|
deps = [":helpers"], |
|
|
|
|
) |
|
|
|
@ -185,9 +210,8 @@ grpc_cc_library( |
|
|
|
|
deps = [":helpers"], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
grpc_cc_binary( |
|
|
|
|
grpc_cc_test( |
|
|
|
|
name = "bm_fullstack_unary_ping_pong", |
|
|
|
|
testonly = 1, |
|
|
|
|
srcs = [ |
|
|
|
|
"bm_fullstack_unary_ping_pong.cc", |
|
|
|
|
], |
|
|
|
@ -198,47 +222,50 @@ grpc_cc_binary( |
|
|
|
|
deps = [":fullstack_unary_ping_pong_h"], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
grpc_cc_binary( |
|
|
|
|
grpc_cc_test( |
|
|
|
|
name = "bm_metadata", |
|
|
|
|
testonly = 1, |
|
|
|
|
srcs = ["bm_metadata.cc"], |
|
|
|
|
tags = ["no_windows"], |
|
|
|
|
uses_polling = False, |
|
|
|
|
deps = [":helpers"], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
grpc_cc_binary( |
|
|
|
|
grpc_cc_test( |
|
|
|
|
name = "bm_chttp2_hpack", |
|
|
|
|
testonly = 1, |
|
|
|
|
srcs = ["bm_chttp2_hpack.cc"], |
|
|
|
|
tags = ["no_windows"], |
|
|
|
|
uses_polling = False, |
|
|
|
|
deps = [":helpers"], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
grpc_cc_binary( |
|
|
|
|
grpc_cc_test( |
|
|
|
|
name = "bm_opencensus_plugin", |
|
|
|
|
testonly = 1, |
|
|
|
|
srcs = ["bm_opencensus_plugin.cc"], |
|
|
|
|
language = "C++", |
|
|
|
|
deps = [ |
|
|
|
|
":helpers", |
|
|
|
|
":helpers_secure", |
|
|
|
|
"//:grpc_opencensus_plugin", |
|
|
|
|
"//src/proto/grpc/testing:echo_proto", |
|
|
|
|
], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
grpc_cc_binary( |
|
|
|
|
grpc_cc_test( |
|
|
|
|
name = "bm_timer", |
|
|
|
|
testonly = 1, |
|
|
|
|
srcs = ["bm_timer.cc"], |
|
|
|
|
tags = ["no_windows"], |
|
|
|
|
uses_polling = False, |
|
|
|
|
deps = [":helpers"], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
grpc_cc_binary( |
|
|
|
|
grpc_cc_test( |
|
|
|
|
name = "bm_threadpool", |
|
|
|
|
testonly = 1, |
|
|
|
|
size = "enormous", |
|
|
|
|
srcs = ["bm_threadpool.cc"], |
|
|
|
|
tags = ["no_windows"], |
|
|
|
|
tags = [ |
|
|
|
|
"no_windows", |
|
|
|
|
"notsan", |
|
|
|
|
], |
|
|
|
|
uses_polling = False, |
|
|
|
|
deps = [":helpers"], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
@ -253,7 +280,7 @@ grpc_cc_library( |
|
|
|
|
deps = [ |
|
|
|
|
":helpers", |
|
|
|
|
"//src/proto/grpc/testing:echo_proto", |
|
|
|
|
"//test/cpp/util:test_util", |
|
|
|
|
"//test/cpp/util:test_util_unsecure", |
|
|
|
|
], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
@ -269,9 +296,8 @@ grpc_cc_library( |
|
|
|
|
], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
grpc_cc_binary( |
|
|
|
|
grpc_cc_test( |
|
|
|
|
name = "bm_callback_unary_ping_pong", |
|
|
|
|
testonly = 1, |
|
|
|
|
srcs = [ |
|
|
|
|
"bm_callback_unary_ping_pong.cc", |
|
|
|
|
], |
|
|
|
@ -291,12 +317,15 @@ grpc_cc_library( |
|
|
|
|
], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
grpc_cc_binary( |
|
|
|
|
grpc_cc_test( |
|
|
|
|
name = "bm_callback_streaming_ping_pong", |
|
|
|
|
testonly = 1, |
|
|
|
|
size = "large", |
|
|
|
|
srcs = [ |
|
|
|
|
"bm_callback_streaming_ping_pong.cc", |
|
|
|
|
], |
|
|
|
|
tags = ["no_windows"], |
|
|
|
|
tags = [ |
|
|
|
|
"no_mac", # to emulate "excluded_poll_engines: poll" |
|
|
|
|
"no_windows", |
|
|
|
|
], |
|
|
|
|
deps = [":callback_streaming_ping_pong_h"], |
|
|
|
|
) |
|
|
|
|