Debian Codegraph @

src/core/lib/experiments/experiments.h

raw
1 // Copyright 2022 gRPC authors.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 // Automatically generated by tools/codegen/core/gen_experiments.py
16
17 #ifndef GRPC_CORE_LIB_EXPERIMENTS_EXPERIMENTS_H
18 #define GRPC_CORE_LIB_EXPERIMENTS_EXPERIMENTS_H
19
20 #include <grpc/support/port_platform.h>
21
22 #include <stddef.h>
23
24 #include "src/core/lib/experiments/config.h"
25
26 namespace grpc_core {
27
28 inline bool IsTcpFrameSizeTuningEnabled() { return IsExperimentEnabled(0); }
29 inline bool IsTcpReadChunksEnabled() { return IsExperimentEnabled(1); }
30 inline bool IsTcpRcvLowatEnabled() { return IsExperimentEnabled(2); }
31 inline bool IsPeerStateBasedFramingEnabled() { return IsExperimentEnabled(3); }
32 inline bool IsFlowControlFixesEnabled() { return IsExperimentEnabled(4); }
33 inline bool IsMemoryPressureControllerEnabled() {
34 return IsExperimentEnabled(5);
35 }
36 inline bool IsPeriodicResourceQuotaReclamationEnabled() {
37 return IsExperimentEnabled(6);
38 }
39 inline bool IsUnconstrainedMaxQuotaBufferSizeEnabled() {
40 return IsExperimentEnabled(7);
41 }
42 inline bool IsNewHpackHuffmanDecoderEnabled() { return IsExperimentEnabled(8); }
43 inline bool IsEventEngineClientEnabled() { return IsExperimentEnabled(9); }
44 inline bool IsMonitoringExperimentEnabled() { return IsExperimentEnabled(10); }
45 inline bool IsPromiseBasedClientCallEnabled() {
46 return IsExperimentEnabled(11);
47 }
48 inline bool IsPosixEventEngineEnablePollingEnabled() {
49 return IsExperimentEnabled(12);
50 }
51
52 struct ExperimentMetadata {
53 const char* name;
54 const char* description;
55 bool default_value;
56 };
57
58 constexpr const size_t kNumExperiments = 13;
59 extern const ExperimentMetadata g_experiment_metadata[kNumExperiments];
60
61 } // namespace grpc_core
62
63 #endif // GRPC_CORE_LIB_EXPERIMENTS_EXPERIMENTS_H