aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-10-22 16:30:17 +0200
committerGitHub <noreply@github.com>2021-10-22 16:30:17 +0200
commit5d17da853b36dd4d2798195de709438725e6351c (patch)
tree9cb6e4eb790cab9a7dbbff82af52a3f8b8c40fb4 /searchcore
parent1eef1ea9cae67ac87725eeee379c3435ff45f858 (diff)
parente0e101daff1db918463976907a47ccbe57cc3d50 (diff)
Merge pull request #19692 from vespa-engine/balder/count-working-days-2
Add a metric for how many times a worker in a thread pool has woken up.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.h8
2 files changed, 9 insertions, 3 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.cpp b/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.cpp
index 74e0971178c..3c98857242f 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.cpp
+++ b/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.cpp
@@ -10,6 +10,8 @@ ExecutorMetrics::update(const vespalib::ExecutorStats &stats)
maxPending.set(stats.queueSize.max());
accepted.inc(stats.acceptedTasks);
rejected.inc(stats.rejectedTasks);
+ wakeupCount.inc(stats.wakeupCount);
+ util.set(stats.getUtil());
const auto & qSize = stats.queueSize;
queueSize.addValueBatch(qSize.average(), qSize.count(), qSize.min(), qSize.max());
}
@@ -19,6 +21,8 @@ ExecutorMetrics::ExecutorMetrics(const std::string &name, metrics::MetricSet *pa
maxPending("maxpending", {}, "Maximum number of pending (active + queued) tasks", this),
accepted("accepted", {}, "Number of accepted tasks", this),
rejected("rejected", {}, "Number of rejected tasks", this),
+ wakeupCount("wakeupCount", {}, "Number of times a worker thread has been woken up", this),
+ util("utilization", {}, "Ratio of time the worker threads has been active", this),
queueSize("queuesize", {}, "Size of task queue", this)
{
}
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.h b/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.h
index 273c4ed8979..31d959a399f 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.h
+++ b/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.h
@@ -11,9 +11,11 @@ namespace proton {
struct ExecutorMetrics : metrics::MetricSet
{
- metrics::LongValueMetric maxPending; // TODO Remove on Vespa 8 or sooner if possible.
- metrics::LongCountMetric accepted;
- metrics::LongCountMetric rejected;
+ metrics::LongValueMetric maxPending; // TODO Remove on Vespa 8 or sooner if possible.
+ metrics::LongCountMetric accepted;
+ metrics::LongCountMetric rejected;
+ metrics::LongCountMetric wakeupCount;
+ metrics::DoubleValueMetric util;
metrics::LongAverageMetric queueSize;
void update(const vespalib::ExecutorStats &stats);