1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
|
# -*- mode: python -*-
Import('env')
env = env.Clone()
env.SConscript(
dirs=[
'process_interface',
],
exports=[
'env',
],
)
env.Library(
target='aggregation',
source=[
'aggregation.cpp',
],
LIBDEPS=[
'aggregation_request_helper',
'expression_context',
'pipeline',
]
)
env.Library(
target='field_path',
source=[
'field_path.cpp',
],
LIBDEPS=[
'$BUILD_DIR/mongo/base',
]
)
env.Library(
target='aggregation_request_helper',
source=[
'aggregation_request_helper.cpp',
'aggregate_command.idl',
],
LIBDEPS=[
'$BUILD_DIR/mongo/base',
'$BUILD_DIR/mongo/db/exec/document_value/document_value',
'$BUILD_DIR/mongo/db/namespace_string',
'$BUILD_DIR/mongo/db/query/command_request_response',
'$BUILD_DIR/mongo/db/query/explain_options',
'$BUILD_DIR/mongo/db/query/query_request',
'$BUILD_DIR/mongo/db/repl/read_concern_args',
'$BUILD_DIR/mongo/db/storage/storage_options',
'$BUILD_DIR/mongo/db/write_concern_options',
'$BUILD_DIR/mongo/idl/idl_parser',
'document_sources_idl',
]
)
env.Library(
target='variable_validation',
source=[
"variable_validation.cpp",
],
LIBDEPS=[
'$BUILD_DIR/mongo/base',
]
)
env.Library(
target='expression_context',
source=[
'expression.cpp',
'expression_context.cpp',
'expression_function.cpp',
'expression_js_emit.cpp',
'expression_test_api_version.cpp',
'expression_trigonometric.cpp',
'javascript_execution.cpp',
'make_js_function.cpp',
'variables.cpp',
],
LIBDEPS=[
'$BUILD_DIR/mongo/db/commands/test_commands_enabled',
'$BUILD_DIR/mongo/db/exec/document_value/document_value',
'$BUILD_DIR/mongo/db/query/collation/collator_factory_interface',
'$BUILD_DIR/mongo/db/query/datetime/date_time_support',
'$BUILD_DIR/mongo/db/query/query_knobs',
'$BUILD_DIR/mongo/db/server_options_core',
'$BUILD_DIR/mongo/db/service_context',
'$BUILD_DIR/mongo/scripting/scripting',
'$BUILD_DIR/mongo/scripting/scripting_common',
'$BUILD_DIR/mongo/util/intrusive_counter',
'$BUILD_DIR/mongo/util/regex_util',
'$BUILD_DIR/mongo/util/summation',
'aggregation_request_helper',
'dependencies',
'variable_validation',
],
LIBDEPS_PRIVATE=[
'$BUILD_DIR/mongo/db/mongohasher',
'$BUILD_DIR/mongo/db/vector_clock',
],
)
env.Library(
target='dependencies',
source=[
'dependencies.cpp',
],
LIBDEPS=[
'$BUILD_DIR/mongo/db/exec/document_value/document_value',
'field_path',
]
)
env.Library(
target='accumulator',
source=[
'accumulation_statement.cpp',
'accumulator_add_to_set.cpp',
'accumulator_avg.cpp',
'accumulator_first.cpp',
'accumulator_js_reduce.cpp',
'accumulator_last.cpp',
'accumulator_merge_objects.cpp',
'accumulator_min_max.cpp',
'accumulator_push.cpp',
'accumulator_rank.cpp',
'accumulator_std_dev.cpp',
'accumulator_sum.cpp',
'window_function/window_bounds.cpp',
'window_function/window_function_expression.cpp',
],
LIBDEPS=[
'$BUILD_DIR/mongo/db/exec/document_value/document_value',
'$BUILD_DIR/mongo/db/query/query_knobs',
'$BUILD_DIR/mongo/scripting/scripting_common',
'$BUILD_DIR/mongo/util/summation',
'expression_context',
'field_path',
]
)
env.Library(
target='granularity_rounder',
source=[
'granularity_rounder.cpp',
'granularity_rounder_powers_of_two.cpp',
'granularity_rounder_preferred_numbers.cpp',
],
LIBDEPS=[
'$BUILD_DIR/mongo/db/exec/document_value/document_value',
'expression_context',
'field_path',
]
)
env.Library(
target='document_source_mock',
source=[
'document_source_mock.cpp',
'process_interface/stub_lookup_single_document_process_interface.cpp',
],
LIBDEPS=[
'$BUILD_DIR/mongo/db/query/query_test_service_context',
'pipeline',
]
)
env.Library(
target='sharded_agg_helpers',
source=[
'sharded_agg_helpers.cpp',
],
LIBDEPS=[
'$BUILD_DIR/mongo/s/async_requests_sender',
'$BUILD_DIR/mongo/s/commands/shared_cluster_commands',
'$BUILD_DIR/mongo/s/common_s',
'$BUILD_DIR/mongo/s/query/cluster_query',
'aggregation',
],
)
env.Library(
target='lite_parsed_document_source',
source=[
'lite_parsed_document_source.cpp',
'lite_parsed_pipeline.cpp',
],
LIBDEPS=[
'$BUILD_DIR/mongo/db/stats/counters',
'aggregation_request_helper',
]
)
env.Library(
target="document_path_support",
source=[
'document_path_support.cpp',
],
LIBDEPS=[
"$BUILD_DIR/mongo/db/exec/document_value/document_value",
],
)
pipelineEnv = env.Clone()
pipelineEnv.InjectThirdParty(libraries=['snappy'])
pipelineEnv.Library(
target='pipeline',
source=[
'change_stream_document_diff_parser.cpp',
'document_source.cpp',
'document_source_add_fields.cpp',
'document_source_bucket.cpp',
'document_source_bucket_auto.cpp',
'document_source_change_stream.cpp',
'document_source_change_stream_close_cursor.cpp',
'document_source_change_stream_transform.cpp',
'document_source_check_invalidate.cpp',
'document_source_check_resume_token.cpp',
'document_source_coll_stats.cpp',
'document_source_count.cpp',
'document_source_current_op.cpp',
'document_source_exchange.cpp',
'document_source_facet.cpp',
'document_source_geo_near.cpp',
'document_source_graph_lookup.cpp',
'document_source_group.cpp',
'document_source_index_stats.cpp',
'document_source_internal_inhibit_optimization.cpp',
'document_source_internal_shard_filter.cpp',
'document_source_internal_split_pipeline.cpp',
'document_source_limit.cpp',
'document_source_list_cached_and_active_users.cpp',
'document_source_list_local_sessions.cpp',
'document_source_list_sessions.cpp',
'document_source_lookup.cpp',
'document_source_lookup_change_post_image.cpp',
'document_source_lookup_change_pre_image.cpp',
'document_source_match.cpp',
'document_source_merge.cpp',
'document_source_operation_metrics.cpp',
'document_source_out.cpp',
'document_source_plan_cache_stats.cpp',
'document_source_project.cpp',
'document_source_queue.cpp',
'document_source_redact.cpp',
'document_source_replace_root.cpp',
'document_source_sample.cpp',
'document_source_sample_from_random_cursor.cpp',
'document_source_sequential_document_cache.cpp',
'document_source_set_window_fields.cpp',
'document_source_single_document_transformation.cpp',
'document_source_skip.cpp',
'document_source_sort.cpp',
'document_source_sort_by_count.cpp',
'document_source_tee_consumer.cpp',
'document_source_union_with.cpp',
'document_source_unwind.cpp',
'document_source_internal_unpack_bucket.cpp',
'pipeline.cpp',
'semantic_analysis.cpp',
'sequential_document_cache.cpp',
'skip_and_limit.cpp',
'tee_buffer.cpp',
'window_function/partition_iterator.cpp',
'window_function/window_function_exec.cpp',
'window_function/window_function_exec_derivative.cpp',
'window_function/window_function_exec_removable_document.cpp',
],
LIBDEPS=[
'$BUILD_DIR/mongo/client/clientdriver_minimal',
'$BUILD_DIR/mongo/db/auth/auth',
'$BUILD_DIR/mongo/db/bson/dotted_path_support',
'$BUILD_DIR/mongo/db/curop',
'$BUILD_DIR/mongo/db/curop_failpoint_helpers',
'$BUILD_DIR/mongo/db/exec/document_value/document_value',
'$BUILD_DIR/mongo/db/exec/projection_executor',
'$BUILD_DIR/mongo/db/exec/scoped_timer',
'$BUILD_DIR/mongo/db/exec/sort_executor',
'$BUILD_DIR/mongo/db/generic_cursor',
'$BUILD_DIR/mongo/db/index/key_generator',
'$BUILD_DIR/mongo/db/logical_session_cache',
'$BUILD_DIR/mongo/db/logical_session_id_helpers',
'$BUILD_DIR/mongo/db/matcher/expressions',
'$BUILD_DIR/mongo/db/pipeline/lite_parsed_document_source',
'$BUILD_DIR/mongo/db/query/collation/collator_factory_interface',
'$BUILD_DIR/mongo/db/query/collation/collator_interface',
'$BUILD_DIR/mongo/db/query/datetime/date_time_support',
'$BUILD_DIR/mongo/db/query/query_knobs',
'$BUILD_DIR/mongo/db/query/sort_pattern',
'$BUILD_DIR/mongo/db/repl/oplog_entry',
'$BUILD_DIR/mongo/db/repl/read_concern_args',
'$BUILD_DIR/mongo/db/repl/repl_coordinator_interface',
'$BUILD_DIR/mongo/db/repl/speculative_majority_read_info',
'$BUILD_DIR/mongo/db/service_context',
'$BUILD_DIR/mongo/db/sessions_collection',
'$BUILD_DIR/mongo/db/stats/resource_consumption_metrics',
'$BUILD_DIR/mongo/db/storage/encryption_hooks',
'$BUILD_DIR/mongo/db/storage/storage_options',
'$BUILD_DIR/mongo/db/update/update_document_diff',
'$BUILD_DIR/mongo/db/views/resolved_view',
'$BUILD_DIR/mongo/s/is_mongos',
'$BUILD_DIR/third_party/shim_snappy',
'accumulator',
'dependencies',
'document_path_support',
'document_sources_idl',
'expression_context',
'granularity_rounder',
],
LIBDEPS_PRIVATE=[
'$BUILD_DIR/mongo/db/commands/test_commands_enabled',
'$BUILD_DIR/mongo/db/sorter/sorter_idl',
'$BUILD_DIR/mongo/rpc/command_status',
]
)
env.Library(
target='runtime_constants_idl',
source=[
'legacy_runtime_constants.idl',
],
LIBDEPS=[
'$BUILD_DIR/mongo/idl/idl_parser',
],
)
env.Library(
target='document_sources_idl',
source=[
'document_source_change_stream.idl',
'document_source_list_sessions.idl',
'document_source_merge.idl',
'document_source_merge_modes.idl',
'document_source_replace_root.idl',
'document_source_set_window_fields.idl',
'document_source_union_with.idl',
'exchange_spec.idl',
'value.idl',
'document_source_merge_spec.cpp',
'resume_token.cpp'
],
LIBDEPS=[
'$BUILD_DIR/mongo/base',
'$BUILD_DIR/mongo/db/exec/document_value/document_value',
'$BUILD_DIR/mongo/db/storage/key_string',
'$BUILD_DIR/mongo/idl/idl_parser',
'$BUILD_DIR/mongo/s/common_s',
'runtime_constants_idl',
],
)
env.CppUnitTest(
target='db_pipeline_test',
source=[
'accumulator_js_test.cpp',
'accumulator_test.cpp',
'aggregation_request_test.cpp',
'dependencies_test.cpp',
'dispatch_shard_pipeline_test.cpp',
'document_path_support_test.cpp',
'document_source_add_fields_test.cpp',
'document_source_bucket_auto_test.cpp',
'document_source_bucket_test.cpp',
'document_source_change_stream_test.cpp',
'document_source_check_resume_token_test.cpp',
'document_source_count_test.cpp',
'document_source_current_op_test.cpp',
'document_source_exchange_test.cpp',
'document_source_facet_test.cpp',
'document_source_geo_near_test.cpp',
'document_source_graph_lookup_test.cpp',
'document_source_group_test.cpp',
'document_source_internal_shard_filter_test.cpp',
'document_source_internal_split_pipeline_test.cpp',
'document_source_limit_test.cpp',
'document_source_lookup_change_post_image_test.cpp',
'document_source_lookup_test.cpp',
'document_source_match_test.cpp',
'document_source_merge_cursors_test.cpp',
'document_source_merge_test.cpp',
'document_source_mock_test.cpp',
'document_source_out_test.cpp',
'document_source_plan_cache_stats_test.cpp',
'document_source_project_test.cpp',
'document_source_redact_test.cpp',
'document_source_replace_root_test.cpp',
'document_source_sample_test.cpp',
'document_source_sequential_document_cache_test.cpp',
'document_source_set_window_fields_test.cpp',
'document_source_skip_test.cpp',
'document_source_sort_by_count_test.cpp',
'document_source_sort_test.cpp',
'document_source_union_with_test.cpp',
'document_source_internal_unpack_bucket_test/extract_or_build_project_to_internalize_test.cpp',
'document_source_internal_unpack_bucket_test/create_predicates_on_bucket_level_field_test.cpp',
'document_source_internal_unpack_bucket_test/internalize_project_test.cpp',
'document_source_internal_unpack_bucket_test/unpack_bucket_exec_test.cpp',
'document_source_unwind_test.cpp',
'expression_and_test.cpp',
'expression_compare_test.cpp',
'expression_context_test.cpp',
'expression_convert_test.cpp',
'expression_date_test.cpp',
'expression_field_path_test.cpp',
'expression_find_internal_test.cpp',
'expression_javascript_test.cpp',
'expression_nary_test.cpp',
'expression_object_test.cpp',
'expression_or_test.cpp',
'expression_replace_test.cpp',
'expression_test.cpp',
'expression_test_api_version_test.cpp',
'expression_trigonometric_test.cpp',
'expression_trim_test.cpp',
'expression_walker_test.cpp',
'field_path_test.cpp',
'granularity_rounder_powers_of_two_test.cpp',
'granularity_rounder_preferred_numbers_test.cpp',
'lookup_set_cache_test.cpp',
'pipeline_metadata_tree_test.cpp',
'pipeline_test.cpp',
'resharding_initial_split_policy_test.cpp',
'resume_token_test.cpp',
'semantic_analysis_test.cpp',
'sequential_document_cache_test.cpp',
'sharded_union_test.cpp',
'skip_and_limit_test.cpp',
'tee_buffer_test.cpp',
'window_function/partition_iterator_test.cpp',
'window_function/window_function_add_to_set_test.cpp',
'window_function/window_function_exec_derivative_test.cpp',
'window_function/window_function_exec_non_removable_test.cpp',
'window_function/window_function_min_max_test.cpp',
'window_function/window_function_push_test.cpp',
'window_function/window_function_std_dev_test.cpp',
],
LIBDEPS=[
'$BUILD_DIR/mongo/base',
'$BUILD_DIR/mongo/db/auth/authmocks',
'$BUILD_DIR/mongo/db/cst/cst',
'$BUILD_DIR/mongo/db/exec/document_value/document_value',
'$BUILD_DIR/mongo/db/exec/document_value/document_value_test_util',
'$BUILD_DIR/mongo/db/mongohasher',
'$BUILD_DIR/mongo/db/query/collation/collator_interface_mock',
'$BUILD_DIR/mongo/db/query/query_test_service_context',
'$BUILD_DIR/mongo/db/repl/oplog_entry',
'$BUILD_DIR/mongo/db/repl/replmocks',
'$BUILD_DIR/mongo/db/service_context',
'$BUILD_DIR/mongo/db/service_context_d',
'$BUILD_DIR/mongo/db/service_context_d_test_fixture',
'$BUILD_DIR/mongo/db/service_context_test_fixture',
'$BUILD_DIR/mongo/db/storage/devnull/storage_devnull_core',
'$BUILD_DIR/mongo/executor/thread_pool_task_executor_test_fixture',
'$BUILD_DIR/mongo/s/is_mongos',
'$BUILD_DIR/mongo/s/query/router_exec_stage',
'$BUILD_DIR/mongo/s/sharding_router_test_fixture',
'$BUILD_DIR/mongo/util/clock_source_mock',
'accumulator',
'aggregation_request_helper',
'document_source_mock',
'document_sources_idl',
'expression_context',
'field_path',
'granularity_rounder',
'pipeline',
'process_interface/mongod_process_interfaces',
'process_interface/mongos_process_interface',
'process_interface/shardsvr_process_interface',
'sharded_agg_helpers',
]
)
env.Benchmark(
target='expression_bm',
source=[
'expression_bm.cpp',
],
LIBDEPS=[
'$BUILD_DIR/mongo/db/query/query_test_service_context',
'$BUILD_DIR/mongo/db/service_context_test_fixture',
'expression_context',
],
)
|