aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/metrics/legacy_sessionmanager_metrics.h
blob: 3e8e3f54c02e4bfb6d0246e9b682f5a88694c40f (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
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/metrics/countmetric.h>
#include <vespa/metrics/metricset.h>
#include <vespa/metrics/valuemetric.h>
#include <vespa/searchcore/proton/matching/sessionmanager.h>

namespace proton {

/**
 * Legacy metrics for session manager cache.
 * TODO: Remove on Vespa 7
 */
struct LegacySessionManagerMetrics : metrics::MetricSet
{
    metrics::LongCountMetric numInsert;
    metrics::LongCountMetric numPick;
    metrics::LongCountMetric numDropped;
    metrics::LongValueMetric numCached;
    metrics::LongCountMetric numTimedout;

    void update(const proton::matching::SessionManager::Stats &stats);
    LegacySessionManagerMetrics(metrics::MetricSet *parent);
    ~LegacySessionManagerMetrics();
};

}