# -*- mode: python -*- Import("env") env = env.Clone() env.Library( target='timer_stats', source=[ 'timer_stats.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/util/concurrency/spin_lock', ], ) env.Library( target='top', source=[ 'top.cpp', 'operation_latency_histogram.cpp' ], LIBDEPS=[ '$BUILD_DIR/mongo/db/server_options_core', '$BUILD_DIR/mongo/db/service_context', ], ) env.Library( target='api_version_metrics', source=[ 'api_version_metrics.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/shared_request_handling', '$BUILD_DIR/mongo/rpc/client_metadata', ] ) env.Library( target='counters', source=[ 'counters.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/commands/server_status_core', '$BUILD_DIR/mongo/util/concurrency/spin_lock', ], ) env.Library( target='server_read_concern_write_concern_metrics', source=[ 'server_read_concern_metrics.cpp', 'server_write_concern_metrics.cpp', 'read_concern_stats.idl', 'server_write_concern_metrics.idl', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/commands/server_status', '$BUILD_DIR/mongo/db/repl/read_concern_args', '$BUILD_DIR/mongo/db/write_concern_options', '$BUILD_DIR/mongo/idl/idl_parser', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/idl/server_parameter', ], ) env.Library( target='resource_consumption_metrics', source=[ 'resource_consumption_metrics.cpp', 'operation_resource_consumption.idl', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/idl/idl_parser', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/commands/server_status', '$BUILD_DIR/mongo/db/repl/repl_coordinator_interface', '$BUILD_DIR/mongo/idl/feature_flag', '$BUILD_DIR/mongo/idl/server_parameter', ], ) env.Library( target="transaction_stats", source=[ "single_transaction_stats.cpp" ], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/repl/read_concern_args', ], ) env.Library( target='fill_locker_info', source=[ 'fill_locker_info.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/concurrency/lock_manager' ], ) env.Library( target='serveronly_stats', source=[ "latency_server_status_section.cpp", "lock_server_status_section.cpp", "storage_stats.cpp", ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/catalog/database_holder', '$BUILD_DIR/mongo/db/catalog/index_catalog', '$BUILD_DIR/mongo/db/commands/server_status', '$BUILD_DIR/mongo/db/db_raii', '$BUILD_DIR/mongo/db/dbdirectclient', # TODO (SERVER-64162) remove '$BUILD_DIR/mongo/db/index/index_access_method', '$BUILD_DIR/mongo/db/pipeline/aggregation_request_helper', # TODO (SERVER-64162) remove '$BUILD_DIR/mongo/db/pipeline/document_sources_idl', '$BUILD_DIR/mongo/db/timeseries/bucket_catalog', '$BUILD_DIR/mongo/db/timeseries/timeseries_stats', 'fill_locker_info', 'top', ], ) env.CppUnitTest( target='db_stats_test', source=[ 'api_version_metrics_test.cpp', 'fill_locker_info_test.cpp', 'operation_latency_histogram_test.cpp', 'resource_consumption_metrics_test.cpp', 'timer_stats_test.cpp', 'top_test.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/auth/authmocks', '$BUILD_DIR/mongo/db/repl/replmocks', '$BUILD_DIR/mongo/db/service_context_test_fixture', '$BUILD_DIR/mongo/db/shared_request_handling', '$BUILD_DIR/mongo/util/clock_source_mock', 'api_version_metrics', 'fill_locker_info', 'resource_consumption_metrics', 'timer_stats', 'top', ], )