summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-03-25 11:40:45 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-03-25 11:40:45 +0000
commit44ec2d74b5e828b7d1f0bc97a315846a3d5051ac (patch)
tree330b9dcf6b741a5609647d6685ffe1e421901dae /searchcore
parent668412faf939d3d3d185c6e7c81056c4cdb5afe3 (diff)
Unify the metrics for queuesize similar to what we have for the spi queues.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.cpp7
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.h3
2 files changed, 7 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 710c072aa53..f4e9bff1b4b 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.cpp
+++ b/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.cpp
@@ -7,16 +7,19 @@ namespace proton {
void
ExecutorMetrics::update(const vespalib::ThreadStackExecutorBase::Stats &stats)
{
- maxPending.set(stats.maxPendingTasks);
+ maxPending.set(stats.queueSize.max());
accepted.inc(stats.acceptedTasks);
rejected.inc(stats.rejectedTasks);
+ const vespalib::ThreadStackExecutorBase::Stats::QueueSizeT & qSize = stats.queueSize;
+ queueSize.addValueBatch(qSize.average(), qSize.count(), qSize.min(), qSize.max());
}
ExecutorMetrics::ExecutorMetrics(const std::string &name, metrics::MetricSet *parent)
: metrics::MetricSet(name, {}, "Instance specific thread executor metrics", parent),
maxPending("maxpending", {}, "Maximum number of pending (active + queued) tasks", this),
accepted("accepted", {}, "Number of accepted tasks", this),
- rejected("rejected", {}, "Number of rejected tasks", this)
+ rejected("rejected", {}, "Number of rejected tasks", 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 a347edffd4b..6b638391d1e 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.h
+++ b/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.h
@@ -11,9 +11,10 @@ namespace proton {
struct ExecutorMetrics : metrics::MetricSet
{
- metrics::LongValueMetric maxPending;
+ metrics::LongValueMetric maxPending; // TODO Remove on Vespa 8 or sooner if possible.
metrics::LongCountMetric accepted;
metrics::LongCountMetric rejected;
+ metrics::LongAverageMetric queueSize;
void update(const vespalib::ThreadStackExecutorBase::Stats &stats);
ExecutorMetrics(const std::string &name, metrics::MetricSet *parent);