summaryrefslogtreecommitdiff
path: root/src/mongo/executor/SConscript
blob: da4acd722ab1836176ab17f2944c00f29ccfc5fe (plain)
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
# -*- mode: python -*-

Import("env")

env = env.Clone()

env.Library(
    target='connection_pool_stats',
    source=[
        'connection_pool_stats.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/util/net/network',
    ])

env.Library(target='async_timer_mock',
            source=['async_timer_mock.cpp'],
            LIBDEPS=[
                '$BUILD_DIR/mongo/base',
                '$BUILD_DIR/mongo/base/system_error',
            ])

env.Library(target='remote_command',
            source=[
                'remote_command_request.cpp',
                'remote_command_response.cpp',
            ],
            LIBDEPS=[
                '$BUILD_DIR/mongo/rpc/metadata',
                '$BUILD_DIR/mongo/util/net/network',
            ])

env.Library(target='async_multicaster',
            source=[
                'async_multicaster.cpp',
            ],
            LIBDEPS=[
                'remote_command',
                'task_executor_interface',
                '$BUILD_DIR/mongo/base',
                '$BUILD_DIR/mongo/util/net/network',
            ])

env.Library(target='task_executor_interface',
            source=[
                'task_executor.cpp',
            ],
            LIBDEPS=[
                '$BUILD_DIR/mongo/base',
                'remote_command',
            ])

env.Library(target='scoped_task_executor',
            source=[
                'scoped_task_executor.cpp',
            ],
            LIBDEPS=[
                'task_executor_interface',
                '$BUILD_DIR/mongo/util/fail_point',
            ])

env.Library(target='network_interface',
            source=['network_interface.cpp',],
            LIBDEPS=[
                'task_executor_interface',
            ])

env.Library('network_interface_mock',
            [
                'network_interface_mock.cpp',
                'thread_pool_mock.cpp',
            ],
            LIBDEPS=[
                '$BUILD_DIR/mongo/base',
                '$BUILD_DIR/mongo/rpc/metadata',
                '$BUILD_DIR/mongo/util/clock_source_mock',
                '$BUILD_DIR/mongo/util/net/network',
                'network_interface',
                'task_executor_interface',
            ])

env.Library(
    target='connection_pool_executor',
    source=[
       'connection_pool.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/util/net/network',
        'connection_pool_stats',
        'remote_command',
    ],
    LIBDEPS_PRIVATE=[
        'egress_tag_closer_manager',
    ],
)

env.Library(target='network_test_env',
            source=['network_test_env.cpp',],
            LIBDEPS=[
                '$BUILD_DIR/mongo/db/commands',
                '$BUILD_DIR/mongo/db/query/command_request_response',
                'network_interface_mock',
                'task_executor_interface',
            ])

env.Library(target='egress_tag_closer_manager',
            source=[
                'egress_tag_closer_manager.cpp',
            ],
            LIBDEPS_PRIVATE=[
                '$BUILD_DIR/mongo/db/service_context',
            ])

env.Library(
    target='hedging_metrics',
    source=[
        'hedging_metrics.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
    ]
)

env.Library(
    target='network_interface_tl',
    source=[
        'connection_pool_tl.cpp',
        'network_interface_tl.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/client/async_client',
        '$BUILD_DIR/mongo/transport/transport_layer',
        'hedging_metrics',
    ],
    LIBDEPS_PRIVATE=[
        '$BUILD_DIR/mongo/db/auth/auth',
        '$BUILD_DIR/mongo/transport/transport_layer_manager',
        'connection_pool_executor',
        'network_interface',
    ]
)

env.Library(
    target='network_interface_fixture',
    source=[
        'network_interface_integration_fixture.cpp'
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/unittest/integration_test_main',
        '$BUILD_DIR/mongo/executor/thread_pool_task_executor',
        '$BUILD_DIR/mongo/executor/network_interface_thread_pool',
        '$BUILD_DIR/mongo/executor/network_interface_factory',
        '$BUILD_DIR/mongo/rpc/command_status',
        '$BUILD_DIR/mongo/util/concurrency/thread_pool',
        '$BUILD_DIR/mongo/util/version_impl',
    ]
)

env.Library(
    target='network_interface_factory',
    source=[
        'network_interface_factory.cpp',
    ],
    LIBDEPS=[
        'connection_pool_executor',
    ],
    LIBDEPS_PRIVATE=[
        'network_interface',
        'network_interface_tl',
        'egress_tag_closer_manager',
    ])

env.Library(
    target='task_executor_test_fixture',
    source=[
        'task_executor_test_common.cpp',
        'task_executor_test_fixture.cpp'
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/util/clock_source_mock',
        '$BUILD_DIR/mongo/unittest/unittest',
        'network_interface_mock',
        'task_executor_interface',
    ]
)

env.Library(
    target='thread_pool_task_executor',
    source=[
        'thread_pool_task_executor.cpp',
    ],
    LIBDEPS=[
        'task_executor_interface',
        '$BUILD_DIR/mongo/util/fail_point',
        '$BUILD_DIR/mongo/db/service_context',
    ],
    LIBDEPS_PRIVATE=[
        'network_interface',
    ]
)

env.Library(
    target='network_interface_thread_pool',
    source=[
        'network_interface_thread_pool.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
    ]
)

env.Library(
    target='thread_pool_task_executor_test_fixture',
    source=[
        'thread_pool_task_executor_test_fixture.cpp',
        ],
    LIBDEPS=[
        'task_executor_test_fixture',
        'thread_pool_task_executor',
    ]
)

env.Library(
    target='task_executor_pool',
    source=[
        'task_executor_pool.cpp',
        env.Idlc("task_executor_pool_parameters.idl")[0],
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/idl/server_parameter',
        '$BUILD_DIR/mongo/util/processinfo',
        'task_executor_interface',
    ],
)

env.Library(
    target='task_executor_cursor',
    source=[
        'task_executor_cursor.cpp',
    ],
    LIBDEPS=[
        'task_executor_interface',
        '$BUILD_DIR/mongo/db/query/command_request_response',
    ],
)

env.CppUnitTest(
    target='executor_test',
    source=[
        'connection_pool_test.cpp',
        'connection_pool_test_fixture.cpp',
        'network_interface_mock_test.cpp',
        'scoped_task_executor_test.cpp',
        'task_executor_cursor_test.cpp',
        'thread_pool_task_executor_test.cpp',
    ],
    LIBDEPS=[
        'connection_pool_executor',
        'egress_tag_closer_manager',
        'network_interface_mock',
        'scoped_task_executor',
        'task_executor_cursor',
        'thread_pool_task_executor',
        'thread_pool_task_executor_test_fixture',
    ],
)

env.CppIntegrationTest(
    target='executor_integration_test',
    source=[
        'network_interface_integration_test.cpp',
        'task_executor_cursor_integration_test.cpp',
        'thread_pool_task_executor_integration_test.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/client/clientdriver_network',
        '$BUILD_DIR/mongo/db/wire_version',
        '$BUILD_DIR/mongo/executor/network_interface_factory',
        '$BUILD_DIR/mongo/executor/network_interface_thread_pool',
        '$BUILD_DIR/mongo/executor/thread_pool_task_executor',
        '$BUILD_DIR/mongo/transport/transport_layer_egress_init',
        '$BUILD_DIR/mongo/util/concurrency/thread_pool',
        '$BUILD_DIR/mongo/util/version_impl',
        'network_interface_fixture',
        'task_executor_cursor',
    ],
)