diff --git a/src/core/lib/experiments/experiments.cc b/src/core/lib/experiments/experiments.cc index aa9c88cd93d..9eee1458bec 100644 --- a/src/core/lib/experiments/experiments.cc +++ b/src/core/lib/experiments/experiments.cc @@ -14,322 +14,610 @@ // Auto generated by tools/codegen/core/gen_experiments.py -#include +#include "src/core/lib/experiments/experiments.h" #include -#include "src/core/lib/experiments/experiments.h" +#include #ifndef GRPC_EXPERIMENTS_ARE_FINAL #if defined(GRPC_CFSTREAM) namespace { -const char* const description_call_status_override_on_cancellation = "Avoid overriding call status of successfully finished calls if it races with cancellation."; -const char* const additional_constraints_call_status_override_on_cancellation = "{}"; +const char* const description_call_status_override_on_cancellation = + "Avoid overriding call status of successfully finished calls if it races " + "with cancellation."; +const char* const additional_constraints_call_status_override_on_cancellation = + "{}"; const char* const description_call_v3 = "Promise-based call version 3."; const char* const additional_constraints_call_v3 = "{}"; -const char* const description_canary_client_privacy = "If set, canary client privacy"; +const char* const description_canary_client_privacy = + "If set, canary client privacy"; const char* const additional_constraints_canary_client_privacy = "{}"; const char* const description_client_privacy = "If set, client privacy"; const char* const additional_constraints_client_privacy = "{}"; -const char* const description_event_engine_client = "Use EventEngine clients instead of iomgr's grpc_tcp_client"; +const char* const description_event_engine_client = + "Use EventEngine clients instead of iomgr's grpc_tcp_client"; const char* const additional_constraints_event_engine_client = "{}"; -const char* const description_event_engine_dns = "If set, use EventEngine DNSResolver for client channel resolution"; +const char* const description_event_engine_dns = + "If set, use EventEngine DNSResolver for client channel resolution"; const char* const additional_constraints_event_engine_dns = "{}"; -const char* const description_event_engine_listener = "Use EventEngine listeners instead of iomgr's grpc_tcp_server"; +const char* const description_event_engine_listener = + "Use EventEngine listeners instead of iomgr's grpc_tcp_server"; const char* const additional_constraints_event_engine_listener = "{}"; -const char* const description_free_large_allocator = "If set, return all free bytes from a \042big\042 allocator"; +const char* const description_free_large_allocator = + "If set, return all free bytes from a \042big\042 allocator"; const char* const additional_constraints_free_large_allocator = "{}"; -const char* const description_keepalive_fix = "Allows overriding keepalive_permit_without_calls. Refer https://github.com/grpc/grpc/pull/33428 for more information."; +const char* const description_keepalive_fix = + "Allows overriding keepalive_permit_without_calls. Refer " + "https://github.com/grpc/grpc/pull/33428 for more information."; const char* const additional_constraints_keepalive_fix = "{}"; -const char* const description_keepalive_server_fix = "Allows overriding keepalive_permit_without_calls for servers. Refer https://github.com/grpc/grpc/pull/33917 for more information."; +const char* const description_keepalive_server_fix = + "Allows overriding keepalive_permit_without_calls for servers. Refer " + "https://github.com/grpc/grpc/pull/33917 for more information."; const char* const additional_constraints_keepalive_server_fix = "{}"; -const char* const description_monitoring_experiment = "Placeholder experiment to prove/disprove our monitoring is working"; +const char* const description_monitoring_experiment = + "Placeholder experiment to prove/disprove our monitoring is working"; const char* const additional_constraints_monitoring_experiment = "{}"; -const char* const description_multiping = "Allow more than one ping to be in flight at a time by default."; +const char* const description_multiping = + "Allow more than one ping to be in flight at a time by default."; const char* const additional_constraints_multiping = "{}"; -const char* const description_peer_state_based_framing = "If set, the max sizes of frames sent to lower layers is controlled based on the peer's memory pressure which is reflected in its max http2 frame size."; +const char* const description_peer_state_based_framing = + "If set, the max sizes of frames sent to lower layers is controlled based " + "on the peer's memory pressure which is reflected in its max http2 frame " + "size."; const char* const additional_constraints_peer_state_based_framing = "{}"; -const char* const description_pending_queue_cap = "In the sync & async apis (but not the callback api), cap the number of received but unrequested requests in the server for each call type. A received message is one that was read from the wire on the server. A requested message is one explicitly requested by the application using grpc_server_request_call or grpc_server_request_registered_call (or their wrappers in the C++ API)."; +const char* const description_pending_queue_cap = + "In the sync & async apis (but not the callback api), cap the number of " + "received but unrequested requests in the server for each call type. A " + "received message is one that was read from the wire on the server. A " + "requested message is one explicitly requested by the application using " + "grpc_server_request_call or grpc_server_request_registered_call (or their " + "wrappers in the C++ API)."; const char* const additional_constraints_pending_queue_cap = "{}"; -const char* const description_pick_first_new = "New pick_first impl with memory reduction."; +const char* const description_pick_first_new = + "New pick_first impl with memory reduction."; const char* const additional_constraints_pick_first_new = "{}"; -const char* const description_promise_based_client_call = "If set, use the new gRPC promise based call code when it's appropriate (ie when all filters in a stack are promise based)"; +const char* const description_promise_based_client_call = + "If set, use the new gRPC promise based call code when it's appropriate " + "(ie when all filters in a stack are promise based)"; const char* const additional_constraints_promise_based_client_call = "{}"; -const uint8_t required_experiments_promise_based_client_call[] = {static_cast(grpc_core::kExperimentIdEventEngineClient),static_cast(grpc_core::kExperimentIdEventEngineListener)}; -const char* const description_promise_based_server_call = "If set, use the new gRPC promise based call code when it's appropriate (ie when all filters in a stack are promise based)"; +const uint8_t required_experiments_promise_based_client_call[] = { + static_cast(grpc_core::kExperimentIdEventEngineClient), + static_cast(grpc_core::kExperimentIdEventEngineListener)}; +const char* const description_promise_based_server_call = + "If set, use the new gRPC promise based call code when it's appropriate " + "(ie when all filters in a stack are promise based)"; const char* const additional_constraints_promise_based_server_call = "{}"; -const char* const description_chaotic_good = "If set, enable the chaotic good load transport (this is mostly here for testing)"; +const char* const description_chaotic_good = + "If set, enable the chaotic good load transport (this is mostly here for " + "testing)"; const char* const additional_constraints_chaotic_good = "{}"; -const uint8_t required_experiments_chaotic_good[] = {static_cast(grpc_core::kExperimentIdPromiseBasedClientCall),static_cast(grpc_core::kExperimentIdPromiseBasedServerCall)}; -const char* const description_promise_based_inproc_transport = "Use promises for the in-process transport."; +const uint8_t required_experiments_chaotic_good[] = { + static_cast(grpc_core::kExperimentIdPromiseBasedClientCall), + static_cast(grpc_core::kExperimentIdPromiseBasedServerCall)}; +const char* const description_promise_based_inproc_transport = + "Use promises for the in-process transport."; const char* const additional_constraints_promise_based_inproc_transport = "{}"; -const uint8_t required_experiments_promise_based_inproc_transport[] = {static_cast(grpc_core::kExperimentIdPromiseBasedClientCall),static_cast(grpc_core::kExperimentIdPromiseBasedServerCall)}; -const char* const description_rstpit = "On RST_STREAM on a server, reduce MAX_CONCURRENT_STREAMS for a short duration"; +const uint8_t required_experiments_promise_based_inproc_transport[] = { + static_cast(grpc_core::kExperimentIdPromiseBasedClientCall), + static_cast(grpc_core::kExperimentIdPromiseBasedServerCall)}; +const char* const description_rstpit = + "On RST_STREAM on a server, reduce MAX_CONCURRENT_STREAMS for a short " + "duration"; const char* const additional_constraints_rstpit = "{}"; -const char* const description_schedule_cancellation_over_write = "Allow cancellation op to be scheduled over a write"; -const char* const additional_constraints_schedule_cancellation_over_write = "{}"; +const char* const description_schedule_cancellation_over_write = + "Allow cancellation op to be scheduled over a write"; +const char* const additional_constraints_schedule_cancellation_over_write = + "{}"; const char* const description_server_privacy = "If set, server privacy"; const char* const additional_constraints_server_privacy = "{}"; -const char* const description_tcp_frame_size_tuning = "If set, enables TCP to use RPC size estimation made by higher layers. TCP would not indicate completion of a read operation until a specified number of bytes have been read over the socket. Buffers are also allocated according to estimated RPC sizes."; +const char* const description_tcp_frame_size_tuning = + "If set, enables TCP to use RPC size estimation made by higher layers. TCP " + "would not indicate completion of a read operation until a specified " + "number of bytes have been read over the socket. Buffers are also " + "allocated according to estimated RPC sizes."; const char* const additional_constraints_tcp_frame_size_tuning = "{}"; -const char* const description_tcp_rcv_lowat = "Use SO_RCVLOWAT to avoid wakeups on the read path."; +const char* const description_tcp_rcv_lowat = + "Use SO_RCVLOWAT to avoid wakeups on the read path."; const char* const additional_constraints_tcp_rcv_lowat = "{}"; -const char* const description_trace_record_callops = "Enables tracing of call batch initiation and completion."; +const char* const description_trace_record_callops = + "Enables tracing of call batch initiation and completion."; const char* const additional_constraints_trace_record_callops = "{}"; -const char* const description_unconstrained_max_quota_buffer_size = "Discard the cap on the max free pool size for one memory allocator"; -const char* const additional_constraints_unconstrained_max_quota_buffer_size = "{}"; -const char* const description_work_serializer_clears_time_cache = "Have the work serializer clear the time cache when it dispatches work."; -const char* const additional_constraints_work_serializer_clears_time_cache = "{}"; -const char* const description_work_serializer_dispatch = "Have the work serializer dispatch work to event engine for every callback, instead of running things inline in the first thread that successfully enqueues work."; +const char* const description_unconstrained_max_quota_buffer_size = + "Discard the cap on the max free pool size for one memory allocator"; +const char* const additional_constraints_unconstrained_max_quota_buffer_size = + "{}"; +const char* const description_work_serializer_clears_time_cache = + "Have the work serializer clear the time cache when it dispatches work."; +const char* const additional_constraints_work_serializer_clears_time_cache = + "{}"; +const char* const description_work_serializer_dispatch = + "Have the work serializer dispatch work to event engine for every " + "callback, instead of running things inline in the first thread that " + "successfully enqueues work."; const char* const additional_constraints_work_serializer_dispatch = "{}"; -const uint8_t required_experiments_work_serializer_dispatch[] = {static_cast(grpc_core::kExperimentIdEventEngineClient)}; +const uint8_t required_experiments_work_serializer_dispatch[] = { + static_cast(grpc_core::kExperimentIdEventEngineClient)}; #ifdef NDEBUG const bool kDefaultForDebugOnly = false; #else const bool kDefaultForDebugOnly = true; #endif -} +} // namespace namespace grpc_core { const ExperimentMetadata g_experiment_metadata[] = { - {"call_status_override_on_cancellation", description_call_status_override_on_cancellation, additional_constraints_call_status_override_on_cancellation, nullptr, 0, kDefaultForDebugOnly, true}, - {"call_v3", description_call_v3, additional_constraints_call_v3, nullptr, 0, false, true}, - {"canary_client_privacy", description_canary_client_privacy, additional_constraints_canary_client_privacy, nullptr, 0, false, false}, - {"client_privacy", description_client_privacy, additional_constraints_client_privacy, nullptr, 0, false, false}, - {"event_engine_client", description_event_engine_client, additional_constraints_event_engine_client, nullptr, 0, false, true}, - {"event_engine_dns", description_event_engine_dns, additional_constraints_event_engine_dns, nullptr, 0, false, false}, - {"event_engine_listener", description_event_engine_listener, additional_constraints_event_engine_listener, nullptr, 0, false, true}, - {"free_large_allocator", description_free_large_allocator, additional_constraints_free_large_allocator, nullptr, 0, false, true}, - {"keepalive_fix", description_keepalive_fix, additional_constraints_keepalive_fix, nullptr, 0, false, false}, - {"keepalive_server_fix", description_keepalive_server_fix, additional_constraints_keepalive_server_fix, nullptr, 0, false, false}, - {"monitoring_experiment", description_monitoring_experiment, additional_constraints_monitoring_experiment, nullptr, 0, true, true}, - {"multiping", description_multiping, additional_constraints_multiping, nullptr, 0, false, true}, - {"peer_state_based_framing", description_peer_state_based_framing, additional_constraints_peer_state_based_framing, nullptr, 0, false, true}, - {"pending_queue_cap", description_pending_queue_cap, additional_constraints_pending_queue_cap, nullptr, 0, true, true}, - {"pick_first_new", description_pick_first_new, additional_constraints_pick_first_new, nullptr, 0, true, true}, - {"promise_based_client_call", description_promise_based_client_call, additional_constraints_promise_based_client_call, required_experiments_promise_based_client_call, 2, false, true}, - {"promise_based_server_call", description_promise_based_server_call, additional_constraints_promise_based_server_call, nullptr, 0, false, true}, - {"chaotic_good", description_chaotic_good, additional_constraints_chaotic_good, required_experiments_chaotic_good, 2, false, true}, - {"promise_based_inproc_transport", description_promise_based_inproc_transport, additional_constraints_promise_based_inproc_transport, required_experiments_promise_based_inproc_transport, 2, false, false}, - {"rstpit", description_rstpit, additional_constraints_rstpit, nullptr, 0, false, true}, - {"schedule_cancellation_over_write", description_schedule_cancellation_over_write, additional_constraints_schedule_cancellation_over_write, nullptr, 0, false, true}, - {"server_privacy", description_server_privacy, additional_constraints_server_privacy, nullptr, 0, false, false}, - {"tcp_frame_size_tuning", description_tcp_frame_size_tuning, additional_constraints_tcp_frame_size_tuning, nullptr, 0, false, true}, - {"tcp_rcv_lowat", description_tcp_rcv_lowat, additional_constraints_tcp_rcv_lowat, nullptr, 0, false, true}, - {"trace_record_callops", description_trace_record_callops, additional_constraints_trace_record_callops, nullptr, 0, false, true}, - {"unconstrained_max_quota_buffer_size", description_unconstrained_max_quota_buffer_size, additional_constraints_unconstrained_max_quota_buffer_size, nullptr, 0, false, true}, - {"work_serializer_clears_time_cache", description_work_serializer_clears_time_cache, additional_constraints_work_serializer_clears_time_cache, nullptr, 0, true, true}, - {"work_serializer_dispatch", description_work_serializer_dispatch, additional_constraints_work_serializer_dispatch, required_experiments_work_serializer_dispatch, 1, false, true}, + {"call_status_override_on_cancellation", + description_call_status_override_on_cancellation, + additional_constraints_call_status_override_on_cancellation, nullptr, 0, + kDefaultForDebugOnly, true}, + {"call_v3", description_call_v3, additional_constraints_call_v3, nullptr, 0, + false, true}, + {"canary_client_privacy", description_canary_client_privacy, + additional_constraints_canary_client_privacy, nullptr, 0, false, false}, + {"client_privacy", description_client_privacy, + additional_constraints_client_privacy, nullptr, 0, false, false}, + {"event_engine_client", description_event_engine_client, + additional_constraints_event_engine_client, nullptr, 0, false, true}, + {"event_engine_dns", description_event_engine_dns, + additional_constraints_event_engine_dns, nullptr, 0, false, false}, + {"event_engine_listener", description_event_engine_listener, + additional_constraints_event_engine_listener, nullptr, 0, false, true}, + {"free_large_allocator", description_free_large_allocator, + additional_constraints_free_large_allocator, nullptr, 0, false, true}, + {"keepalive_fix", description_keepalive_fix, + additional_constraints_keepalive_fix, nullptr, 0, false, false}, + {"keepalive_server_fix", description_keepalive_server_fix, + additional_constraints_keepalive_server_fix, nullptr, 0, false, false}, + {"monitoring_experiment", description_monitoring_experiment, + additional_constraints_monitoring_experiment, nullptr, 0, true, true}, + {"multiping", description_multiping, additional_constraints_multiping, + nullptr, 0, false, true}, + {"peer_state_based_framing", description_peer_state_based_framing, + additional_constraints_peer_state_based_framing, nullptr, 0, false, true}, + {"pending_queue_cap", description_pending_queue_cap, + additional_constraints_pending_queue_cap, nullptr, 0, true, true}, + {"pick_first_new", description_pick_first_new, + additional_constraints_pick_first_new, nullptr, 0, true, true}, + {"promise_based_client_call", description_promise_based_client_call, + additional_constraints_promise_based_client_call, + required_experiments_promise_based_client_call, 2, false, true}, + {"promise_based_server_call", description_promise_based_server_call, + additional_constraints_promise_based_server_call, nullptr, 0, false, true}, + {"chaotic_good", description_chaotic_good, + additional_constraints_chaotic_good, required_experiments_chaotic_good, 2, + false, true}, + {"promise_based_inproc_transport", + description_promise_based_inproc_transport, + additional_constraints_promise_based_inproc_transport, + required_experiments_promise_based_inproc_transport, 2, false, false}, + {"rstpit", description_rstpit, additional_constraints_rstpit, nullptr, 0, + false, true}, + {"schedule_cancellation_over_write", + description_schedule_cancellation_over_write, + additional_constraints_schedule_cancellation_over_write, nullptr, 0, false, + true}, + {"server_privacy", description_server_privacy, + additional_constraints_server_privacy, nullptr, 0, false, false}, + {"tcp_frame_size_tuning", description_tcp_frame_size_tuning, + additional_constraints_tcp_frame_size_tuning, nullptr, 0, false, true}, + {"tcp_rcv_lowat", description_tcp_rcv_lowat, + additional_constraints_tcp_rcv_lowat, nullptr, 0, false, true}, + {"trace_record_callops", description_trace_record_callops, + additional_constraints_trace_record_callops, nullptr, 0, false, true}, + {"unconstrained_max_quota_buffer_size", + description_unconstrained_max_quota_buffer_size, + additional_constraints_unconstrained_max_quota_buffer_size, nullptr, 0, + false, true}, + {"work_serializer_clears_time_cache", + description_work_serializer_clears_time_cache, + additional_constraints_work_serializer_clears_time_cache, nullptr, 0, true, + true}, + {"work_serializer_dispatch", description_work_serializer_dispatch, + additional_constraints_work_serializer_dispatch, + required_experiments_work_serializer_dispatch, 1, false, true}, }; } // namespace grpc_core #elif defined(GPR_WINDOWS) namespace { -const char* const description_call_status_override_on_cancellation = "Avoid overriding call status of successfully finished calls if it races with cancellation."; -const char* const additional_constraints_call_status_override_on_cancellation = "{}"; +const char* const description_call_status_override_on_cancellation = + "Avoid overriding call status of successfully finished calls if it races " + "with cancellation."; +const char* const additional_constraints_call_status_override_on_cancellation = + "{}"; const char* const description_call_v3 = "Promise-based call version 3."; const char* const additional_constraints_call_v3 = "{}"; -const char* const description_canary_client_privacy = "If set, canary client privacy"; +const char* const description_canary_client_privacy = + "If set, canary client privacy"; const char* const additional_constraints_canary_client_privacy = "{}"; const char* const description_client_privacy = "If set, client privacy"; const char* const additional_constraints_client_privacy = "{}"; -const char* const description_event_engine_client = "Use EventEngine clients instead of iomgr's grpc_tcp_client"; +const char* const description_event_engine_client = + "Use EventEngine clients instead of iomgr's grpc_tcp_client"; const char* const additional_constraints_event_engine_client = "{}"; -const char* const description_event_engine_dns = "If set, use EventEngine DNSResolver for client channel resolution"; +const char* const description_event_engine_dns = + "If set, use EventEngine DNSResolver for client channel resolution"; const char* const additional_constraints_event_engine_dns = "{}"; -const char* const description_event_engine_listener = "Use EventEngine listeners instead of iomgr's grpc_tcp_server"; +const char* const description_event_engine_listener = + "Use EventEngine listeners instead of iomgr's grpc_tcp_server"; const char* const additional_constraints_event_engine_listener = "{}"; -const char* const description_free_large_allocator = "If set, return all free bytes from a \042big\042 allocator"; +const char* const description_free_large_allocator = + "If set, return all free bytes from a \042big\042 allocator"; const char* const additional_constraints_free_large_allocator = "{}"; -const char* const description_keepalive_fix = "Allows overriding keepalive_permit_without_calls. Refer https://github.com/grpc/grpc/pull/33428 for more information."; +const char* const description_keepalive_fix = + "Allows overriding keepalive_permit_without_calls. Refer " + "https://github.com/grpc/grpc/pull/33428 for more information."; const char* const additional_constraints_keepalive_fix = "{}"; -const char* const description_keepalive_server_fix = "Allows overriding keepalive_permit_without_calls for servers. Refer https://github.com/grpc/grpc/pull/33917 for more information."; +const char* const description_keepalive_server_fix = + "Allows overriding keepalive_permit_without_calls for servers. Refer " + "https://github.com/grpc/grpc/pull/33917 for more information."; const char* const additional_constraints_keepalive_server_fix = "{}"; -const char* const description_monitoring_experiment = "Placeholder experiment to prove/disprove our monitoring is working"; +const char* const description_monitoring_experiment = + "Placeholder experiment to prove/disprove our monitoring is working"; const char* const additional_constraints_monitoring_experiment = "{}"; -const char* const description_multiping = "Allow more than one ping to be in flight at a time by default."; +const char* const description_multiping = + "Allow more than one ping to be in flight at a time by default."; const char* const additional_constraints_multiping = "{}"; -const char* const description_peer_state_based_framing = "If set, the max sizes of frames sent to lower layers is controlled based on the peer's memory pressure which is reflected in its max http2 frame size."; +const char* const description_peer_state_based_framing = + "If set, the max sizes of frames sent to lower layers is controlled based " + "on the peer's memory pressure which is reflected in its max http2 frame " + "size."; const char* const additional_constraints_peer_state_based_framing = "{}"; -const char* const description_pending_queue_cap = "In the sync & async apis (but not the callback api), cap the number of received but unrequested requests in the server for each call type. A received message is one that was read from the wire on the server. A requested message is one explicitly requested by the application using grpc_server_request_call or grpc_server_request_registered_call (or their wrappers in the C++ API)."; +const char* const description_pending_queue_cap = + "In the sync & async apis (but not the callback api), cap the number of " + "received but unrequested requests in the server for each call type. A " + "received message is one that was read from the wire on the server. A " + "requested message is one explicitly requested by the application using " + "grpc_server_request_call or grpc_server_request_registered_call (or their " + "wrappers in the C++ API)."; const char* const additional_constraints_pending_queue_cap = "{}"; -const char* const description_pick_first_new = "New pick_first impl with memory reduction."; +const char* const description_pick_first_new = + "New pick_first impl with memory reduction."; const char* const additional_constraints_pick_first_new = "{}"; -const char* const description_promise_based_client_call = "If set, use the new gRPC promise based call code when it's appropriate (ie when all filters in a stack are promise based)"; +const char* const description_promise_based_client_call = + "If set, use the new gRPC promise based call code when it's appropriate " + "(ie when all filters in a stack are promise based)"; const char* const additional_constraints_promise_based_client_call = "{}"; -const uint8_t required_experiments_promise_based_client_call[] = {static_cast(grpc_core::kExperimentIdEventEngineClient),static_cast(grpc_core::kExperimentIdEventEngineListener)}; -const char* const description_promise_based_server_call = "If set, use the new gRPC promise based call code when it's appropriate (ie when all filters in a stack are promise based)"; +const uint8_t required_experiments_promise_based_client_call[] = { + static_cast(grpc_core::kExperimentIdEventEngineClient), + static_cast(grpc_core::kExperimentIdEventEngineListener)}; +const char* const description_promise_based_server_call = + "If set, use the new gRPC promise based call code when it's appropriate " + "(ie when all filters in a stack are promise based)"; const char* const additional_constraints_promise_based_server_call = "{}"; -const char* const description_chaotic_good = "If set, enable the chaotic good load transport (this is mostly here for testing)"; +const char* const description_chaotic_good = + "If set, enable the chaotic good load transport (this is mostly here for " + "testing)"; const char* const additional_constraints_chaotic_good = "{}"; -const uint8_t required_experiments_chaotic_good[] = {static_cast(grpc_core::kExperimentIdPromiseBasedClientCall),static_cast(grpc_core::kExperimentIdPromiseBasedServerCall)}; -const char* const description_promise_based_inproc_transport = "Use promises for the in-process transport."; +const uint8_t required_experiments_chaotic_good[] = { + static_cast(grpc_core::kExperimentIdPromiseBasedClientCall), + static_cast(grpc_core::kExperimentIdPromiseBasedServerCall)}; +const char* const description_promise_based_inproc_transport = + "Use promises for the in-process transport."; const char* const additional_constraints_promise_based_inproc_transport = "{}"; -const uint8_t required_experiments_promise_based_inproc_transport[] = {static_cast(grpc_core::kExperimentIdPromiseBasedClientCall),static_cast(grpc_core::kExperimentIdPromiseBasedServerCall)}; -const char* const description_rstpit = "On RST_STREAM on a server, reduce MAX_CONCURRENT_STREAMS for a short duration"; +const uint8_t required_experiments_promise_based_inproc_transport[] = { + static_cast(grpc_core::kExperimentIdPromiseBasedClientCall), + static_cast(grpc_core::kExperimentIdPromiseBasedServerCall)}; +const char* const description_rstpit = + "On RST_STREAM on a server, reduce MAX_CONCURRENT_STREAMS for a short " + "duration"; const char* const additional_constraints_rstpit = "{}"; -const char* const description_schedule_cancellation_over_write = "Allow cancellation op to be scheduled over a write"; -const char* const additional_constraints_schedule_cancellation_over_write = "{}"; +const char* const description_schedule_cancellation_over_write = + "Allow cancellation op to be scheduled over a write"; +const char* const additional_constraints_schedule_cancellation_over_write = + "{}"; const char* const description_server_privacy = "If set, server privacy"; const char* const additional_constraints_server_privacy = "{}"; -const char* const description_tcp_frame_size_tuning = "If set, enables TCP to use RPC size estimation made by higher layers. TCP would not indicate completion of a read operation until a specified number of bytes have been read over the socket. Buffers are also allocated according to estimated RPC sizes."; +const char* const description_tcp_frame_size_tuning = + "If set, enables TCP to use RPC size estimation made by higher layers. TCP " + "would not indicate completion of a read operation until a specified " + "number of bytes have been read over the socket. Buffers are also " + "allocated according to estimated RPC sizes."; const char* const additional_constraints_tcp_frame_size_tuning = "{}"; -const char* const description_tcp_rcv_lowat = "Use SO_RCVLOWAT to avoid wakeups on the read path."; +const char* const description_tcp_rcv_lowat = + "Use SO_RCVLOWAT to avoid wakeups on the read path."; const char* const additional_constraints_tcp_rcv_lowat = "{}"; -const char* const description_trace_record_callops = "Enables tracing of call batch initiation and completion."; +const char* const description_trace_record_callops = + "Enables tracing of call batch initiation and completion."; const char* const additional_constraints_trace_record_callops = "{}"; -const char* const description_unconstrained_max_quota_buffer_size = "Discard the cap on the max free pool size for one memory allocator"; -const char* const additional_constraints_unconstrained_max_quota_buffer_size = "{}"; -const char* const description_work_serializer_clears_time_cache = "Have the work serializer clear the time cache when it dispatches work."; -const char* const additional_constraints_work_serializer_clears_time_cache = "{}"; -const char* const description_work_serializer_dispatch = "Have the work serializer dispatch work to event engine for every callback, instead of running things inline in the first thread that successfully enqueues work."; +const char* const description_unconstrained_max_quota_buffer_size = + "Discard the cap on the max free pool size for one memory allocator"; +const char* const additional_constraints_unconstrained_max_quota_buffer_size = + "{}"; +const char* const description_work_serializer_clears_time_cache = + "Have the work serializer clear the time cache when it dispatches work."; +const char* const additional_constraints_work_serializer_clears_time_cache = + "{}"; +const char* const description_work_serializer_dispatch = + "Have the work serializer dispatch work to event engine for every " + "callback, instead of running things inline in the first thread that " + "successfully enqueues work."; const char* const additional_constraints_work_serializer_dispatch = "{}"; -const uint8_t required_experiments_work_serializer_dispatch[] = {static_cast(grpc_core::kExperimentIdEventEngineClient)}; +const uint8_t required_experiments_work_serializer_dispatch[] = { + static_cast(grpc_core::kExperimentIdEventEngineClient)}; #ifdef NDEBUG const bool kDefaultForDebugOnly = false; #else const bool kDefaultForDebugOnly = true; #endif -} +} // namespace namespace grpc_core { const ExperimentMetadata g_experiment_metadata[] = { - {"call_status_override_on_cancellation", description_call_status_override_on_cancellation, additional_constraints_call_status_override_on_cancellation, nullptr, 0, kDefaultForDebugOnly, true}, - {"call_v3", description_call_v3, additional_constraints_call_v3, nullptr, 0, false, true}, - {"canary_client_privacy", description_canary_client_privacy, additional_constraints_canary_client_privacy, nullptr, 0, false, false}, - {"client_privacy", description_client_privacy, additional_constraints_client_privacy, nullptr, 0, false, false}, - {"event_engine_client", description_event_engine_client, additional_constraints_event_engine_client, nullptr, 0, false, true}, - {"event_engine_dns", description_event_engine_dns, additional_constraints_event_engine_dns, nullptr, 0, false, false}, - {"event_engine_listener", description_event_engine_listener, additional_constraints_event_engine_listener, nullptr, 0, true, true}, - {"free_large_allocator", description_free_large_allocator, additional_constraints_free_large_allocator, nullptr, 0, false, true}, - {"keepalive_fix", description_keepalive_fix, additional_constraints_keepalive_fix, nullptr, 0, false, false}, - {"keepalive_server_fix", description_keepalive_server_fix, additional_constraints_keepalive_server_fix, nullptr, 0, false, false}, - {"monitoring_experiment", description_monitoring_experiment, additional_constraints_monitoring_experiment, nullptr, 0, true, true}, - {"multiping", description_multiping, additional_constraints_multiping, nullptr, 0, false, true}, - {"peer_state_based_framing", description_peer_state_based_framing, additional_constraints_peer_state_based_framing, nullptr, 0, false, true}, - {"pending_queue_cap", description_pending_queue_cap, additional_constraints_pending_queue_cap, nullptr, 0, true, true}, - {"pick_first_new", description_pick_first_new, additional_constraints_pick_first_new, nullptr, 0, true, true}, - {"promise_based_client_call", description_promise_based_client_call, additional_constraints_promise_based_client_call, required_experiments_promise_based_client_call, 2, false, true}, - {"promise_based_server_call", description_promise_based_server_call, additional_constraints_promise_based_server_call, nullptr, 0, false, true}, - {"chaotic_good", description_chaotic_good, additional_constraints_chaotic_good, required_experiments_chaotic_good, 2, false, true}, - {"promise_based_inproc_transport", description_promise_based_inproc_transport, additional_constraints_promise_based_inproc_transport, required_experiments_promise_based_inproc_transport, 2, false, false}, - {"rstpit", description_rstpit, additional_constraints_rstpit, nullptr, 0, false, true}, - {"schedule_cancellation_over_write", description_schedule_cancellation_over_write, additional_constraints_schedule_cancellation_over_write, nullptr, 0, false, true}, - {"server_privacy", description_server_privacy, additional_constraints_server_privacy, nullptr, 0, false, false}, - {"tcp_frame_size_tuning", description_tcp_frame_size_tuning, additional_constraints_tcp_frame_size_tuning, nullptr, 0, false, true}, - {"tcp_rcv_lowat", description_tcp_rcv_lowat, additional_constraints_tcp_rcv_lowat, nullptr, 0, false, true}, - {"trace_record_callops", description_trace_record_callops, additional_constraints_trace_record_callops, nullptr, 0, false, true}, - {"unconstrained_max_quota_buffer_size", description_unconstrained_max_quota_buffer_size, additional_constraints_unconstrained_max_quota_buffer_size, nullptr, 0, false, true}, - {"work_serializer_clears_time_cache", description_work_serializer_clears_time_cache, additional_constraints_work_serializer_clears_time_cache, nullptr, 0, true, true}, - {"work_serializer_dispatch", description_work_serializer_dispatch, additional_constraints_work_serializer_dispatch, required_experiments_work_serializer_dispatch, 1, false, true}, + {"call_status_override_on_cancellation", + description_call_status_override_on_cancellation, + additional_constraints_call_status_override_on_cancellation, nullptr, 0, + kDefaultForDebugOnly, true}, + {"call_v3", description_call_v3, additional_constraints_call_v3, nullptr, 0, + false, true}, + {"canary_client_privacy", description_canary_client_privacy, + additional_constraints_canary_client_privacy, nullptr, 0, false, false}, + {"client_privacy", description_client_privacy, + additional_constraints_client_privacy, nullptr, 0, false, false}, + {"event_engine_client", description_event_engine_client, + additional_constraints_event_engine_client, nullptr, 0, false, true}, + {"event_engine_dns", description_event_engine_dns, + additional_constraints_event_engine_dns, nullptr, 0, false, false}, + {"event_engine_listener", description_event_engine_listener, + additional_constraints_event_engine_listener, nullptr, 0, true, true}, + {"free_large_allocator", description_free_large_allocator, + additional_constraints_free_large_allocator, nullptr, 0, false, true}, + {"keepalive_fix", description_keepalive_fix, + additional_constraints_keepalive_fix, nullptr, 0, false, false}, + {"keepalive_server_fix", description_keepalive_server_fix, + additional_constraints_keepalive_server_fix, nullptr, 0, false, false}, + {"monitoring_experiment", description_monitoring_experiment, + additional_constraints_monitoring_experiment, nullptr, 0, true, true}, + {"multiping", description_multiping, additional_constraints_multiping, + nullptr, 0, false, true}, + {"peer_state_based_framing", description_peer_state_based_framing, + additional_constraints_peer_state_based_framing, nullptr, 0, false, true}, + {"pending_queue_cap", description_pending_queue_cap, + additional_constraints_pending_queue_cap, nullptr, 0, true, true}, + {"pick_first_new", description_pick_first_new, + additional_constraints_pick_first_new, nullptr, 0, true, true}, + {"promise_based_client_call", description_promise_based_client_call, + additional_constraints_promise_based_client_call, + required_experiments_promise_based_client_call, 2, false, true}, + {"promise_based_server_call", description_promise_based_server_call, + additional_constraints_promise_based_server_call, nullptr, 0, false, true}, + {"chaotic_good", description_chaotic_good, + additional_constraints_chaotic_good, required_experiments_chaotic_good, 2, + false, true}, + {"promise_based_inproc_transport", + description_promise_based_inproc_transport, + additional_constraints_promise_based_inproc_transport, + required_experiments_promise_based_inproc_transport, 2, false, false}, + {"rstpit", description_rstpit, additional_constraints_rstpit, nullptr, 0, + false, true}, + {"schedule_cancellation_over_write", + description_schedule_cancellation_over_write, + additional_constraints_schedule_cancellation_over_write, nullptr, 0, false, + true}, + {"server_privacy", description_server_privacy, + additional_constraints_server_privacy, nullptr, 0, false, false}, + {"tcp_frame_size_tuning", description_tcp_frame_size_tuning, + additional_constraints_tcp_frame_size_tuning, nullptr, 0, false, true}, + {"tcp_rcv_lowat", description_tcp_rcv_lowat, + additional_constraints_tcp_rcv_lowat, nullptr, 0, false, true}, + {"trace_record_callops", description_trace_record_callops, + additional_constraints_trace_record_callops, nullptr, 0, false, true}, + {"unconstrained_max_quota_buffer_size", + description_unconstrained_max_quota_buffer_size, + additional_constraints_unconstrained_max_quota_buffer_size, nullptr, 0, + false, true}, + {"work_serializer_clears_time_cache", + description_work_serializer_clears_time_cache, + additional_constraints_work_serializer_clears_time_cache, nullptr, 0, true, + true}, + {"work_serializer_dispatch", description_work_serializer_dispatch, + additional_constraints_work_serializer_dispatch, + required_experiments_work_serializer_dispatch, 1, false, true}, }; } // namespace grpc_core #else namespace { -const char* const description_call_status_override_on_cancellation = "Avoid overriding call status of successfully finished calls if it races with cancellation."; -const char* const additional_constraints_call_status_override_on_cancellation = "{}"; +const char* const description_call_status_override_on_cancellation = + "Avoid overriding call status of successfully finished calls if it races " + "with cancellation."; +const char* const additional_constraints_call_status_override_on_cancellation = + "{}"; const char* const description_call_v3 = "Promise-based call version 3."; const char* const additional_constraints_call_v3 = "{}"; -const char* const description_canary_client_privacy = "If set, canary client privacy"; +const char* const description_canary_client_privacy = + "If set, canary client privacy"; const char* const additional_constraints_canary_client_privacy = "{}"; const char* const description_client_privacy = "If set, client privacy"; const char* const additional_constraints_client_privacy = "{}"; -const char* const description_event_engine_client = "Use EventEngine clients instead of iomgr's grpc_tcp_client"; +const char* const description_event_engine_client = + "Use EventEngine clients instead of iomgr's grpc_tcp_client"; const char* const additional_constraints_event_engine_client = "{}"; -const char* const description_event_engine_dns = "If set, use EventEngine DNSResolver for client channel resolution"; +const char* const description_event_engine_dns = + "If set, use EventEngine DNSResolver for client channel resolution"; const char* const additional_constraints_event_engine_dns = "{}"; -const char* const description_event_engine_listener = "Use EventEngine listeners instead of iomgr's grpc_tcp_server"; +const char* const description_event_engine_listener = + "Use EventEngine listeners instead of iomgr's grpc_tcp_server"; const char* const additional_constraints_event_engine_listener = "{}"; -const char* const description_free_large_allocator = "If set, return all free bytes from a \042big\042 allocator"; +const char* const description_free_large_allocator = + "If set, return all free bytes from a \042big\042 allocator"; const char* const additional_constraints_free_large_allocator = "{}"; -const char* const description_keepalive_fix = "Allows overriding keepalive_permit_without_calls. Refer https://github.com/grpc/grpc/pull/33428 for more information."; +const char* const description_keepalive_fix = + "Allows overriding keepalive_permit_without_calls. Refer " + "https://github.com/grpc/grpc/pull/33428 for more information."; const char* const additional_constraints_keepalive_fix = "{}"; -const char* const description_keepalive_server_fix = "Allows overriding keepalive_permit_without_calls for servers. Refer https://github.com/grpc/grpc/pull/33917 for more information."; +const char* const description_keepalive_server_fix = + "Allows overriding keepalive_permit_without_calls for servers. Refer " + "https://github.com/grpc/grpc/pull/33917 for more information."; const char* const additional_constraints_keepalive_server_fix = "{}"; -const char* const description_monitoring_experiment = "Placeholder experiment to prove/disprove our monitoring is working"; +const char* const description_monitoring_experiment = + "Placeholder experiment to prove/disprove our monitoring is working"; const char* const additional_constraints_monitoring_experiment = "{}"; -const char* const description_multiping = "Allow more than one ping to be in flight at a time by default."; +const char* const description_multiping = + "Allow more than one ping to be in flight at a time by default."; const char* const additional_constraints_multiping = "{}"; -const char* const description_peer_state_based_framing = "If set, the max sizes of frames sent to lower layers is controlled based on the peer's memory pressure which is reflected in its max http2 frame size."; +const char* const description_peer_state_based_framing = + "If set, the max sizes of frames sent to lower layers is controlled based " + "on the peer's memory pressure which is reflected in its max http2 frame " + "size."; const char* const additional_constraints_peer_state_based_framing = "{}"; -const char* const description_pending_queue_cap = "In the sync & async apis (but not the callback api), cap the number of received but unrequested requests in the server for each call type. A received message is one that was read from the wire on the server. A requested message is one explicitly requested by the application using grpc_server_request_call or grpc_server_request_registered_call (or their wrappers in the C++ API)."; +const char* const description_pending_queue_cap = + "In the sync & async apis (but not the callback api), cap the number of " + "received but unrequested requests in the server for each call type. A " + "received message is one that was read from the wire on the server. A " + "requested message is one explicitly requested by the application using " + "grpc_server_request_call or grpc_server_request_registered_call (or their " + "wrappers in the C++ API)."; const char* const additional_constraints_pending_queue_cap = "{}"; -const char* const description_pick_first_new = "New pick_first impl with memory reduction."; +const char* const description_pick_first_new = + "New pick_first impl with memory reduction."; const char* const additional_constraints_pick_first_new = "{}"; -const char* const description_promise_based_client_call = "If set, use the new gRPC promise based call code when it's appropriate (ie when all filters in a stack are promise based)"; +const char* const description_promise_based_client_call = + "If set, use the new gRPC promise based call code when it's appropriate " + "(ie when all filters in a stack are promise based)"; const char* const additional_constraints_promise_based_client_call = "{}"; -const uint8_t required_experiments_promise_based_client_call[] = {static_cast(grpc_core::kExperimentIdEventEngineClient),static_cast(grpc_core::kExperimentIdEventEngineListener)}; -const char* const description_promise_based_server_call = "If set, use the new gRPC promise based call code when it's appropriate (ie when all filters in a stack are promise based)"; +const uint8_t required_experiments_promise_based_client_call[] = { + static_cast(grpc_core::kExperimentIdEventEngineClient), + static_cast(grpc_core::kExperimentIdEventEngineListener)}; +const char* const description_promise_based_server_call = + "If set, use the new gRPC promise based call code when it's appropriate " + "(ie when all filters in a stack are promise based)"; const char* const additional_constraints_promise_based_server_call = "{}"; -const char* const description_chaotic_good = "If set, enable the chaotic good load transport (this is mostly here for testing)"; +const char* const description_chaotic_good = + "If set, enable the chaotic good load transport (this is mostly here for " + "testing)"; const char* const additional_constraints_chaotic_good = "{}"; -const uint8_t required_experiments_chaotic_good[] = {static_cast(grpc_core::kExperimentIdPromiseBasedClientCall),static_cast(grpc_core::kExperimentIdPromiseBasedServerCall)}; -const char* const description_promise_based_inproc_transport = "Use promises for the in-process transport."; +const uint8_t required_experiments_chaotic_good[] = { + static_cast(grpc_core::kExperimentIdPromiseBasedClientCall), + static_cast(grpc_core::kExperimentIdPromiseBasedServerCall)}; +const char* const description_promise_based_inproc_transport = + "Use promises for the in-process transport."; const char* const additional_constraints_promise_based_inproc_transport = "{}"; -const uint8_t required_experiments_promise_based_inproc_transport[] = {static_cast(grpc_core::kExperimentIdPromiseBasedClientCall),static_cast(grpc_core::kExperimentIdPromiseBasedServerCall)}; -const char* const description_rstpit = "On RST_STREAM on a server, reduce MAX_CONCURRENT_STREAMS for a short duration"; +const uint8_t required_experiments_promise_based_inproc_transport[] = { + static_cast(grpc_core::kExperimentIdPromiseBasedClientCall), + static_cast(grpc_core::kExperimentIdPromiseBasedServerCall)}; +const char* const description_rstpit = + "On RST_STREAM on a server, reduce MAX_CONCURRENT_STREAMS for a short " + "duration"; const char* const additional_constraints_rstpit = "{}"; -const char* const description_schedule_cancellation_over_write = "Allow cancellation op to be scheduled over a write"; -const char* const additional_constraints_schedule_cancellation_over_write = "{}"; +const char* const description_schedule_cancellation_over_write = + "Allow cancellation op to be scheduled over a write"; +const char* const additional_constraints_schedule_cancellation_over_write = + "{}"; const char* const description_server_privacy = "If set, server privacy"; const char* const additional_constraints_server_privacy = "{}"; -const char* const description_tcp_frame_size_tuning = "If set, enables TCP to use RPC size estimation made by higher layers. TCP would not indicate completion of a read operation until a specified number of bytes have been read over the socket. Buffers are also allocated according to estimated RPC sizes."; +const char* const description_tcp_frame_size_tuning = + "If set, enables TCP to use RPC size estimation made by higher layers. TCP " + "would not indicate completion of a read operation until a specified " + "number of bytes have been read over the socket. Buffers are also " + "allocated according to estimated RPC sizes."; const char* const additional_constraints_tcp_frame_size_tuning = "{}"; -const char* const description_tcp_rcv_lowat = "Use SO_RCVLOWAT to avoid wakeups on the read path."; +const char* const description_tcp_rcv_lowat = + "Use SO_RCVLOWAT to avoid wakeups on the read path."; const char* const additional_constraints_tcp_rcv_lowat = "{}"; -const char* const description_trace_record_callops = "Enables tracing of call batch initiation and completion."; +const char* const description_trace_record_callops = + "Enables tracing of call batch initiation and completion."; const char* const additional_constraints_trace_record_callops = "{}"; -const char* const description_unconstrained_max_quota_buffer_size = "Discard the cap on the max free pool size for one memory allocator"; -const char* const additional_constraints_unconstrained_max_quota_buffer_size = "{}"; -const char* const description_work_serializer_clears_time_cache = "Have the work serializer clear the time cache when it dispatches work."; -const char* const additional_constraints_work_serializer_clears_time_cache = "{}"; -const char* const description_work_serializer_dispatch = "Have the work serializer dispatch work to event engine for every callback, instead of running things inline in the first thread that successfully enqueues work."; +const char* const description_unconstrained_max_quota_buffer_size = + "Discard the cap on the max free pool size for one memory allocator"; +const char* const additional_constraints_unconstrained_max_quota_buffer_size = + "{}"; +const char* const description_work_serializer_clears_time_cache = + "Have the work serializer clear the time cache when it dispatches work."; +const char* const additional_constraints_work_serializer_clears_time_cache = + "{}"; +const char* const description_work_serializer_dispatch = + "Have the work serializer dispatch work to event engine for every " + "callback, instead of running things inline in the first thread that " + "successfully enqueues work."; const char* const additional_constraints_work_serializer_dispatch = "{}"; -const uint8_t required_experiments_work_serializer_dispatch[] = {static_cast(grpc_core::kExperimentIdEventEngineClient)}; +const uint8_t required_experiments_work_serializer_dispatch[] = { + static_cast(grpc_core::kExperimentIdEventEngineClient)}; #ifdef NDEBUG const bool kDefaultForDebugOnly = false; #else const bool kDefaultForDebugOnly = true; #endif -} +} // namespace namespace grpc_core { const ExperimentMetadata g_experiment_metadata[] = { - {"call_status_override_on_cancellation", description_call_status_override_on_cancellation, additional_constraints_call_status_override_on_cancellation, nullptr, 0, kDefaultForDebugOnly, true}, - {"call_v3", description_call_v3, additional_constraints_call_v3, nullptr, 0, false, true}, - {"canary_client_privacy", description_canary_client_privacy, additional_constraints_canary_client_privacy, nullptr, 0, false, false}, - {"client_privacy", description_client_privacy, additional_constraints_client_privacy, nullptr, 0, false, false}, - {"event_engine_client", description_event_engine_client, additional_constraints_event_engine_client, nullptr, 0, false, true}, - {"event_engine_dns", description_event_engine_dns, additional_constraints_event_engine_dns, nullptr, 0, true, false}, - {"event_engine_listener", description_event_engine_listener, additional_constraints_event_engine_listener, nullptr, 0, true, true}, - {"free_large_allocator", description_free_large_allocator, additional_constraints_free_large_allocator, nullptr, 0, false, true}, - {"keepalive_fix", description_keepalive_fix, additional_constraints_keepalive_fix, nullptr, 0, false, false}, - {"keepalive_server_fix", description_keepalive_server_fix, additional_constraints_keepalive_server_fix, nullptr, 0, false, false}, - {"monitoring_experiment", description_monitoring_experiment, additional_constraints_monitoring_experiment, nullptr, 0, true, true}, - {"multiping", description_multiping, additional_constraints_multiping, nullptr, 0, false, true}, - {"peer_state_based_framing", description_peer_state_based_framing, additional_constraints_peer_state_based_framing, nullptr, 0, false, true}, - {"pending_queue_cap", description_pending_queue_cap, additional_constraints_pending_queue_cap, nullptr, 0, true, true}, - {"pick_first_new", description_pick_first_new, additional_constraints_pick_first_new, nullptr, 0, true, true}, - {"promise_based_client_call", description_promise_based_client_call, additional_constraints_promise_based_client_call, required_experiments_promise_based_client_call, 2, false, true}, - {"promise_based_server_call", description_promise_based_server_call, additional_constraints_promise_based_server_call, nullptr, 0, false, true}, - {"chaotic_good", description_chaotic_good, additional_constraints_chaotic_good, required_experiments_chaotic_good, 2, false, true}, - {"promise_based_inproc_transport", description_promise_based_inproc_transport, additional_constraints_promise_based_inproc_transport, required_experiments_promise_based_inproc_transport, 2, false, false}, - {"rstpit", description_rstpit, additional_constraints_rstpit, nullptr, 0, false, true}, - {"schedule_cancellation_over_write", description_schedule_cancellation_over_write, additional_constraints_schedule_cancellation_over_write, nullptr, 0, false, true}, - {"server_privacy", description_server_privacy, additional_constraints_server_privacy, nullptr, 0, false, false}, - {"tcp_frame_size_tuning", description_tcp_frame_size_tuning, additional_constraints_tcp_frame_size_tuning, nullptr, 0, false, true}, - {"tcp_rcv_lowat", description_tcp_rcv_lowat, additional_constraints_tcp_rcv_lowat, nullptr, 0, false, true}, - {"trace_record_callops", description_trace_record_callops, additional_constraints_trace_record_callops, nullptr, 0, false, true}, - {"unconstrained_max_quota_buffer_size", description_unconstrained_max_quota_buffer_size, additional_constraints_unconstrained_max_quota_buffer_size, nullptr, 0, false, true}, - {"work_serializer_clears_time_cache", description_work_serializer_clears_time_cache, additional_constraints_work_serializer_clears_time_cache, nullptr, 0, true, true}, - {"work_serializer_dispatch", description_work_serializer_dispatch, additional_constraints_work_serializer_dispatch, required_experiments_work_serializer_dispatch, 1, true, true}, + {"call_status_override_on_cancellation", + description_call_status_override_on_cancellation, + additional_constraints_call_status_override_on_cancellation, nullptr, 0, + kDefaultForDebugOnly, true}, + {"call_v3", description_call_v3, additional_constraints_call_v3, nullptr, 0, + false, true}, + {"canary_client_privacy", description_canary_client_privacy, + additional_constraints_canary_client_privacy, nullptr, 0, false, false}, + {"client_privacy", description_client_privacy, + additional_constraints_client_privacy, nullptr, 0, false, false}, + {"event_engine_client", description_event_engine_client, + additional_constraints_event_engine_client, nullptr, 0, false, true}, + {"event_engine_dns", description_event_engine_dns, + additional_constraints_event_engine_dns, nullptr, 0, true, false}, + {"event_engine_listener", description_event_engine_listener, + additional_constraints_event_engine_listener, nullptr, 0, true, true}, + {"free_large_allocator", description_free_large_allocator, + additional_constraints_free_large_allocator, nullptr, 0, false, true}, + {"keepalive_fix", description_keepalive_fix, + additional_constraints_keepalive_fix, nullptr, 0, false, false}, + {"keepalive_server_fix", description_keepalive_server_fix, + additional_constraints_keepalive_server_fix, nullptr, 0, false, false}, + {"monitoring_experiment", description_monitoring_experiment, + additional_constraints_monitoring_experiment, nullptr, 0, true, true}, + {"multiping", description_multiping, additional_constraints_multiping, + nullptr, 0, false, true}, + {"peer_state_based_framing", description_peer_state_based_framing, + additional_constraints_peer_state_based_framing, nullptr, 0, false, true}, + {"pending_queue_cap", description_pending_queue_cap, + additional_constraints_pending_queue_cap, nullptr, 0, true, true}, + {"pick_first_new", description_pick_first_new, + additional_constraints_pick_first_new, nullptr, 0, true, true}, + {"promise_based_client_call", description_promise_based_client_call, + additional_constraints_promise_based_client_call, + required_experiments_promise_based_client_call, 2, false, true}, + {"promise_based_server_call", description_promise_based_server_call, + additional_constraints_promise_based_server_call, nullptr, 0, false, true}, + {"chaotic_good", description_chaotic_good, + additional_constraints_chaotic_good, required_experiments_chaotic_good, 2, + false, true}, + {"promise_based_inproc_transport", + description_promise_based_inproc_transport, + additional_constraints_promise_based_inproc_transport, + required_experiments_promise_based_inproc_transport, 2, false, false}, + {"rstpit", description_rstpit, additional_constraints_rstpit, nullptr, 0, + false, true}, + {"schedule_cancellation_over_write", + description_schedule_cancellation_over_write, + additional_constraints_schedule_cancellation_over_write, nullptr, 0, false, + true}, + {"server_privacy", description_server_privacy, + additional_constraints_server_privacy, nullptr, 0, false, false}, + {"tcp_frame_size_tuning", description_tcp_frame_size_tuning, + additional_constraints_tcp_frame_size_tuning, nullptr, 0, false, true}, + {"tcp_rcv_lowat", description_tcp_rcv_lowat, + additional_constraints_tcp_rcv_lowat, nullptr, 0, false, true}, + {"trace_record_callops", description_trace_record_callops, + additional_constraints_trace_record_callops, nullptr, 0, false, true}, + {"unconstrained_max_quota_buffer_size", + description_unconstrained_max_quota_buffer_size, + additional_constraints_unconstrained_max_quota_buffer_size, nullptr, 0, + false, true}, + {"work_serializer_clears_time_cache", + description_work_serializer_clears_time_cache, + additional_constraints_work_serializer_clears_time_cache, nullptr, 0, true, + true}, + {"work_serializer_dispatch", description_work_serializer_dispatch, + additional_constraints_work_serializer_dispatch, + required_experiments_work_serializer_dispatch, 1, true, true}, }; } // namespace grpc_core diff --git a/src/core/lib/experiments/experiments.h b/src/core/lib/experiments/experiments.h index b68dba4320e..a48a97d63dc 100644 --- a/src/core/lib/experiments/experiments.h +++ b/src/core/lib/experiments/experiments.h @@ -60,13 +60,13 @@ namespace grpc_core { #ifndef NDEBUG #define GRPC_EXPERIMENT_IS_INCLUDED_CALL_STATUS_OVERRIDE_ON_CANCELLATION #endif -inline bool IsCallStatusOverrideOnCancellationEnabled() { +inline bool IsCallStatusOverrideOnCancellationEnabled() { #ifdef NDEBUG -return false; + return false; #else -return true; + return true; #endif - } +} inline bool IsCallV3Enabled() { return false; } inline bool IsCanaryClientPrivacyEnabled() { return false; } inline bool IsClientPrivacyEnabled() { return false; } @@ -103,13 +103,13 @@ inline bool IsWorkSerializerDispatchEnabled() { return false; } #ifndef NDEBUG #define GRPC_EXPERIMENT_IS_INCLUDED_CALL_STATUS_OVERRIDE_ON_CANCELLATION #endif -inline bool IsCallStatusOverrideOnCancellationEnabled() { +inline bool IsCallStatusOverrideOnCancellationEnabled() { #ifdef NDEBUG -return false; + return false; #else -return true; + return true; #endif - } +} inline bool IsCallV3Enabled() { return false; } inline bool IsCanaryClientPrivacyEnabled() { return false; } inline bool IsClientPrivacyEnabled() { return false; } @@ -147,13 +147,13 @@ inline bool IsWorkSerializerDispatchEnabled() { return false; } #ifndef NDEBUG #define GRPC_EXPERIMENT_IS_INCLUDED_CALL_STATUS_OVERRIDE_ON_CANCELLATION #endif -inline bool IsCallStatusOverrideOnCancellationEnabled() { +inline bool IsCallStatusOverrideOnCancellationEnabled() { #ifdef NDEBUG -return false; + return false; #else -return true; + return true; #endif - } +} inline bool IsCallV3Enabled() { return false; } inline bool IsCanaryClientPrivacyEnabled() { return false; } inline bool IsClientPrivacyEnabled() { return false; } @@ -223,61 +223,117 @@ enum ExperimentIds { kNumExperiments }; #define GRPC_EXPERIMENT_IS_INCLUDED_CALL_STATUS_OVERRIDE_ON_CANCELLATION -inline bool IsCallStatusOverrideOnCancellationEnabled() { return IsExperimentEnabled(kExperimentIdCallStatusOverrideOnCancellation); } +inline bool IsCallStatusOverrideOnCancellationEnabled() { + return IsExperimentEnabled(kExperimentIdCallStatusOverrideOnCancellation); +} #define GRPC_EXPERIMENT_IS_INCLUDED_CALL_V3 -inline bool IsCallV3Enabled() { return IsExperimentEnabled(kExperimentIdCallV3); } +inline bool IsCallV3Enabled() { + return IsExperimentEnabled(kExperimentIdCallV3); +} #define GRPC_EXPERIMENT_IS_INCLUDED_CANARY_CLIENT_PRIVACY -inline bool IsCanaryClientPrivacyEnabled() { return IsExperimentEnabled(kExperimentIdCanaryClientPrivacy); } +inline bool IsCanaryClientPrivacyEnabled() { + return IsExperimentEnabled(kExperimentIdCanaryClientPrivacy); +} #define GRPC_EXPERIMENT_IS_INCLUDED_CLIENT_PRIVACY -inline bool IsClientPrivacyEnabled() { return IsExperimentEnabled(kExperimentIdClientPrivacy); } +inline bool IsClientPrivacyEnabled() { + return IsExperimentEnabled(kExperimentIdClientPrivacy); +} #define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_CLIENT -inline bool IsEventEngineClientEnabled() { return IsExperimentEnabled(kExperimentIdEventEngineClient); } +inline bool IsEventEngineClientEnabled() { + return IsExperimentEnabled(kExperimentIdEventEngineClient); +} #define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_DNS -inline bool IsEventEngineDnsEnabled() { return IsExperimentEnabled(kExperimentIdEventEngineDns); } +inline bool IsEventEngineDnsEnabled() { + return IsExperimentEnabled(kExperimentIdEventEngineDns); +} #define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_LISTENER -inline bool IsEventEngineListenerEnabled() { return IsExperimentEnabled(kExperimentIdEventEngineListener); } +inline bool IsEventEngineListenerEnabled() { + return IsExperimentEnabled(kExperimentIdEventEngineListener); +} #define GRPC_EXPERIMENT_IS_INCLUDED_FREE_LARGE_ALLOCATOR -inline bool IsFreeLargeAllocatorEnabled() { return IsExperimentEnabled(kExperimentIdFreeLargeAllocator); } +inline bool IsFreeLargeAllocatorEnabled() { + return IsExperimentEnabled(kExperimentIdFreeLargeAllocator); +} #define GRPC_EXPERIMENT_IS_INCLUDED_KEEPALIVE_FIX -inline bool IsKeepaliveFixEnabled() { return IsExperimentEnabled(kExperimentIdKeepaliveFix); } +inline bool IsKeepaliveFixEnabled() { + return IsExperimentEnabled(kExperimentIdKeepaliveFix); +} #define GRPC_EXPERIMENT_IS_INCLUDED_KEEPALIVE_SERVER_FIX -inline bool IsKeepaliveServerFixEnabled() { return IsExperimentEnabled(kExperimentIdKeepaliveServerFix); } +inline bool IsKeepaliveServerFixEnabled() { + return IsExperimentEnabled(kExperimentIdKeepaliveServerFix); +} #define GRPC_EXPERIMENT_IS_INCLUDED_MONITORING_EXPERIMENT -inline bool IsMonitoringExperimentEnabled() { return IsExperimentEnabled(kExperimentIdMonitoringExperiment); } +inline bool IsMonitoringExperimentEnabled() { + return IsExperimentEnabled(kExperimentIdMonitoringExperiment); +} #define GRPC_EXPERIMENT_IS_INCLUDED_MULTIPING -inline bool IsMultipingEnabled() { return IsExperimentEnabled(kExperimentIdMultiping); } +inline bool IsMultipingEnabled() { + return IsExperimentEnabled(kExperimentIdMultiping); +} #define GRPC_EXPERIMENT_IS_INCLUDED_PEER_STATE_BASED_FRAMING -inline bool IsPeerStateBasedFramingEnabled() { return IsExperimentEnabled(kExperimentIdPeerStateBasedFraming); } +inline bool IsPeerStateBasedFramingEnabled() { + return IsExperimentEnabled(kExperimentIdPeerStateBasedFraming); +} #define GRPC_EXPERIMENT_IS_INCLUDED_PENDING_QUEUE_CAP -inline bool IsPendingQueueCapEnabled() { return IsExperimentEnabled(kExperimentIdPendingQueueCap); } +inline bool IsPendingQueueCapEnabled() { + return IsExperimentEnabled(kExperimentIdPendingQueueCap); +} #define GRPC_EXPERIMENT_IS_INCLUDED_PICK_FIRST_NEW -inline bool IsPickFirstNewEnabled() { return IsExperimentEnabled(kExperimentIdPickFirstNew); } +inline bool IsPickFirstNewEnabled() { + return IsExperimentEnabled(kExperimentIdPickFirstNew); +} #define GRPC_EXPERIMENT_IS_INCLUDED_PROMISE_BASED_CLIENT_CALL -inline bool IsPromiseBasedClientCallEnabled() { return IsExperimentEnabled(kExperimentIdPromiseBasedClientCall); } +inline bool IsPromiseBasedClientCallEnabled() { + return IsExperimentEnabled(kExperimentIdPromiseBasedClientCall); +} #define GRPC_EXPERIMENT_IS_INCLUDED_PROMISE_BASED_SERVER_CALL -inline bool IsPromiseBasedServerCallEnabled() { return IsExperimentEnabled(kExperimentIdPromiseBasedServerCall); } +inline bool IsPromiseBasedServerCallEnabled() { + return IsExperimentEnabled(kExperimentIdPromiseBasedServerCall); +} #define GRPC_EXPERIMENT_IS_INCLUDED_CHAOTIC_GOOD -inline bool IsChaoticGoodEnabled() { return IsExperimentEnabled(kExperimentIdChaoticGood); } +inline bool IsChaoticGoodEnabled() { + return IsExperimentEnabled(kExperimentIdChaoticGood); +} #define GRPC_EXPERIMENT_IS_INCLUDED_PROMISE_BASED_INPROC_TRANSPORT -inline bool IsPromiseBasedInprocTransportEnabled() { return IsExperimentEnabled(kExperimentIdPromiseBasedInprocTransport); } +inline bool IsPromiseBasedInprocTransportEnabled() { + return IsExperimentEnabled(kExperimentIdPromiseBasedInprocTransport); +} #define GRPC_EXPERIMENT_IS_INCLUDED_RSTPIT -inline bool IsRstpitEnabled() { return IsExperimentEnabled(kExperimentIdRstpit); } +inline bool IsRstpitEnabled() { + return IsExperimentEnabled(kExperimentIdRstpit); +} #define GRPC_EXPERIMENT_IS_INCLUDED_SCHEDULE_CANCELLATION_OVER_WRITE -inline bool IsScheduleCancellationOverWriteEnabled() { return IsExperimentEnabled(kExperimentIdScheduleCancellationOverWrite); } +inline bool IsScheduleCancellationOverWriteEnabled() { + return IsExperimentEnabled(kExperimentIdScheduleCancellationOverWrite); +} #define GRPC_EXPERIMENT_IS_INCLUDED_SERVER_PRIVACY -inline bool IsServerPrivacyEnabled() { return IsExperimentEnabled(kExperimentIdServerPrivacy); } +inline bool IsServerPrivacyEnabled() { + return IsExperimentEnabled(kExperimentIdServerPrivacy); +} #define GRPC_EXPERIMENT_IS_INCLUDED_TCP_FRAME_SIZE_TUNING -inline bool IsTcpFrameSizeTuningEnabled() { return IsExperimentEnabled(kExperimentIdTcpFrameSizeTuning); } +inline bool IsTcpFrameSizeTuningEnabled() { + return IsExperimentEnabled(kExperimentIdTcpFrameSizeTuning); +} #define GRPC_EXPERIMENT_IS_INCLUDED_TCP_RCV_LOWAT -inline bool IsTcpRcvLowatEnabled() { return IsExperimentEnabled(kExperimentIdTcpRcvLowat); } +inline bool IsTcpRcvLowatEnabled() { + return IsExperimentEnabled(kExperimentIdTcpRcvLowat); +} #define GRPC_EXPERIMENT_IS_INCLUDED_TRACE_RECORD_CALLOPS -inline bool IsTraceRecordCallopsEnabled() { return IsExperimentEnabled(kExperimentIdTraceRecordCallops); } +inline bool IsTraceRecordCallopsEnabled() { + return IsExperimentEnabled(kExperimentIdTraceRecordCallops); +} #define GRPC_EXPERIMENT_IS_INCLUDED_UNCONSTRAINED_MAX_QUOTA_BUFFER_SIZE -inline bool IsUnconstrainedMaxQuotaBufferSizeEnabled() { return IsExperimentEnabled(kExperimentIdUnconstrainedMaxQuotaBufferSize); } +inline bool IsUnconstrainedMaxQuotaBufferSizeEnabled() { + return IsExperimentEnabled(kExperimentIdUnconstrainedMaxQuotaBufferSize); +} #define GRPC_EXPERIMENT_IS_INCLUDED_WORK_SERIALIZER_CLEARS_TIME_CACHE -inline bool IsWorkSerializerClearsTimeCacheEnabled() { return IsExperimentEnabled(kExperimentIdWorkSerializerClearsTimeCache); } +inline bool IsWorkSerializerClearsTimeCacheEnabled() { + return IsExperimentEnabled(kExperimentIdWorkSerializerClearsTimeCache); +} #define GRPC_EXPERIMENT_IS_INCLUDED_WORK_SERIALIZER_DISPATCH -inline bool IsWorkSerializerDispatchEnabled() { return IsExperimentEnabled(kExperimentIdWorkSerializerDispatch); } +inline bool IsWorkSerializerDispatchEnabled() { + return IsExperimentEnabled(kExperimentIdWorkSerializerDispatch); +} extern const ExperimentMetadata g_experiment_metadata[kNumExperiments]; diff --git a/test/core/experiments/experiments_test.cc b/test/core/experiments/experiments_test.cc index 50e40d4af70..f604efa05ff 100644 --- a/test/core/experiments/experiments_test.cc +++ b/test/core/experiments/experiments_test.cc @@ -14,103 +14,81 @@ // Auto generated by tools/codegen/core/gen_experiments.py - -#include - #include "test/core/experiments/fixtures/experiments.h" #include #include "gtest/gtest.h" +#include + #include "src/core/lib/experiments/config.h" #ifndef GRPC_EXPERIMENTS_ARE_FINAL #if defined(GRPC_CFSTREAM) -bool GetExperimentTestExperiment1ExpectedValue() { -return false; -} +bool GetExperimentTestExperiment1ExpectedValue() { return false; } -bool GetExperimentTestExperiment2ExpectedValue() { -return true; -} +bool GetExperimentTestExperiment2ExpectedValue() { return true; } bool GetExperimentTestExperiment3ExpectedValue() { - #ifdef NDEBUG -return false; + return false; #else -return true; + return true; #endif - } -bool GetExperimentTestExperiment4ExpectedValue() { -return true; -} +bool GetExperimentTestExperiment4ExpectedValue() { return true; } #elif defined(GPR_WINDOWS) -bool GetExperimentTestExperiment1ExpectedValue() { -return false; -} +bool GetExperimentTestExperiment1ExpectedValue() { return false; } -bool GetExperimentTestExperiment2ExpectedValue() { -return false; -} +bool GetExperimentTestExperiment2ExpectedValue() { return false; } bool GetExperimentTestExperiment3ExpectedValue() { #ifdef NDEBUG -return false; + return false; #else -return true; + return true; #endif - } -bool GetExperimentTestExperiment4ExpectedValue() { -return true; -} +bool GetExperimentTestExperiment4ExpectedValue() { return true; } #else bool GetExperimentTestExperiment1ExpectedValue() { #ifdef NDEBUG -return false; + return false; #else -return true; + return true; #endif - } bool GetExperimentTestExperiment2ExpectedValue() { #ifdef NDEBUG -return false; + return false; #else -return true; + return true; #endif - } bool GetExperimentTestExperiment3ExpectedValue() { #ifdef NDEBUG -return false; + return false; #else -return true; + return true; #endif - } -bool GetExperimentTestExperiment4ExpectedValue() { -return false; -} +bool GetExperimentTestExperiment4ExpectedValue() { return false; } #endif TEST(ExperimentsTest, CheckExperimentValuesTest) { - ASSERT_EQ(grpc_core::IsTestExperiment1Enabled(), GetExperimentTestExperiment1ExpectedValue()); @@ -122,15 +100,13 @@ TEST(ExperimentsTest, CheckExperimentValuesTest) { ASSERT_EQ(grpc_core::IsTestExperiment4Enabled(), GetExperimentTestExperiment4ExpectedValue()); - } -#endif // GRPC_EXPERIMENTS_ARE_FINAL +#endif // GRPC_EXPERIMENTS_ARE_FINAL int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); grpc_core::LoadTestOnlyExperimentsFromMetadata( - grpc_core::g_test_experiment_metadata, grpc_core::kNumTestExperiments); + grpc_core::g_test_experiment_metadata, grpc_core::kNumTestExperiments); return RUN_ALL_TESTS(); } - diff --git a/test/core/experiments/fixtures/experiments.cc b/test/core/experiments/fixtures/experiments.cc index 259e1441ad2..8352ffb7ee4 100644 --- a/test/core/experiments/fixtures/experiments.cc +++ b/test/core/experiments/fixtures/experiments.cc @@ -14,10 +14,10 @@ // Auto generated by tools/codegen/core/gen_experiments.py -#include - #include "test/core/experiments/fixtures/experiments.h" +#include + #ifndef GRPC_EXPERIMENTS_ARE_FINAL #if defined(GRPC_CFSTREAM) @@ -35,15 +35,20 @@ const bool kDefaultForDebugOnly = false; #else const bool kDefaultForDebugOnly = true; #endif -} +} // namespace namespace grpc_core { const ExperimentMetadata g_test_experiment_metadata[] = { - {"test_experiment_1", description_test_experiment_1, additional_constraints_test_experiment_1, nullptr, 0, false, true}, - {"test_experiment_2", description_test_experiment_2, additional_constraints_test_experiment_2, nullptr, 0, true, true}, - {"test_experiment_3", description_test_experiment_3, additional_constraints_test_experiment_3, nullptr, 0, kDefaultForDebugOnly, true}, - {"test_experiment_4", description_test_experiment_4, additional_constraints_test_experiment_4, nullptr, 0, true, true}, + {"test_experiment_1", description_test_experiment_1, + additional_constraints_test_experiment_1, nullptr, 0, false, true}, + {"test_experiment_2", description_test_experiment_2, + additional_constraints_test_experiment_2, nullptr, 0, true, true}, + {"test_experiment_3", description_test_experiment_3, + additional_constraints_test_experiment_3, nullptr, 0, kDefaultForDebugOnly, + true}, + {"test_experiment_4", description_test_experiment_4, + additional_constraints_test_experiment_4, nullptr, 0, true, true}, }; } // namespace grpc_core @@ -63,15 +68,20 @@ const bool kDefaultForDebugOnly = false; #else const bool kDefaultForDebugOnly = true; #endif -} +} // namespace namespace grpc_core { const ExperimentMetadata g_test_experiment_metadata[] = { - {"test_experiment_1", description_test_experiment_1, additional_constraints_test_experiment_1, nullptr, 0, false, true}, - {"test_experiment_2", description_test_experiment_2, additional_constraints_test_experiment_2, nullptr, 0, false, true}, - {"test_experiment_3", description_test_experiment_3, additional_constraints_test_experiment_3, nullptr, 0, kDefaultForDebugOnly, true}, - {"test_experiment_4", description_test_experiment_4, additional_constraints_test_experiment_4, nullptr, 0, true, true}, + {"test_experiment_1", description_test_experiment_1, + additional_constraints_test_experiment_1, nullptr, 0, false, true}, + {"test_experiment_2", description_test_experiment_2, + additional_constraints_test_experiment_2, nullptr, 0, false, true}, + {"test_experiment_3", description_test_experiment_3, + additional_constraints_test_experiment_3, nullptr, 0, kDefaultForDebugOnly, + true}, + {"test_experiment_4", description_test_experiment_4, + additional_constraints_test_experiment_4, nullptr, 0, true, true}, }; } // namespace grpc_core @@ -91,15 +101,22 @@ const bool kDefaultForDebugOnly = false; #else const bool kDefaultForDebugOnly = true; #endif -} +} // namespace namespace grpc_core { const ExperimentMetadata g_test_experiment_metadata[] = { - {"test_experiment_1", description_test_experiment_1, additional_constraints_test_experiment_1, nullptr, 0, kDefaultForDebugOnly, true}, - {"test_experiment_2", description_test_experiment_2, additional_constraints_test_experiment_2, nullptr, 0, kDefaultForDebugOnly, true}, - {"test_experiment_3", description_test_experiment_3, additional_constraints_test_experiment_3, nullptr, 0, kDefaultForDebugOnly, true}, - {"test_experiment_4", description_test_experiment_4, additional_constraints_test_experiment_4, nullptr, 0, false, true}, + {"test_experiment_1", description_test_experiment_1, + additional_constraints_test_experiment_1, nullptr, 0, kDefaultForDebugOnly, + true}, + {"test_experiment_2", description_test_experiment_2, + additional_constraints_test_experiment_2, nullptr, 0, kDefaultForDebugOnly, + true}, + {"test_experiment_3", description_test_experiment_3, + additional_constraints_test_experiment_3, nullptr, 0, kDefaultForDebugOnly, + true}, + {"test_experiment_4", description_test_experiment_4, + additional_constraints_test_experiment_4, nullptr, 0, false, true}, }; } // namespace grpc_core diff --git a/test/core/experiments/fixtures/experiments.h b/test/core/experiments/fixtures/experiments.h index 8a85ddb5171..d49b2227047 100644 --- a/test/core/experiments/fixtures/experiments.h +++ b/test/core/experiments/fixtures/experiments.h @@ -63,13 +63,13 @@ inline bool IsTestExperiment2Enabled() { return true; } #ifndef NDEBUG #define GRPC_EXPERIMENT_IS_INCLUDED_TEST_EXPERIMENT_3 #endif -inline bool IsTestExperiment3Enabled() { +inline bool IsTestExperiment3Enabled() { #ifdef NDEBUG -return false; + return false; #else -return true; + return true; #endif - } +} #define GRPC_EXPERIMENT_IS_INCLUDED_TEST_EXPERIMENT_4 inline bool IsTestExperiment4Enabled() { return true; } @@ -79,13 +79,13 @@ inline bool IsTestExperiment2Enabled() { return false; } #ifndef NDEBUG #define GRPC_EXPERIMENT_IS_INCLUDED_TEST_EXPERIMENT_3 #endif -inline bool IsTestExperiment3Enabled() { +inline bool IsTestExperiment3Enabled() { #ifdef NDEBUG -return false; + return false; #else -return true; + return true; #endif - } +} #define GRPC_EXPERIMENT_IS_INCLUDED_TEST_EXPERIMENT_4 inline bool IsTestExperiment4Enabled() { return true; } @@ -93,33 +93,33 @@ inline bool IsTestExperiment4Enabled() { return true; } #ifndef NDEBUG #define GRPC_EXPERIMENT_IS_INCLUDED_TEST_EXPERIMENT_1 #endif -inline bool IsTestExperiment1Enabled() { +inline bool IsTestExperiment1Enabled() { #ifdef NDEBUG -return false; + return false; #else -return true; + return true; #endif - } +} #ifndef NDEBUG #define GRPC_EXPERIMENT_IS_INCLUDED_TEST_EXPERIMENT_2 #endif -inline bool IsTestExperiment2Enabled() { +inline bool IsTestExperiment2Enabled() { #ifdef NDEBUG -return false; + return false; #else -return true; + return true; #endif - } +} #ifndef NDEBUG #define GRPC_EXPERIMENT_IS_INCLUDED_TEST_EXPERIMENT_3 #endif -inline bool IsTestExperiment3Enabled() { +inline bool IsTestExperiment3Enabled() { #ifdef NDEBUG -return false; + return false; #else -return true; + return true; #endif - } +} inline bool IsTestExperiment4Enabled() { return false; } #endif @@ -132,13 +132,21 @@ enum ExperimentIds { kNumTestExperiments }; #define GRPC_EXPERIMENT_IS_INCLUDED_TEST_EXPERIMENT_1 -inline bool IsTestExperiment1Enabled() { return IsTestExperimentEnabled(kExperimentIdTestExperiment1); } +inline bool IsTestExperiment1Enabled() { + return IsTestExperimentEnabled(kExperimentIdTestExperiment1); +} #define GRPC_EXPERIMENT_IS_INCLUDED_TEST_EXPERIMENT_2 -inline bool IsTestExperiment2Enabled() { return IsTestExperimentEnabled(kExperimentIdTestExperiment2); } +inline bool IsTestExperiment2Enabled() { + return IsTestExperimentEnabled(kExperimentIdTestExperiment2); +} #define GRPC_EXPERIMENT_IS_INCLUDED_TEST_EXPERIMENT_3 -inline bool IsTestExperiment3Enabled() { return IsTestExperimentEnabled(kExperimentIdTestExperiment3); } +inline bool IsTestExperiment3Enabled() { + return IsTestExperimentEnabled(kExperimentIdTestExperiment3); +} #define GRPC_EXPERIMENT_IS_INCLUDED_TEST_EXPERIMENT_4 -inline bool IsTestExperiment4Enabled() { return IsTestExperimentEnabled(kExperimentIdTestExperiment4); } +inline bool IsTestExperiment4Enabled() { + return IsTestExperimentEnabled(kExperimentIdTestExperiment4); +} extern const ExperimentMetadata g_test_experiment_metadata[kNumTestExperiments];