summaryrefslogtreecommitdiff
path: root/src/mongo/db/stats
diff options
context:
space:
mode:
authorHenrik Edin <henrik.edin@mongodb.com>2021-09-27 18:50:00 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-09-27 19:15:10 +0000
commitf39e5fd6735431e899f1fc1689184f63b4b461ae (patch)
treef7faf02fe44d11ede2b7e38749875376a2ee0a5f /src/mongo/db/stats
parent4ea51acda7d7659cb75dfdc6ed463bc5104c8238 (diff)
downloadmongo-f39e5fd6735431e899f1fc1689184f63b4b461ae.tar.gz
SERVER-60087 Add stats under collStats for timeseries bucket compression
Diffstat (limited to 'src/mongo/db/stats')
-rw-r--r--src/mongo/db/stats/SConscript1
-rw-r--r--src/mongo/db/stats/storage_stats.cpp2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/db/stats/SConscript b/src/mongo/db/stats/SConscript
index d7a439cd38e..b27a81181ac 100644
--- a/src/mongo/db/stats/SConscript
+++ b/src/mongo/db/stats/SConscript
@@ -129,6 +129,7 @@ env.Library(
'$BUILD_DIR/mongo/db/index/index_access_method',
'$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',
],
diff --git a/src/mongo/db/stats/storage_stats.cpp b/src/mongo/db/stats/storage_stats.cpp
index 96067384f6a..a2253d49706 100644
--- a/src/mongo/db/stats/storage_stats.cpp
+++ b/src/mongo/db/stats/storage_stats.cpp
@@ -38,6 +38,7 @@
#include "mongo/db/index/index_access_method.h"
#include "mongo/db/index/index_descriptor.h"
#include "mongo/db/timeseries/bucket_catalog.h"
+#include "mongo/db/timeseries/timeseries_stats.h"
#include "mongo/db/views/view_catalog.h"
#include "mongo/logv2/log.h"
@@ -99,6 +100,7 @@ Status appendCollectionStorageStats(OperationContext* opCtx,
bob.append("avgBucketSize", collection->averageObjectSize(opCtx));
}
BucketCatalog::get(opCtx).appendExecutionStats(collNss.getTimeseriesViewNamespace(), &bob);
+ TimeseriesStats::get(collection.get()).append(&bob);
} else {
result->appendNumber("count", numRecords);
if (numRecords) {