summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/scoped_timer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/exec/scoped_timer.cpp')
-rw-r--r--src/mongo/db/exec/scoped_timer.cpp23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/mongo/db/exec/scoped_timer.cpp b/src/mongo/db/exec/scoped_timer.cpp
index bd53003faa5..f33c498a57a 100644
--- a/src/mongo/db/exec/scoped_timer.cpp
+++ b/src/mongo/db/exec/scoped_timer.cpp
@@ -32,8 +32,6 @@
#include "mongo/db/exec/scoped_timer.h"
#include "mongo/util/clock_source.h"
-#include "mongo/bson/bsonobjbuilder.h"
-
namespace mongo {
ScopedTimer::ScopedTimer(ClockSource* cs, long long* counter)
@@ -44,25 +42,4 @@ ScopedTimer::~ScopedTimer() {
*_counter += elapsed;
}
-
-TimeElapsedBuilderScopedTimer::TimeElapsedBuilderScopedTimer(ClockSource* clockSource,
- StringData description,
- BSONObjBuilder* builder)
- : _clockSource(clockSource),
- _description(description),
- _beginTime(clockSource->now()),
- _builder(builder) {}
-
-TimeElapsedBuilderScopedTimer::~TimeElapsedBuilderScopedTimer() {
- mongo::Milliseconds elapsedTime = _clockSource->now() - _beginTime;
- _builder->append(_description, elapsedTime.toString());
-}
-
-boost::optional<TimeElapsedBuilderScopedTimer> createTimeElapsedBuilderScopedTimer(
- ClockSource* clockSource, StringData description, BSONObjBuilder* builder) {
- if (builder == nullptr) {
- return boost::none;
- }
- return TimeElapsedBuilderScopedTimer(clockSource, description, builder);
-}
} // namespace mongo