aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/metrics/content_proton_metrics.h
blob: c82a6804380d198b9924a39544fbca65a7e9627f (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
44
45
46
47
48
49
50
51
52
53
54
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include "executor_metrics.h"
#include "resource_usage_metrics.h"
#include "trans_log_server_metrics.h"
#include "sessionmanager_metrics.h"

namespace proton {

/**
 * Metric set for all metrics reported by proton.
 *
 * This class uses the new metric naming scheme decided in architect meeting 2014-10-30.
 * All proton metrics use the prefix "content.proton." and dimensions where appropriate.
 * For instance, all document db metrics use the dimension "documenttype":"mydoctype"
 * instead of using the document type name as part of metric names.
 */
struct ContentProtonMetrics : metrics::MetricSet
{
    struct ProtonExecutorMetrics : metrics::MetricSet {

        ExecutorMetrics proton;
        ExecutorMetrics flush;
        ExecutorMetrics match;
        ExecutorMetrics docsum;
        ExecutorMetrics shared;
        ExecutorMetrics warmup;
        ExecutorMetrics field_writer;

        ProtonExecutorMetrics(metrics::MetricSet *parent);
        ~ProtonExecutorMetrics();
    };

    struct SessionCacheMetrics : metrics::MetricSet {
        SessionManagerMetrics search;
        SessionManagerMetrics grouping;

        SessionCacheMetrics(metrics::MetricSet *parent);
        ~SessionCacheMetrics() override;
    };

    metrics::LongValueMetric configGeneration;
    TransLogServerMetrics transactionLog;
    ResourceUsageMetrics resourceUsage;
    ProtonExecutorMetrics executor;
    SessionCacheMetrics sessionCache;

    ContentProtonMetrics();
    ~ContentProtonMetrics() override;
};

}