aboutsummaryrefslogtreecommitdiffstats
path: root/storage/src/vespa/storage/storageserver/fnet_metrics_wrapper.cpp
blob: 5b13e6fc3e759e2422fc699031d146478e1e672a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "fnet_metrics_wrapper.h"

namespace storage {

FnetMetricsWrapper::FnetMetricsWrapper(metrics::MetricSet* owner)
    : metrics::MetricSet("fnet", {}, "transport layer metrics", owner),
      _num_connections("num-connections", {}, "total number of connection objects", this)
{
}

FnetMetricsWrapper::~FnetMetricsWrapper() = default;

void
FnetMetricsWrapper::update_metrics()
{
    _num_connections.set(FNET_Connection::get_num_connections());
}

}