aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp
diff options
context:
space:
mode:
authorGeir Storli <geirst@vespa.ai>2024-04-26 17:00:14 +0200
committerGitHub <noreply@github.com>2024-04-26 17:00:14 +0200
commit63b2a4f138914dd1b974908305dd0daa9ce4633c (patch)
tree3fa831123f9581e4be1e818d6a20874e8d261cc6 /searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp
parent970e8747037a91dad423f073e08be2612bdeb71a (diff)
parentdd097b175f164d93da7765e827bcdd6fa0a006b6 (diff)
Merge pull request #31061 from vespa-engine/toregge/expose-imported-attributes-in-metrics
Expose imported attributes in metrics.
Diffstat (limited to 'searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp')
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp
index dd66c7ceb46..3c7d197d5e1 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp
@@ -9,19 +9,23 @@
#include <vespa/searchcommon/attribute/status.h>
#include <vespa/searchcore/proton/attribute/attribute_usage_filter.h>
#include <vespa/searchcore/proton/attribute/i_attribute_manager.h>
+#include <vespa/searchcore/proton/attribute/imported_attributes_repo.h>
#include <vespa/searchcore/proton/docsummary/isummarymanager.h>
#include <vespa/searchcore/proton/matching/matching_stats.h>
#include <vespa/searchcore/proton/metrics/documentdb_job_trackers.h>
#include <vespa/searchcore/proton/metrics/executor_threading_service_stats.h>
#include <vespa/searchlib/attribute/attributevector.h>
+#include <vespa/searchlib/attribute/imported_attribute_vector.h>
#include <vespa/vespalib/stllike/cache_stats.h>
#include <vespa/searchlib/util/searchable_stats.h>
#include <vespa/vespalib/util/memoryusage.h>
+#include <vespa/vespalib/util/size_literals.h>
#include <vespa/log/log.h>
LOG_SETUP(".proton.server.documentdb_metrics_updater");
using search::LidUsageStats;
+using search::attribute::ImportedAttributeVector;
using vespalib::CacheStats;
using vespalib::MemoryUsage;
@@ -141,6 +145,18 @@ fillTempAttributeMetrics(TempAttributeMetrics &totalMetrics,
fillTempAttributeMetrics(*subMetrics, attr->getName(), memoryUsage, bitVectors);
}
}
+ auto imported = attrMgr->getImportedAttributes();
+ if (imported != nullptr) {
+ std::vector<std::shared_ptr<ImportedAttributeVector>> i_list;
+ imported->getAll(i_list);
+ for (const auto& attr : i_list) {
+ auto memory_usage = attr->get_memory_usage();
+ fillTempAttributeMetrics(totalMetrics, attr->getName(), memory_usage, 0);
+ if (subMetrics != nullptr) {
+ fillTempAttributeMetrics(*subMetrics, attr->getName(), memory_usage, 0);
+ }
+ }
+ }
}
}
}