Automated change: Fix sanity tests
diff --git a/src/core/lib/experiments/experiments.cc b/src/core/lib/experiments/experiments.cc index fed9547..04109e3 100644 --- a/src/core/lib/experiments/experiments.cc +++ b/src/core/lib/experiments/experiments.cc
@@ -15,237 +15,418 @@ // Auto generated by tools/codegen/core/gen_experiments.py #include <grpc/support/port_platform.h> + #include "src/core/lib/experiments/experiments.h" #ifndef GRPC_EXPERIMENTS_ARE_FINAL #if defined(GRPC_CFSTREAM) namespace { -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_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_memory_pressure_controller = "New memory pressure controller"; +const char* const description_memory_pressure_controller = + "New memory pressure controller"; const char* const additional_constraints_memory_pressure_controller = "{}"; -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_event_engine_client = "Use EventEngine clients instead of iomgr's grpc_tcp_client"; +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_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_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_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 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_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 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_transport_supplies_client_latency = "If set, use the transport represented value for client latency in opencensus"; -const char* const additional_constraints_transport_supplies_client_latency = "{}"; -const char* const description_event_engine_listener = "Use EventEngine listeners instead of iomgr's grpc_tcp_server"; +const char* const description_transport_supplies_client_latency = + "If set, use the transport represented value for client latency in " + "opencensus"; +const char* const additional_constraints_transport_supplies_client_latency = + "{}"; +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_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_trace_record_callops = "Enables tracing of call batch initiation and completion."; +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_trace_record_callops = + "Enables tracing of call batch initiation and completion."; const char* const additional_constraints_trace_record_callops = "{}"; -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_work_stealing = "If set, use a work stealing thread pool implementation in EventEngine"; +const char* const description_work_stealing = + "If set, use a work stealing thread pool implementation in EventEngine"; const char* const additional_constraints_work_stealing = "{}"; const char* const description_client_privacy = "If set, client privacy"; const char* const additional_constraints_client_privacy = "{}"; -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_server_privacy = "If set, server privacy"; const char* const additional_constraints_server_privacy = "{}"; -const char* const description_unique_metadata_strings = "Ensure a unique copy of strings from parsed metadata are taken. The hypothesis here is that ref counting these are causing read buffer lifetimes to be extended leading to memory bloat."; +const char* const description_unique_metadata_strings = + "Ensure a unique copy of strings from parsed metadata are taken. The " + "hypothesis here is that ref counting these are causing read buffer " + "lifetimes to be extended leading to memory bloat."; const char* const additional_constraints_unique_metadata_strings = "{}"; -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 = "{}"; -} +} // namespace namespace grpc_core { const ExperimentMetadata g_experiment_metadata[] = { - {"tcp_frame_size_tuning", description_tcp_frame_size_tuning, additional_constraints_tcp_frame_size_tuning, false, true}, - {"tcp_rcv_lowat", description_tcp_rcv_lowat, additional_constraints_tcp_rcv_lowat, false, true}, - {"peer_state_based_framing", description_peer_state_based_framing, additional_constraints_peer_state_based_framing, false, true}, - {"memory_pressure_controller", description_memory_pressure_controller, additional_constraints_memory_pressure_controller, false, true}, - {"unconstrained_max_quota_buffer_size", description_unconstrained_max_quota_buffer_size, additional_constraints_unconstrained_max_quota_buffer_size, false, true}, - {"event_engine_client", description_event_engine_client, additional_constraints_event_engine_client, false, true}, - {"monitoring_experiment", description_monitoring_experiment, additional_constraints_monitoring_experiment, true, true}, - {"promise_based_client_call", description_promise_based_client_call, additional_constraints_promise_based_client_call, false, true}, - {"free_large_allocator", description_free_large_allocator, additional_constraints_free_large_allocator, false, true}, - {"promise_based_server_call", description_promise_based_server_call, additional_constraints_promise_based_server_call, false, true}, - {"transport_supplies_client_latency", description_transport_supplies_client_latency, additional_constraints_transport_supplies_client_latency, false, true}, - {"event_engine_listener", description_event_engine_listener, additional_constraints_event_engine_listener, false, true}, - {"schedule_cancellation_over_write", description_schedule_cancellation_over_write, additional_constraints_schedule_cancellation_over_write, false, true}, - {"trace_record_callops", description_trace_record_callops, additional_constraints_trace_record_callops, false, true}, - {"event_engine_dns", description_event_engine_dns, additional_constraints_event_engine_dns, false, false}, - {"work_stealing", description_work_stealing, additional_constraints_work_stealing, false, false}, - {"client_privacy", description_client_privacy, additional_constraints_client_privacy, false, false}, - {"canary_client_privacy", description_canary_client_privacy, additional_constraints_canary_client_privacy, false, false}, - {"server_privacy", description_server_privacy, additional_constraints_server_privacy, false, false}, - {"unique_metadata_strings", description_unique_metadata_strings, additional_constraints_unique_metadata_strings, true, true}, - {"keepalive_fix", description_keepalive_fix, additional_constraints_keepalive_fix, false, false}, - {"keepalive_server_fix", description_keepalive_server_fix, additional_constraints_keepalive_server_fix, false, false}, + {"tcp_frame_size_tuning", description_tcp_frame_size_tuning, + additional_constraints_tcp_frame_size_tuning, false, true}, + {"tcp_rcv_lowat", description_tcp_rcv_lowat, + additional_constraints_tcp_rcv_lowat, false, true}, + {"peer_state_based_framing", description_peer_state_based_framing, + additional_constraints_peer_state_based_framing, false, true}, + {"memory_pressure_controller", description_memory_pressure_controller, + additional_constraints_memory_pressure_controller, false, true}, + {"unconstrained_max_quota_buffer_size", + description_unconstrained_max_quota_buffer_size, + additional_constraints_unconstrained_max_quota_buffer_size, false, true}, + {"event_engine_client", description_event_engine_client, + additional_constraints_event_engine_client, false, true}, + {"monitoring_experiment", description_monitoring_experiment, + additional_constraints_monitoring_experiment, true, true}, + {"promise_based_client_call", description_promise_based_client_call, + additional_constraints_promise_based_client_call, false, true}, + {"free_large_allocator", description_free_large_allocator, + additional_constraints_free_large_allocator, false, true}, + {"promise_based_server_call", description_promise_based_server_call, + additional_constraints_promise_based_server_call, false, true}, + {"transport_supplies_client_latency", + description_transport_supplies_client_latency, + additional_constraints_transport_supplies_client_latency, false, true}, + {"event_engine_listener", description_event_engine_listener, + additional_constraints_event_engine_listener, false, true}, + {"schedule_cancellation_over_write", + description_schedule_cancellation_over_write, + additional_constraints_schedule_cancellation_over_write, false, true}, + {"trace_record_callops", description_trace_record_callops, + additional_constraints_trace_record_callops, false, true}, + {"event_engine_dns", description_event_engine_dns, + additional_constraints_event_engine_dns, false, false}, + {"work_stealing", description_work_stealing, + additional_constraints_work_stealing, false, false}, + {"client_privacy", description_client_privacy, + additional_constraints_client_privacy, false, false}, + {"canary_client_privacy", description_canary_client_privacy, + additional_constraints_canary_client_privacy, false, false}, + {"server_privacy", description_server_privacy, + additional_constraints_server_privacy, false, false}, + {"unique_metadata_strings", description_unique_metadata_strings, + additional_constraints_unique_metadata_strings, true, true}, + {"keepalive_fix", description_keepalive_fix, + additional_constraints_keepalive_fix, false, false}, + {"keepalive_server_fix", description_keepalive_server_fix, + additional_constraints_keepalive_server_fix, false, false}, }; } // namespace grpc_core #elif defined(GPR_WINDOWS) namespace { -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_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_memory_pressure_controller = "New memory pressure controller"; +const char* const description_memory_pressure_controller = + "New memory pressure controller"; const char* const additional_constraints_memory_pressure_controller = "{}"; -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_event_engine_client = "Use EventEngine clients instead of iomgr's grpc_tcp_client"; +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_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_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_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 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_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 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_transport_supplies_client_latency = "If set, use the transport represented value for client latency in opencensus"; -const char* const additional_constraints_transport_supplies_client_latency = "{}"; -const char* const description_event_engine_listener = "Use EventEngine listeners instead of iomgr's grpc_tcp_server"; +const char* const description_transport_supplies_client_latency = + "If set, use the transport represented value for client latency in " + "opencensus"; +const char* const additional_constraints_transport_supplies_client_latency = + "{}"; +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_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_trace_record_callops = "Enables tracing of call batch initiation and completion."; +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_trace_record_callops = + "Enables tracing of call batch initiation and completion."; const char* const additional_constraints_trace_record_callops = "{}"; -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_work_stealing = "If set, use a work stealing thread pool implementation in EventEngine"; +const char* const description_work_stealing = + "If set, use a work stealing thread pool implementation in EventEngine"; const char* const additional_constraints_work_stealing = "{}"; const char* const description_client_privacy = "If set, client privacy"; const char* const additional_constraints_client_privacy = "{}"; -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_server_privacy = "If set, server privacy"; const char* const additional_constraints_server_privacy = "{}"; -const char* const description_unique_metadata_strings = "Ensure a unique copy of strings from parsed metadata are taken. The hypothesis here is that ref counting these are causing read buffer lifetimes to be extended leading to memory bloat."; +const char* const description_unique_metadata_strings = + "Ensure a unique copy of strings from parsed metadata are taken. The " + "hypothesis here is that ref counting these are causing read buffer " + "lifetimes to be extended leading to memory bloat."; const char* const additional_constraints_unique_metadata_strings = "{}"; -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 = "{}"; -} +} // namespace namespace grpc_core { const ExperimentMetadata g_experiment_metadata[] = { - {"tcp_frame_size_tuning", description_tcp_frame_size_tuning, additional_constraints_tcp_frame_size_tuning, false, true}, - {"tcp_rcv_lowat", description_tcp_rcv_lowat, additional_constraints_tcp_rcv_lowat, false, true}, - {"peer_state_based_framing", description_peer_state_based_framing, additional_constraints_peer_state_based_framing, false, true}, - {"memory_pressure_controller", description_memory_pressure_controller, additional_constraints_memory_pressure_controller, false, true}, - {"unconstrained_max_quota_buffer_size", description_unconstrained_max_quota_buffer_size, additional_constraints_unconstrained_max_quota_buffer_size, false, true}, - {"event_engine_client", description_event_engine_client, additional_constraints_event_engine_client, false, true}, - {"monitoring_experiment", description_monitoring_experiment, additional_constraints_monitoring_experiment, true, true}, - {"promise_based_client_call", description_promise_based_client_call, additional_constraints_promise_based_client_call, false, true}, - {"free_large_allocator", description_free_large_allocator, additional_constraints_free_large_allocator, false, true}, - {"promise_based_server_call", description_promise_based_server_call, additional_constraints_promise_based_server_call, false, true}, - {"transport_supplies_client_latency", description_transport_supplies_client_latency, additional_constraints_transport_supplies_client_latency, false, true}, - {"event_engine_listener", description_event_engine_listener, additional_constraints_event_engine_listener, false, true}, - {"schedule_cancellation_over_write", description_schedule_cancellation_over_write, additional_constraints_schedule_cancellation_over_write, false, true}, - {"trace_record_callops", description_trace_record_callops, additional_constraints_trace_record_callops, false, true}, - {"event_engine_dns", description_event_engine_dns, additional_constraints_event_engine_dns, false, false}, - {"work_stealing", description_work_stealing, additional_constraints_work_stealing, false, false}, - {"client_privacy", description_client_privacy, additional_constraints_client_privacy, false, false}, - {"canary_client_privacy", description_canary_client_privacy, additional_constraints_canary_client_privacy, false, false}, - {"server_privacy", description_server_privacy, additional_constraints_server_privacy, false, false}, - {"unique_metadata_strings", description_unique_metadata_strings, additional_constraints_unique_metadata_strings, true, true}, - {"keepalive_fix", description_keepalive_fix, additional_constraints_keepalive_fix, false, false}, - {"keepalive_server_fix", description_keepalive_server_fix, additional_constraints_keepalive_server_fix, false, false}, + {"tcp_frame_size_tuning", description_tcp_frame_size_tuning, + additional_constraints_tcp_frame_size_tuning, false, true}, + {"tcp_rcv_lowat", description_tcp_rcv_lowat, + additional_constraints_tcp_rcv_lowat, false, true}, + {"peer_state_based_framing", description_peer_state_based_framing, + additional_constraints_peer_state_based_framing, false, true}, + {"memory_pressure_controller", description_memory_pressure_controller, + additional_constraints_memory_pressure_controller, false, true}, + {"unconstrained_max_quota_buffer_size", + description_unconstrained_max_quota_buffer_size, + additional_constraints_unconstrained_max_quota_buffer_size, false, true}, + {"event_engine_client", description_event_engine_client, + additional_constraints_event_engine_client, false, true}, + {"monitoring_experiment", description_monitoring_experiment, + additional_constraints_monitoring_experiment, true, true}, + {"promise_based_client_call", description_promise_based_client_call, + additional_constraints_promise_based_client_call, false, true}, + {"free_large_allocator", description_free_large_allocator, + additional_constraints_free_large_allocator, false, true}, + {"promise_based_server_call", description_promise_based_server_call, + additional_constraints_promise_based_server_call, false, true}, + {"transport_supplies_client_latency", + description_transport_supplies_client_latency, + additional_constraints_transport_supplies_client_latency, false, true}, + {"event_engine_listener", description_event_engine_listener, + additional_constraints_event_engine_listener, false, true}, + {"schedule_cancellation_over_write", + description_schedule_cancellation_over_write, + additional_constraints_schedule_cancellation_over_write, false, true}, + {"trace_record_callops", description_trace_record_callops, + additional_constraints_trace_record_callops, false, true}, + {"event_engine_dns", description_event_engine_dns, + additional_constraints_event_engine_dns, false, false}, + {"work_stealing", description_work_stealing, + additional_constraints_work_stealing, false, false}, + {"client_privacy", description_client_privacy, + additional_constraints_client_privacy, false, false}, + {"canary_client_privacy", description_canary_client_privacy, + additional_constraints_canary_client_privacy, false, false}, + {"server_privacy", description_server_privacy, + additional_constraints_server_privacy, false, false}, + {"unique_metadata_strings", description_unique_metadata_strings, + additional_constraints_unique_metadata_strings, true, true}, + {"keepalive_fix", description_keepalive_fix, + additional_constraints_keepalive_fix, false, false}, + {"keepalive_server_fix", description_keepalive_server_fix, + additional_constraints_keepalive_server_fix, false, false}, }; } // namespace grpc_core #else namespace { -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_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_memory_pressure_controller = "New memory pressure controller"; +const char* const description_memory_pressure_controller = + "New memory pressure controller"; const char* const additional_constraints_memory_pressure_controller = "{}"; -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_event_engine_client = "Use EventEngine clients instead of iomgr's grpc_tcp_client"; +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_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_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_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 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_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 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_transport_supplies_client_latency = "If set, use the transport represented value for client latency in opencensus"; -const char* const additional_constraints_transport_supplies_client_latency = "{}"; -const char* const description_event_engine_listener = "Use EventEngine listeners instead of iomgr's grpc_tcp_server"; +const char* const description_transport_supplies_client_latency = + "If set, use the transport represented value for client latency in " + "opencensus"; +const char* const additional_constraints_transport_supplies_client_latency = + "{}"; +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_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_trace_record_callops = "Enables tracing of call batch initiation and completion."; +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_trace_record_callops = + "Enables tracing of call batch initiation and completion."; const char* const additional_constraints_trace_record_callops = "{}"; -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_work_stealing = "If set, use a work stealing thread pool implementation in EventEngine"; +const char* const description_work_stealing = + "If set, use a work stealing thread pool implementation in EventEngine"; const char* const additional_constraints_work_stealing = "{}"; const char* const description_client_privacy = "If set, client privacy"; const char* const additional_constraints_client_privacy = "{}"; -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_server_privacy = "If set, server privacy"; const char* const additional_constraints_server_privacy = "{}"; -const char* const description_unique_metadata_strings = "Ensure a unique copy of strings from parsed metadata are taken. The hypothesis here is that ref counting these are causing read buffer lifetimes to be extended leading to memory bloat."; +const char* const description_unique_metadata_strings = + "Ensure a unique copy of strings from parsed metadata are taken. The " + "hypothesis here is that ref counting these are causing read buffer " + "lifetimes to be extended leading to memory bloat."; const char* const additional_constraints_unique_metadata_strings = "{}"; -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 = "{}"; -} +} // namespace namespace grpc_core { const ExperimentMetadata g_experiment_metadata[] = { - {"tcp_frame_size_tuning", description_tcp_frame_size_tuning, additional_constraints_tcp_frame_size_tuning, false, true}, - {"tcp_rcv_lowat", description_tcp_rcv_lowat, additional_constraints_tcp_rcv_lowat, false, true}, - {"peer_state_based_framing", description_peer_state_based_framing, additional_constraints_peer_state_based_framing, false, true}, - {"memory_pressure_controller", description_memory_pressure_controller, additional_constraints_memory_pressure_controller, false, true}, - {"unconstrained_max_quota_buffer_size", description_unconstrained_max_quota_buffer_size, additional_constraints_unconstrained_max_quota_buffer_size, false, true}, - {"event_engine_client", description_event_engine_client, additional_constraints_event_engine_client, false, true}, - {"monitoring_experiment", description_monitoring_experiment, additional_constraints_monitoring_experiment, true, true}, - {"promise_based_client_call", description_promise_based_client_call, additional_constraints_promise_based_client_call, false, true}, - {"free_large_allocator", description_free_large_allocator, additional_constraints_free_large_allocator, false, true}, - {"promise_based_server_call", description_promise_based_server_call, additional_constraints_promise_based_server_call, false, true}, - {"transport_supplies_client_latency", description_transport_supplies_client_latency, additional_constraints_transport_supplies_client_latency, false, true}, - {"event_engine_listener", description_event_engine_listener, additional_constraints_event_engine_listener, false, true}, - {"schedule_cancellation_over_write", description_schedule_cancellation_over_write, additional_constraints_schedule_cancellation_over_write, false, true}, - {"trace_record_callops", description_trace_record_callops, additional_constraints_trace_record_callops, false, true}, - {"event_engine_dns", description_event_engine_dns, additional_constraints_event_engine_dns, false, false}, - {"work_stealing", description_work_stealing, additional_constraints_work_stealing, false, false}, - {"client_privacy", description_client_privacy, additional_constraints_client_privacy, false, false}, - {"canary_client_privacy", description_canary_client_privacy, additional_constraints_canary_client_privacy, false, false}, - {"server_privacy", description_server_privacy, additional_constraints_server_privacy, false, false}, - {"unique_metadata_strings", description_unique_metadata_strings, additional_constraints_unique_metadata_strings, true, true}, - {"keepalive_fix", description_keepalive_fix, additional_constraints_keepalive_fix, false, false}, - {"keepalive_server_fix", description_keepalive_server_fix, additional_constraints_keepalive_server_fix, false, false}, + {"tcp_frame_size_tuning", description_tcp_frame_size_tuning, + additional_constraints_tcp_frame_size_tuning, false, true}, + {"tcp_rcv_lowat", description_tcp_rcv_lowat, + additional_constraints_tcp_rcv_lowat, false, true}, + {"peer_state_based_framing", description_peer_state_based_framing, + additional_constraints_peer_state_based_framing, false, true}, + {"memory_pressure_controller", description_memory_pressure_controller, + additional_constraints_memory_pressure_controller, false, true}, + {"unconstrained_max_quota_buffer_size", + description_unconstrained_max_quota_buffer_size, + additional_constraints_unconstrained_max_quota_buffer_size, false, true}, + {"event_engine_client", description_event_engine_client, + additional_constraints_event_engine_client, false, true}, + {"monitoring_experiment", description_monitoring_experiment, + additional_constraints_monitoring_experiment, true, true}, + {"promise_based_client_call", description_promise_based_client_call, + additional_constraints_promise_based_client_call, false, true}, + {"free_large_allocator", description_free_large_allocator, + additional_constraints_free_large_allocator, false, true}, + {"promise_based_server_call", description_promise_based_server_call, + additional_constraints_promise_based_server_call, false, true}, + {"transport_supplies_client_latency", + description_transport_supplies_client_latency, + additional_constraints_transport_supplies_client_latency, false, true}, + {"event_engine_listener", description_event_engine_listener, + additional_constraints_event_engine_listener, false, true}, + {"schedule_cancellation_over_write", + description_schedule_cancellation_over_write, + additional_constraints_schedule_cancellation_over_write, false, true}, + {"trace_record_callops", description_trace_record_callops, + additional_constraints_trace_record_callops, false, true}, + {"event_engine_dns", description_event_engine_dns, + additional_constraints_event_engine_dns, false, false}, + {"work_stealing", description_work_stealing, + additional_constraints_work_stealing, false, false}, + {"client_privacy", description_client_privacy, + additional_constraints_client_privacy, false, false}, + {"canary_client_privacy", description_canary_client_privacy, + additional_constraints_canary_client_privacy, false, false}, + {"server_privacy", description_server_privacy, + additional_constraints_server_privacy, false, false}, + {"unique_metadata_strings", description_unique_metadata_strings, + additional_constraints_unique_metadata_strings, true, true}, + {"keepalive_fix", description_keepalive_fix, + additional_constraints_keepalive_fix, false, false}, + {"keepalive_server_fix", description_keepalive_server_fix, + additional_constraints_keepalive_server_fix, false, false}, }; } // namespace grpc_core
diff --git a/src/core/lib/experiments/experiments.h b/src/core/lib/experiments/experiments.h index 40e3b31..00f705c 100644 --- a/src/core/lib/experiments/experiments.h +++ b/src/core/lib/experiments/experiments.h
@@ -51,6 +51,7 @@ #include <grpc/support/port_platform.h> #include <stddef.h> + #include "src/core/lib/experiments/config.h" namespace grpc_core { @@ -144,9 +145,13 @@ #define GRPC_EXPERIMENT_IS_INCLUDED_PEER_STATE_BASED_FRAMING inline bool IsPeerStateBasedFramingEnabled() { return IsExperimentEnabled(2); } #define GRPC_EXPERIMENT_IS_INCLUDED_MEMORY_PRESSURE_CONTROLLER -inline bool IsMemoryPressureControllerEnabled() { return IsExperimentEnabled(3); } +inline bool IsMemoryPressureControllerEnabled() { + return IsExperimentEnabled(3); +} #define GRPC_EXPERIMENT_IS_INCLUDED_UNCONSTRAINED_MAX_QUOTA_BUFFER_SIZE -inline bool IsUnconstrainedMaxQuotaBufferSizeEnabled() { return IsExperimentEnabled(4); } +inline bool IsUnconstrainedMaxQuotaBufferSizeEnabled() { + return IsExperimentEnabled(4); +} #define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_CLIENT inline bool IsEventEngineClientEnabled() { return IsExperimentEnabled(5); } #define GRPC_EXPERIMENT_IS_INCLUDED_MONITORING_EXPERIMENT @@ -158,11 +163,15 @@ #define GRPC_EXPERIMENT_IS_INCLUDED_PROMISE_BASED_SERVER_CALL inline bool IsPromiseBasedServerCallEnabled() { return IsExperimentEnabled(9); } #define GRPC_EXPERIMENT_IS_INCLUDED_TRANSPORT_SUPPLIES_CLIENT_LATENCY -inline bool IsTransportSuppliesClientLatencyEnabled() { return IsExperimentEnabled(10); } +inline bool IsTransportSuppliesClientLatencyEnabled() { + return IsExperimentEnabled(10); +} #define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_LISTENER inline bool IsEventEngineListenerEnabled() { return IsExperimentEnabled(11); } #define GRPC_EXPERIMENT_IS_INCLUDED_SCHEDULE_CANCELLATION_OVER_WRITE -inline bool IsScheduleCancellationOverWriteEnabled() { return IsExperimentEnabled(12); } +inline bool IsScheduleCancellationOverWriteEnabled() { + return IsExperimentEnabled(12); +} #define GRPC_EXPERIMENT_IS_INCLUDED_TRACE_RECORD_CALLOPS inline bool IsTraceRecordCallopsEnabled() { return IsExperimentEnabled(13); } #define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_DNS
diff --git a/test/core/experiments/experiments_test.cc b/test/core/experiments/experiments_test.cc index 9941d9e..618cccd 100644 --- a/test/core/experiments/experiments_test.cc +++ b/test/core/experiments/experiments_test.cc
@@ -14,10 +14,10 @@ // Auto generated by tools/codegen/core/gen_experiments.py - #include <grpc/support/port_platform.h> #include "test/core/experiments/fixtures/experiments.h" + #include "gtest/gtest.h" #include "src/core/lib/experiments/config.h" @@ -25,89 +25,68 @@ #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()); @@ -119,15 +98,13 @@ 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 060c7b99..7d13644 100644 --- a/test/core/experiments/fixtures/experiments.cc +++ b/test/core/experiments/fixtures/experiments.cc
@@ -15,6 +15,7 @@ // Auto generated by tools/codegen/core/gen_experiments.py #include <grpc/support/port_platform.h> + #include "test/core/experiments/fixtures/experiments.h" #ifndef GRPC_EXPERIMENTS_ARE_FINAL @@ -34,15 +35,19 @@ #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, false, true}, - {"test_experiment_2", description_test_experiment_2, additional_constraints_test_experiment_2, true, true}, - {"test_experiment_3", description_test_experiment_3, additional_constraints_test_experiment_3, kDefaultForDebugOnly, true}, - {"test_experiment_4", description_test_experiment_4, additional_constraints_test_experiment_4, true, true}, + {"test_experiment_1", description_test_experiment_1, + additional_constraints_test_experiment_1, false, true}, + {"test_experiment_2", description_test_experiment_2, + additional_constraints_test_experiment_2, true, true}, + {"test_experiment_3", description_test_experiment_3, + additional_constraints_test_experiment_3, kDefaultForDebugOnly, true}, + {"test_experiment_4", description_test_experiment_4, + additional_constraints_test_experiment_4, true, true}, }; } // namespace grpc_core @@ -62,15 +67,19 @@ #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, false, true}, - {"test_experiment_2", description_test_experiment_2, additional_constraints_test_experiment_2, false, true}, - {"test_experiment_3", description_test_experiment_3, additional_constraints_test_experiment_3, kDefaultForDebugOnly, true}, - {"test_experiment_4", description_test_experiment_4, additional_constraints_test_experiment_4, true, true}, + {"test_experiment_1", description_test_experiment_1, + additional_constraints_test_experiment_1, false, true}, + {"test_experiment_2", description_test_experiment_2, + additional_constraints_test_experiment_2, false, true}, + {"test_experiment_3", description_test_experiment_3, + additional_constraints_test_experiment_3, kDefaultForDebugOnly, true}, + {"test_experiment_4", description_test_experiment_4, + additional_constraints_test_experiment_4, true, true}, }; } // namespace grpc_core @@ -90,15 +99,19 @@ #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, kDefaultForDebugOnly, true}, - {"test_experiment_2", description_test_experiment_2, additional_constraints_test_experiment_2, kDefaultForDebugOnly, true}, - {"test_experiment_3", description_test_experiment_3, additional_constraints_test_experiment_3, kDefaultForDebugOnly, true}, - {"test_experiment_4", description_test_experiment_4, additional_constraints_test_experiment_4, false, true}, + {"test_experiment_1", description_test_experiment_1, + additional_constraints_test_experiment_1, kDefaultForDebugOnly, true}, + {"test_experiment_2", description_test_experiment_2, + additional_constraints_test_experiment_2, kDefaultForDebugOnly, true}, + {"test_experiment_3", description_test_experiment_3, + additional_constraints_test_experiment_3, kDefaultForDebugOnly, true}, + {"test_experiment_4", description_test_experiment_4, + additional_constraints_test_experiment_4, false, true}, }; } // namespace grpc_core
diff --git a/test/core/experiments/fixtures/experiments.h b/test/core/experiments/fixtures/experiments.h index c078003..f296581 100644 --- a/test/core/experiments/fixtures/experiments.h +++ b/test/core/experiments/fixtures/experiments.h
@@ -51,6 +51,7 @@ #include <grpc/support/port_platform.h> #include <stddef.h> + #include "src/core/lib/experiments/config.h" namespace grpc_core { @@ -64,13 +65,13 @@ #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; } @@ -80,13 +81,13 @@ #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; } @@ -94,33 +95,33 @@ #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