aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/metrics/legacy_proton_metrics.h
blob: 03b73761ce5acebce306747523fa1b36635893f0 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/metrics/metrics.h>
#include "executor_metrics.h"

namespace proton {

/**
 * Metric set for all legacy metrics reported by proton.
 *
 * @deprecated Use ContentProtonMetrics for all new metrics.
 */
struct LegacyProtonMetrics : metrics::MetricSet
{
    struct DocumentTypeMetrics : metrics::MetricSet {
        // documentdb metrics will be wired in here (by the metrics engine)
        DocumentTypeMetrics(metrics::MetricSet *parent);
        ~DocumentTypeMetrics();
    };

    DocumentTypeMetrics                          docTypes;
    ExecutorMetrics                              executor;
    ExecutorMetrics                              flushExecutor;
    ExecutorMetrics                              matchExecutor;
    ExecutorMetrics                              summaryExecutor;
    metrics::SumMetric<metrics::LongValueMetric> memoryUsage;
    metrics::SumMetric<metrics::LongValueMetric> diskUsage;
    metrics::SumMetric<metrics::LongValueMetric> docsInMemory;
    metrics::SumMetric<metrics::LongValueMetric> numDocs;
    metrics::SumMetric<metrics::LongValueMetric> numActiveDocs;
    metrics::SumMetric<metrics::LongValueMetric> numIndexedDocs;
    metrics::SumMetric<metrics::LongValueMetric> numStoredDocs;
    metrics::SumMetric<metrics::LongValueMetric> numRemovedDocs;
    // transport metrics will be wired in here

    LegacyProtonMetrics();
    ~LegacyProtonMetrics();
};

} // namespace proton