1pub const TESTING: bool = cfg!(feature = "testing");
5
6pub mod query {
7 use reifydb_value::byte_size::ByteSize;
8
9 pub const ORACLE_WINDOW_SIZE: u64 = 500;
10 pub const ORACLE_WINDOW_SIZE_TESTING: u64 = 16;
11
12 pub const ROW_BATCH_SIZE: u16 = 128;
13 pub const ROW_BATCH_SIZE_TESTING: u16 = 4;
14
15 pub const MEMORY_LIMIT: ByteSize = ByteSize::from_gib(1);
16 pub const MEMORY_LIMIT_TESTING: ByteSize = ByteSize::from_mib(1);
17}
18
19pub mod retention {
20 use reifydb_value::value::duration::Duration;
21
22 pub const EVICT_INTERVAL: Duration = Duration::from_seconds_const(60);
23 pub const EVICT_INTERVAL_TESTING: Duration = Duration::from_seconds_const(60);
24
25 pub const EVICT_BATCH_SIZE: u64 = 1024;
26 pub const EVICT_BATCH_SIZE_TESTING: u64 = 4;
27
28 pub const EVICT_MAX_BATCHES_PER_TICK: u64 = 8;
29 pub const EVICT_MAX_BATCHES_PER_TICK_TESTING: u64 = 2;
30
31 pub const STARTUP_GRACE: Duration = Duration::from_seconds_const(300);
32 pub const STARTUP_GRACE_TESTING: Duration = Duration::from_seconds_const(300);
33
34 pub const MAX_HORIZON_FLOOR: Duration = Duration::from_hours_const(7 * 24);
35 pub const MAX_HORIZON_FLOOR_TESTING: Duration = Duration::from_hours_const(7 * 24);
36
37 pub const EPOCH_BUCKET_INTERVAL: Duration = Duration::from_seconds_const(60);
38 pub const EPOCH_BUCKET_INTERVAL_TESTING: Duration = Duration::from_seconds_const(60);
39
40 pub const HISTORICAL_GC_BATCH_SIZE: u64 = 50_000;
41 pub const HISTORICAL_GC_BATCH_SIZE_TESTING: u64 = 16;
42
43 pub const HISTORICAL_GC_INTERVAL: Duration = Duration::from_seconds_const(30);
44 pub const HISTORICAL_GC_INTERVAL_TESTING: Duration = Duration::from_seconds_const(30);
45}
46
47pub mod cdc {
48 use reifydb_value::{byte_size::ByteSize, value::duration::Duration};
49
50 pub const TTL: Option<Duration> = None;
51 pub const TTL_TESTING: Option<Duration> = None;
52
53 pub const TTL_SCAN_INTERVAL: Duration = Duration::from_seconds_const(30);
54 pub const TTL_SCAN_INTERVAL_TESTING: Duration = Duration::from_seconds_const(30);
55
56 pub const TTL_SCAN_BATCH_SIZE: u64 = 8192;
57 pub const TTL_SCAN_BATCH_SIZE_TESTING: u64 = 16;
58
59 pub const WAL_AUTOCHECKPOINT_PAGES: u64 = 1_000_000;
60 pub const WAL_AUTOCHECKPOINT_PAGES_TESTING: u64 = 64;
61
62 pub const COMMIT_BUFFER: ByteSize = ByteSize::from_mib(256);
63 pub const COMMIT_BUFFER_TESTING: ByteSize = ByteSize::from_kib(64);
64
65 pub const BLOCK_CUT: ByteSize = ByteSize::from_mib(4);
66 pub const BLOCK_CUT_TESTING: ByteSize = ByteSize::from_kib(4);
67
68 pub const READ_BUFFER: ByteSize = ByteSize::from_mib(256);
69 pub const READ_BUFFER_TESTING: ByteSize = ByteSize::from_kib(64);
70
71 pub const CONSUME_WAIT_TIMEOUT: Duration = Duration::from_seconds_const(30);
72 pub const CONSUME_WAIT_TIMEOUT_TESTING: Duration = Duration::from_seconds_const(30);
73}
74
75pub mod store {
76 use reifydb_value::{byte_size::ByteSize, value::duration::Duration};
77
78 pub const MULTI_POINT_BUFFER_SHARD: ByteSize = ByteSize::from_mib(4);
79 pub const MULTI_POINT_BUFFER_SHARD_TESTING: ByteSize = ByteSize::from_kib(16);
80
81 pub const MULTI_RANGE_BUFFER_SHARD: ByteSize = ByteSize::from_mib(4);
82 pub const MULTI_RANGE_BUFFER_SHARD_TESTING: ByteSize = ByteSize::from_kib(16);
83
84 pub const MULTI_POINT_BUFFER_SHARDS: u16 = 16;
85 pub const MULTI_POINT_BUFFER_SHARDS_TESTING: u16 = 2;
86
87 pub const MULTI_RANGE_BUFFER_SHARDS: u16 = 16;
88 pub const MULTI_RANGE_BUFFER_SHARDS_TESTING: u16 = 2;
89
90 pub const MULTI_FLUSH_INTERVAL: Duration = Duration::from_seconds_const(60);
91 pub const MULTI_FLUSH_INTERVAL_TESTING: Duration = Duration::from_seconds_const(60);
92
93 pub const MULTI_FLUSH_BUDGET: ByteSize = ByteSize::from_mib(4);
94 pub const MULTI_FLUSH_BUDGET_TESTING: ByteSize = ByteSize::from_kib(16);
95
96 pub const MULTI_WAL_AUTOCHECKPOINT_PAGES: u64 = 50_000;
97 pub const MULTI_WAL_AUTOCHECKPOINT_PAGES_TESTING: u64 = 64;
98
99 pub const OPERATOR_RANGE_TIER: ByteSize = ByteSize::from_mib(1);
100 pub const OPERATOR_RANGE_TIER_TESTING: ByteSize = ByteSize::from_kib(32);
101
102 pub const OPERATOR_RANGE_RELIEF_INTERVAL: Duration = Duration::from_seconds_const(1);
103
104 pub const OPERATOR_RESIDENT_BUDGET: ByteSize = ByteSize::from_mib(128);
105 pub const OPERATOR_RESIDENT_BUDGET_TESTING: ByteSize = ByteSize::from_kib(64);
106
107 pub const OPERATOR_RESIDENT_ENTRIES: u64 = 1_000_000;
108 pub const OPERATOR_RESIDENT_ENTRIES_TESTING: u64 = 640;
109
110 pub const OPERATOR_DIRTY_BUDGET: ByteSize = ByteSize::from_mib(128);
111 pub const OPERATOR_DIRTY_BUDGET_TESTING: ByteSize = ByteSize::from_kib(64);
112
113 pub const OPERATOR_FLUSH_INTERVAL: Duration = Duration::from_seconds_const(300);
114 pub const OPERATOR_FLUSH_INTERVAL_TESTING: Duration = Duration::from_seconds_const(60);
115
116 pub const OPERATOR_FILTER_KEYS: u64 = 16_000_000;
117 pub const OPERATOR_FILTER_KEYS_TESTING: u64 = 4_096;
118
119 pub const OPERATOR_FLUSH_SLICE: ByteSize = ByteSize::from_mib(4);
120 pub const OPERATOR_FLUSH_SLICE_TESTING: ByteSize = ByteSize::from_kib(16);
121
122 pub const OPERATOR_WAL_AUTOCHECKPOINT_PAGES: u64 = 1_000_000;
123 pub const OPERATOR_WAL_AUTOCHECKPOINT_PAGES_TESTING: u64 = 64;
124}
125
126pub mod flow {
127 use reifydb_value::{byte_size::ByteSize, value::duration::Duration};
128
129 pub const TICK: Duration = Duration::from_seconds_const(1);
130 pub const TICK_TESTING: Duration = Duration::from_seconds_const(1);
131
132 pub const SAMPLE_INTERVAL: Duration = Duration::from_seconds_const(60);
133 pub const SAMPLE_INTERVAL_TESTING: Duration = Duration::from_seconds_const(60);
134
135 pub const BACKLOG_MEMORY_LIMIT: ByteSize = ByteSize::from_mib(64);
136 pub const BACKLOG_MEMORY_LIMIT_TESTING: ByteSize = ByteSize::from_kib(64);
137
138 pub const PULL_BATCH: ByteSize = ByteSize::from_mib(8);
139 pub const PULL_BATCH_TESTING: ByteSize = ByteSize::from_kib(16);
140
141 pub const LOAD_BATCH: ByteSize = ByteSize::from_mib(8);
142 pub const LOAD_BATCH_TESTING: ByteSize = ByteSize::from_kib(16);
143
144 pub const JOIN_PROBE_BLOCK_SIZE: u64 = 1024;
145 pub const JOIN_PROBE_BLOCK_SIZE_TESTING: u64 = 16;
146}
147
148pub mod threads {
149 pub const ASYNC: u16 = 1;
150 pub const ASYNC_TESTING: u16 = 1;
151
152 pub const COORDINATION: u16 = 2;
153 pub const COORDINATION_TESTING: u16 = 1;
154
155 pub const FLOW: u16 = 2;
156 pub const FLOW_TESTING: u16 = 2;
157
158 pub const TASK: u16 = 2;
159 pub const TASK_TESTING: u16 = 1;
160
161 pub const COMPUTE: u16 = 2;
162 pub const COMPUTE_TESTING: u16 = 1;
163
164 pub const MAINTENANCE: u16 = 1;
165 pub const MAINTENANCE_TESTING: u16 = 1;
166
167 pub const SUBSCRIPTION_WORKER: u16 = 0;
168 pub const SUBSCRIPTION_WORKER_TESTING: u16 = 0;
169}
170
171pub mod metrics {
172 use reifydb_value::value::duration::Duration;
173
174 pub const FLUSH_INTERVAL: Duration = Duration::from_seconds_const(10);
175 pub const FLUSH_INTERVAL_TESTING: Duration = Duration::from_seconds_const(10);
176
177 pub const SAMPLE_INTERVAL: Duration = Duration::from_seconds_const(10);
178 pub const SAMPLE_INTERVAL_TESTING: Duration = Duration::from_seconds_const(10);
179
180 pub const SNAPSHOT_INTERVAL: Option<Duration> = None;
181 pub const SNAPSHOT_INTERVAL_TESTING: Option<Duration> = None;
182}
183
184pub mod queue {
185 use reifydb_value::value::duration::Duration;
186
187 pub const LEASE_REAP_INTERVAL: Duration = Duration::from_seconds_const(5);
188 pub const LEASE_REAP_INTERVAL_TESTING: Duration = Duration::from_seconds_const(5);
189
190 pub const LEASE_REAP_BATCH_SIZE: u64 = 1024;
191 pub const LEASE_REAP_BATCH_SIZE_TESTING: u64 = 16;
192
193 pub const RETENTION_INTERVAL: Duration = Duration::from_seconds_const(60);
194 pub const RETENTION_INTERVAL_TESTING: Duration = Duration::from_seconds_const(60);
195
196 pub const RETENTION_BATCH_SIZE: u64 = 1024;
197 pub const RETENTION_BATCH_SIZE_TESTING: u64 = 16;
198}