summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/window_function
diff options
context:
space:
mode:
authorNick Zolnierz <nicholas.zolnierz@mongodb.com>2021-03-31 14:35:10 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-04-30 14:22:03 +0000
commitf36132ec219dd8cfdab420403f10d18666249947 (patch)
treeb670698b942e7dbf84e01ae9e1afd061680ec457 /src/mongo/db/pipeline/window_function
parent3295126e8a081ca57af1a07c6c582fac7a825efd (diff)
downloadmongo-f36132ec219dd8cfdab420403f10d18666249947.tar.gz
SERVER-54664 Add per-function execution stats to $setWindowFields stage
Diffstat (limited to 'src/mongo/db/pipeline/window_function')
-rw-r--r--src/mongo/db/pipeline/window_function/window_function_exec_removable_document.cpp1
-rw-r--r--src/mongo/db/pipeline/window_function/window_function_exec_removable_document.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/window_function/window_function_exec_removable_document.cpp b/src/mongo/db/pipeline/window_function/window_function_exec_removable_document.cpp
index 99ddf7fb4e2..38a61a000bd 100644
--- a/src/mongo/db/pipeline/window_function/window_function_exec_removable_document.cpp
+++ b/src/mongo/db/pipeline/window_function/window_function_exec_removable_document.cpp
@@ -63,6 +63,7 @@ WindowFunctionExecRemovableDocument::WindowFunctionExecRemovableDocument(
[&](const int& upperIndex) { _upperBound = upperIndex; },
},
bounds.upper);
+ _memUsageBytes = sizeof(*this);
}
void WindowFunctionExecRemovableDocument::initialize() {
diff --git a/src/mongo/db/pipeline/window_function/window_function_exec_removable_document.h b/src/mongo/db/pipeline/window_function/window_function_exec_removable_document.h
index bc0c81e094a..b8564eda950 100644
--- a/src/mongo/db/pipeline/window_function/window_function_exec_removable_document.h
+++ b/src/mongo/db/pipeline/window_function/window_function_exec_removable_document.h
@@ -69,12 +69,14 @@ public:
WindowBounds::DocumentBased bounds)
: WindowFunctionExecRemovableDocument(iter, std::move(input), std::move(function), bounds) {
_sortBy = std::move(sortBy);
+ _memUsageBytes = sizeof(*this);
}
void reset() final {
_function->reset();
_values = std::queue<Value>();
_initialized = false;
+ _memUsageBytes = sizeof(*this);
}
private: