aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/metrics/executor_metrics.h
blob: 4ad67dfc6f93b85a025b4c2f01879e68ba5458dc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/metrics/metricset.h>
#include <vespa/metrics/countmetric.h>
#include <vespa/metrics/valuemetric.h>
#include <vespa/vespalib/util/executor_stats.h>

namespace proton {

struct ExecutorMetrics : metrics::MetricSet
{
    metrics::LongCountMetric   accepted;
    metrics::LongCountMetric   rejected;
    metrics::LongCountMetric   wakeupCount;
    metrics::DoubleValueMetric util;
    metrics::DoubleValueMetric saturation;
    metrics::LongAverageMetric queueSize;

    void update(const vespalib::ExecutorStats &stats);
    ExecutorMetrics(const std::string &name, metrics::MetricSet *parent);
    ~ExecutorMetrics();
};

} // namespace proton