summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@oath.com>2022-01-25 13:58:18 +0000
committerHåvard Pettersen <havardpe@oath.com>2022-01-26 12:18:18 +0000
commit895b7150fccfbaa5ebeb225399bfef0d7052174b (patch)
tree717dcb7fe56d4eb6cde88d76da49909a2dfa2cbd /searchcore
parent1ecbb8ced4c2599155a2438625987b78e174bd5a (diff)
tag match/summary engines with READ cpu usage
tag llvm compilation tasks with SETUP cpu usage
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/matchengine/matchengine.cpp9
-rw-r--r--searchcore/src/vespa/searchcore/proton/summaryengine/summaryengine.cpp4
2 files changed, 10 insertions, 3 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/matchengine/matchengine.cpp b/searchcore/src/vespa/searchcore/proton/matchengine/matchengine.cpp
index 58dc473b85e..0978a0a9bae 100644
--- a/searchcore/src/vespa/searchcore/proton/matchengine/matchengine.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matchengine/matchengine.cpp
@@ -6,6 +6,7 @@
#include <vespa/vespalib/data/smart_buffer.h>
#include <vespa/vespalib/data/slime/binary_format.h>
#include <vespa/vespalib/util/size_literals.h>
+#include <vespa/vespalib/util/cpu_usage.h>
#include <vespa/log/log.h>
@@ -34,12 +35,14 @@ public:
};
VESPA_THREAD_STACK_TAG(match_engine_executor)
+VESPA_THREAD_STACK_TAG(match_engine_thread_bundle)
} // namespace anon
namespace proton {
using namespace vespalib::slime;
+using vespalib::CpuUsage;
MatchEngine::MatchEngine(size_t numThreads, size_t threadsPerSearch, uint32_t distributionKey, bool async)
: _lock(),
@@ -48,8 +51,10 @@ MatchEngine::MatchEngine(size_t numThreads, size_t threadsPerSearch, uint32_t di
_closed(false),
_forward_issues(true),
_handlers(),
- _executor(std::max(size_t(1), numThreads / threadsPerSearch), 256_Ki, match_engine_executor),
- _threadBundlePool(std::max(size_t(1), threadsPerSearch)),
+ _executor(std::max(size_t(1), numThreads / threadsPerSearch), 256_Ki,
+ CpuUsage::wrap(match_engine_executor, CpuUsage::Category::READ)),
+ _threadBundlePool(std::max(size_t(1), threadsPerSearch),
+ CpuUsage::wrap(match_engine_thread_bundle, CpuUsage::Category::READ)),
_nodeUp(false),
_nodeMaintenance(false)
{
diff --git a/searchcore/src/vespa/searchcore/proton/summaryengine/summaryengine.cpp b/searchcore/src/vespa/searchcore/proton/summaryengine/summaryengine.cpp
index 95643c7d1a8..a42fab782cb 100644
--- a/searchcore/src/vespa/searchcore/proton/summaryengine/summaryengine.cpp
+++ b/searchcore/src/vespa/searchcore/proton/summaryengine/summaryengine.cpp
@@ -2,6 +2,7 @@
#include "summaryengine.h"
#include <vespa/vespalib/data/slime/slime.h>
#include <vespa/vespalib/util/size_literals.h>
+#include <vespa/vespalib/util/cpu_usage.h>
#include <vespa/log/log.h>
LOG_SETUP(".proton.summaryengine.summaryengine");
@@ -10,6 +11,7 @@ using namespace search::engine;
using namespace proton;
using vespalib::Memory;
using vespalib::slime::Inspector;
+using vespalib::CpuUsage;
namespace {
@@ -61,7 +63,7 @@ SummaryEngine::SummaryEngine(size_t numThreads, bool async)
_closed(false),
_forward_issues(true),
_handlers(),
- _executor(numThreads, 128_Ki, summary_engine_executor),
+ _executor(numThreads, 128_Ki, CpuUsage::wrap(summary_engine_executor, CpuUsage::Category::READ)),
_metrics(std::make_unique<DocsumMetrics>())
{ }