blob: 759851c51f931a8cc453b1fd7a01f499ec4dc56b (
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
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "tls_stats_factory.h"
#include "tls_stats_map.h"
#include <vespa/searchlib/transactionlog/translogserver.h>
using search::transactionlog::DomainInfo;
using search::transactionlog::DomainStats;
namespace proton::flushengine {
TlsStatsFactory::TlsStatsFactory(TransLogServer::SP tls)
: _tls(tls)
{
}
TlsStatsFactory::~TlsStatsFactory()
{
}
TlsStatsMap
TlsStatsFactory::create()
{
DomainStats stats = _tls->getDomainStats();
TlsStatsMap::Map map;
for (auto &itr : stats) {
const DomainInfo &di = itr.second;
map.insert(std::make_pair(itr.first,
TlsStats(di.byteSize,
di.range.from(),
di.range.to())));
}
return TlsStatsMap(std::move(map));
}
}
|