blob: f929706dd7077dbce771a2ae6e8cba36e1343ca8 (
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
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "countmetricvalues.h"
#include <sstream>
namespace metrics {
template <typename T>
std::string
CountMetricValues<T>::toString() const {
std::ostringstream ost;
ost << _value;
return ost.str();
}
template <typename T>
double
CountMetricValues<T>::getDoubleValue(stringref) const {
return static_cast<double>(_value);
}
template <typename T>
uint64_t
CountMetricValues<T>::getLongValue(stringref) const {
return static_cast<uint64_t>(_value);
}
template <typename T>
void
CountMetricValues<T>::output(const std::string&, std::ostream& out) const {
out << _value;
}
template <typename T>
void
CountMetricValues<T>::output(const std::string&, vespalib::JsonStream& stream) const {
stream << _value;
}
} // metrics
|