summaryrefslogtreecommitdiff
path: root/src/mongo/db/ftdc
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/ftdc')
-rw-r--r--src/mongo/db/ftdc/controller.cpp3
-rw-r--r--src/mongo/db/ftdc/controller_test.cpp8
-rw-r--r--src/mongo/db/ftdc/file_manager.cpp2
-rw-r--r--src/mongo/db/ftdc/file_manager_test.cpp2
-rw-r--r--src/mongo/db/ftdc/file_writer_test.cpp2
-rw-r--r--src/mongo/db/ftdc/ftdc_mongod.cpp12
-rw-r--r--src/mongo/db/ftdc/ftdc_mongos.cpp2
-rw-r--r--src/mongo/db/ftdc/ftdc_server.cpp12
-rw-r--r--src/mongo/db/ftdc/ftdc_system_stats_android.cpp4
-rw-r--r--src/mongo/db/ftdc/ftdc_system_stats_linux.cpp4
-rw-r--r--src/mongo/db/ftdc/ftdc_system_stats_windows.cpp4
-rw-r--r--src/mongo/db/ftdc/ftdc_test.cpp8
12 files changed, 32 insertions, 31 deletions
diff --git a/src/mongo/db/ftdc/controller.cpp b/src/mongo/db/ftdc/controller.cpp
index 0bb2e44fa21..db944bae91d 100644
--- a/src/mongo/db/ftdc/controller.cpp
+++ b/src/mongo/db/ftdc/controller.cpp
@@ -33,12 +33,13 @@
#include "mongo/db/ftdc/controller.h"
+#include <memory>
+
#include "mongo/db/client.h"
#include "mongo/db/ftdc/collector.h"
#include "mongo/db/ftdc/util.h"
#include "mongo/db/jsobj.h"
#include "mongo/stdx/condition_variable.h"
-#include "mongo/stdx/memory.h"
#include "mongo/stdx/mutex.h"
#include "mongo/stdx/thread.h"
#include "mongo/util/concurrency/idle_thread_block.h"
diff --git a/src/mongo/db/ftdc/controller_test.cpp b/src/mongo/db/ftdc/controller_test.cpp
index 8afc65b96a3..d4f87f38c79 100644
--- a/src/mongo/db/ftdc/controller_test.cpp
+++ b/src/mongo/db/ftdc/controller_test.cpp
@@ -31,6 +31,7 @@
#include <boost/filesystem.hpp>
#include <iostream>
+#include <memory>
#include "mongo/base/data_type_validated.h"
#include "mongo/base/init.h"
@@ -45,7 +46,6 @@
#include "mongo/db/ftdc/ftdc_test.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/service_context.h"
-#include "mongo/stdx/memory.h"
#include "mongo/unittest/temp_dir.h"
#include "mongo/unittest/unittest.h"
@@ -171,8 +171,8 @@ TEST_F(FTDCControllerTest, TestFull) {
FTDCController c(dir, config);
- auto c1 = stdx::make_unique<FTDCMetricsCollectorMock2>();
- auto c2 = stdx::make_unique<FTDCMetricsCollectorMockRotate>();
+ auto c1 = std::make_unique<FTDCMetricsCollectorMock2>();
+ auto c2 = std::make_unique<FTDCMetricsCollectorMockRotate>();
auto c1Ptr = c1.get();
auto c2Ptr = c2.get();
@@ -243,7 +243,7 @@ TEST_F(FTDCControllerTest, TestStartAsDisabled) {
config.maxFileSizeBytes = FTDCConfig::kMaxFileSizeBytesDefault;
config.maxDirectorySizeBytes = FTDCConfig::kMaxDirectorySizeBytesDefault;
- auto c1 = stdx::make_unique<FTDCMetricsCollectorMock2>();
+ auto c1 = std::make_unique<FTDCMetricsCollectorMock2>();
auto c1Ptr = c1.get();
diff --git a/src/mongo/db/ftdc/file_manager.cpp b/src/mongo/db/ftdc/file_manager.cpp
index e79d4c9febc..cdc7dcdb125 100644
--- a/src/mongo/db/ftdc/file_manager.cpp
+++ b/src/mongo/db/ftdc/file_manager.cpp
@@ -34,6 +34,7 @@
#include "mongo/db/ftdc/file_manager.h"
#include <boost/filesystem.hpp>
+#include <memory>
#include <string>
#include "mongo/base/string_data.h"
@@ -42,7 +43,6 @@
#include "mongo/db/ftdc/constants.h"
#include "mongo/db/ftdc/file_reader.h"
#include "mongo/db/jsobj.h"
-#include "mongo/stdx/memory.h"
#include "mongo/util/assert_util.h"
#include "mongo/util/log.h"
#include "mongo/util/str.h"
diff --git a/src/mongo/db/ftdc/file_manager_test.cpp b/src/mongo/db/ftdc/file_manager_test.cpp
index 1bb8ea78702..13493e984b7 100644
--- a/src/mongo/db/ftdc/file_manager_test.cpp
+++ b/src/mongo/db/ftdc/file_manager_test.cpp
@@ -32,6 +32,7 @@
#include <algorithm>
#include <boost/filesystem.hpp>
#include <iostream>
+#include <memory>
#include <string>
#include "mongo/base/init.h"
@@ -45,7 +46,6 @@
#include "mongo/db/ftdc/file_writer.h"
#include "mongo/db/ftdc/ftdc_test.h"
#include "mongo/db/jsobj.h"
-#include "mongo/stdx/memory.h"
#include "mongo/unittest/temp_dir.h"
#include "mongo/unittest/unittest.h"
diff --git a/src/mongo/db/ftdc/file_writer_test.cpp b/src/mongo/db/ftdc/file_writer_test.cpp
index 5da93d7026d..b8f6dbd9f70 100644
--- a/src/mongo/db/ftdc/file_writer_test.cpp
+++ b/src/mongo/db/ftdc/file_writer_test.cpp
@@ -30,6 +30,7 @@
#include "mongo/platform/basic.h"
#include <boost/filesystem.hpp>
+#include <memory>
#include "mongo/base/init.h"
#include "mongo/bson/bsonmisc.h"
@@ -39,7 +40,6 @@
#include "mongo/db/ftdc/file_writer.h"
#include "mongo/db/ftdc/ftdc_test.h"
#include "mongo/db/jsobj.h"
-#include "mongo/stdx/memory.h"
#include "mongo/unittest/temp_dir.h"
#include "mongo/unittest/unittest.h"
diff --git a/src/mongo/db/ftdc/ftdc_mongod.cpp b/src/mongo/db/ftdc/ftdc_mongod.cpp
index 6f7a9dd4a9d..73e598ec410 100644
--- a/src/mongo/db/ftdc/ftdc_mongod.cpp
+++ b/src/mongo/db/ftdc/ftdc_mongod.cpp
@@ -47,16 +47,16 @@ void registerMongoDCollectors(FTDCController* controller) {
if (repl::ReplicationCoordinator::get(getGlobalServiceContext())->getReplicationMode() !=
repl::ReplicationCoordinator::modeNone) {
// CmdReplSetGetStatus
- controller->addPeriodicCollector(stdx::make_unique<FTDCSimpleInternalCommandCollector>(
+ controller->addPeriodicCollector(std::make_unique<FTDCSimpleInternalCommandCollector>(
"replSetGetStatus", "replSetGetStatus", "", BSON("replSetGetStatus" << 1)));
// CollectionStats
controller->addPeriodicCollector(
- stdx::make_unique<FTDCSimpleInternalCommandCollector>("collStats",
- "local.oplog.rs.stats",
- "local",
- BSON("collStats"
- << "oplog.rs")));
+ std::make_unique<FTDCSimpleInternalCommandCollector>("collStats",
+ "local.oplog.rs.stats",
+ "local",
+ BSON("collStats"
+ << "oplog.rs")));
}
}
diff --git a/src/mongo/db/ftdc/ftdc_mongos.cpp b/src/mongo/db/ftdc/ftdc_mongos.cpp
index 1a76c79bcf2..ef1cc40924a 100644
--- a/src/mongo/db/ftdc/ftdc_mongos.cpp
+++ b/src/mongo/db/ftdc/ftdc_mongos.cpp
@@ -86,7 +86,7 @@ public:
void registerMongoSCollectors(FTDCController* controller) {
// PoolStats
- controller->addPeriodicCollector(stdx::make_unique<ConnPoolStatsCollector>());
+ controller->addPeriodicCollector(std::make_unique<ConnPoolStatsCollector>());
}
void startMongoSFTDC() {
diff --git a/src/mongo/db/ftdc/ftdc_server.cpp b/src/mongo/db/ftdc/ftdc_server.cpp
index 142ef262751..92c2ca4fe2a 100644
--- a/src/mongo/db/ftdc/ftdc_server.cpp
+++ b/src/mongo/db/ftdc/ftdc_server.cpp
@@ -34,6 +34,7 @@
#include <boost/filesystem.hpp>
#include <fstream>
#include <memory>
+#include <memory>
#include "mongo/base/status.h"
#include "mongo/bson/bsonobjbuilder.h"
@@ -45,7 +46,6 @@
#include "mongo/db/ftdc/ftdc_system_stats.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/service_context.h"
-#include "mongo/stdx/memory.h"
#include "mongo/util/synchronized_value.h"
namespace mongo {
@@ -211,7 +211,7 @@ void startFTDC(boost::filesystem::path& path,
ftdcDirectoryPathParameter = path;
- auto controller = stdx::make_unique<FTDCController>(path, config);
+ auto controller = std::make_unique<FTDCController>(path, config);
// Install periodic collectors
// These are collected on the period interval in FTDCConfig.
@@ -225,7 +225,7 @@ void startFTDC(boost::filesystem::path& path,
// migrations.
// "timing" is filtered out because it triggers frequent schema changes.
// TODO: do we need to enable "sharding" on MongoS?
- controller->addPeriodicCollector(stdx::make_unique<FTDCSimpleInternalCommandCollector>(
+ controller->addPeriodicCollector(std::make_unique<FTDCSimpleInternalCommandCollector>(
"serverStatus",
"serverStatus",
"",
@@ -241,15 +241,15 @@ void startFTDC(boost::filesystem::path& path,
// These are collected on each file rotation.
// CmdBuildInfo
- controller->addOnRotateCollector(stdx::make_unique<FTDCSimpleInternalCommandCollector>(
+ controller->addOnRotateCollector(std::make_unique<FTDCSimpleInternalCommandCollector>(
"buildInfo", "buildInfo", "", BSON("buildInfo" << 1)));
// CmdGetCmdLineOpts
- controller->addOnRotateCollector(stdx::make_unique<FTDCSimpleInternalCommandCollector>(
+ controller->addOnRotateCollector(std::make_unique<FTDCSimpleInternalCommandCollector>(
"getCmdLineOpts", "getCmdLineOpts", "", BSON("getCmdLineOpts" << 1)));
// HostInfoCmd
- controller->addOnRotateCollector(stdx::make_unique<FTDCSimpleInternalCommandCollector>(
+ controller->addOnRotateCollector(std::make_unique<FTDCSimpleInternalCommandCollector>(
"hostInfo", "hostInfo", "", BSON("hostInfo" << 1)));
// Install the new controller
diff --git a/src/mongo/db/ftdc/ftdc_system_stats_android.cpp b/src/mongo/db/ftdc/ftdc_system_stats_android.cpp
index 2abdda27e8c..10f3468c918 100644
--- a/src/mongo/db/ftdc/ftdc_system_stats_android.cpp
+++ b/src/mongo/db/ftdc/ftdc_system_stats_android.cpp
@@ -31,6 +31,7 @@
#include "mongo/db/ftdc/ftdc_system_stats.h"
+#include <memory>
#include <string>
#include <vector>
@@ -39,7 +40,6 @@
#include "mongo/bson/bsonobjbuilder.h"
#include "mongo/db/ftdc/collector.h"
#include "mongo/db/ftdc/controller.h"
-#include "mongo/stdx/memory.h"
#include "mongo/util/processinfo.h"
#include "mongo/util/procparser.h"
@@ -122,7 +122,7 @@ private:
} // namespace
void installSystemMetricsCollector(FTDCController* controller) {
- controller->addPeriodicCollector(stdx::make_unique<LinuxSystemMetricsCollector>());
+ controller->addPeriodicCollector(std::make_unique<LinuxSystemMetricsCollector>());
}
} // namespace mongo
diff --git a/src/mongo/db/ftdc/ftdc_system_stats_linux.cpp b/src/mongo/db/ftdc/ftdc_system_stats_linux.cpp
index e68dcff300c..e9334987795 100644
--- a/src/mongo/db/ftdc/ftdc_system_stats_linux.cpp
+++ b/src/mongo/db/ftdc/ftdc_system_stats_linux.cpp
@@ -31,6 +31,7 @@
#include "mongo/db/ftdc/ftdc_system_stats.h"
+#include <memory>
#include <string>
#include <vector>
@@ -39,7 +40,6 @@
#include "mongo/bson/bsonobjbuilder.h"
#include "mongo/db/ftdc/collector.h"
#include "mongo/db/ftdc/controller.h"
-#include "mongo/stdx/memory.h"
#include "mongo/util/processinfo.h"
#include "mongo/util/procparser.h"
@@ -137,7 +137,7 @@ private:
} // namespace
void installSystemMetricsCollector(FTDCController* controller) {
- controller->addPeriodicCollector(stdx::make_unique<LinuxSystemMetricsCollector>());
+ controller->addPeriodicCollector(std::make_unique<LinuxSystemMetricsCollector>());
}
} // namespace mongo
diff --git a/src/mongo/db/ftdc/ftdc_system_stats_windows.cpp b/src/mongo/db/ftdc/ftdc_system_stats_windows.cpp
index 3f1276afc5d..92045f16e4d 100644
--- a/src/mongo/db/ftdc/ftdc_system_stats_windows.cpp
+++ b/src/mongo/db/ftdc/ftdc_system_stats_windows.cpp
@@ -33,6 +33,7 @@
#include "mongo/db/ftdc/ftdc_system_stats.h"
+#include <memory>
#include <string>
#include <vector>
@@ -41,7 +42,6 @@
#include "mongo/bson/bsonobjbuilder.h"
#include "mongo/db/ftdc/collector.h"
#include "mongo/db/ftdc/controller.h"
-#include "mongo/stdx/memory.h"
#include "mongo/util/log.h"
#include "mongo/util/perfctr_collect.h"
@@ -150,7 +150,7 @@ void installSystemMetricsCollector(FTDCController* controller) {
}
controller->addPeriodicCollector(
- stdx::make_unique<WindowsSystemMetricsCollector>(std::move(swCollector.getValue())));
+ std::make_unique<WindowsSystemMetricsCollector>(std::move(swCollector.getValue())));
}
} // namespace mongo
diff --git a/src/mongo/db/ftdc/ftdc_test.cpp b/src/mongo/db/ftdc/ftdc_test.cpp
index 5e50471d20f..43ce53e9c67 100644
--- a/src/mongo/db/ftdc/ftdc_test.cpp
+++ b/src/mongo/db/ftdc/ftdc_test.cpp
@@ -32,6 +32,7 @@
#include "mongo/db/ftdc/ftdc_test.h"
#include <boost/filesystem.hpp>
+#include <memory>
#include "mongo/base/data_type_validated.h"
#include "mongo/base/init.h"
@@ -40,7 +41,6 @@
#include "mongo/db/ftdc/file_reader.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/service_context.h"
-#include "mongo/stdx/memory.h"
#include "mongo/unittest/unittest.h"
#include "mongo/util/clock_source.h"
#include "mongo/util/clock_source_mock.h"
@@ -141,9 +141,9 @@ void createDirectoryClean(const boost::filesystem::path& dir) {
FTDCTest::FTDCTest() {
auto service = getServiceContext();
- service->setFastClockSource(stdx::make_unique<ClockSourceMock>());
- service->setPreciseClockSource(stdx::make_unique<ClockSourceMock>());
- service->setTickSource(stdx::make_unique<TickSourceMock<>>());
+ service->setFastClockSource(std::make_unique<ClockSourceMock>());
+ service->setPreciseClockSource(std::make_unique<ClockSourceMock>());
+ service->setTickSource(std::make_unique<TickSourceMock<>>());
}
} // namespace mongo