blob: 1c4539d70ee5c1f654f861c3282e7bc06f6aaa94 (
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
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "simple_metrics_producer.h"
namespace vespalib {
SimpleMetricsProducer::SimpleMetricsProducer()
: _lock(),
_metrics(),
_totalMetrics()
{
}
SimpleMetricsProducer::~SimpleMetricsProducer() = default;
void
SimpleMetricsProducer::setMetrics(const vespalib::string &metrics)
{
std::lock_guard guard(_lock);
_metrics = metrics;
}
vespalib::string
SimpleMetricsProducer::getMetrics(const vespalib::string &)
{
std::lock_guard guard(_lock);
return _metrics;
}
void
SimpleMetricsProducer::setTotalMetrics(const vespalib::string &metrics)
{
std::lock_guard guard(_lock);
_totalMetrics = metrics;
}
vespalib::string
SimpleMetricsProducer::getTotalMetrics(const vespalib::string &)
{
std::lock_guard guard(_lock);
return _totalMetrics;
}
} // namespace vespalib
|