aboutsummaryrefslogtreecommitdiffstats
path: root/storage/src/vespa/storage/storageserver/storagemetricsset.h
blob: b472afbceed37321a29371cadb3b456768b03bfb (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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include "tls_statistics_metrics_wrapper.h"
#include "fnet_metrics_wrapper.h"

namespace storage {

class MessageMemoryUseMetricSet : public metrics::MetricSet
{
public:
    metrics::LongValueMetric total;
    metrics::LongValueMetric lowpri;
    metrics::LongValueMetric normalpri;
    metrics::LongValueMetric highpri;
    metrics::LongValueMetric veryhighpri;

    explicit MessageMemoryUseMetricSet(metrics::MetricSet* owner);
    ~MessageMemoryUseMetricSet() override;
};

struct StorageMetricSet : public metrics::MetricSet
{
    metrics::LongValueMetric memoryUse;
    MessageMemoryUseMetricSet memoryUse_messages;
    metrics::LongValueMetric memoryUse_visiting;

    TlsStatisticsMetricsWrapper tls_metrics;
    FnetMetricsWrapper fnet_metrics;

    StorageMetricSet();
    ~StorageMetricSet() override;
    void updateMetrics();
};

} // storage