blob: e19f26bd5d044747470f22165a3b131e94ddb600 (
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
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/vespalib/stllike/string.h>
#include <vespa/vespalib/data/slime/slime.h>
namespace vespalib {
class SimpleMetricSnapshot
{
private:
vespalib::Slime _data;
vespalib::slime::Cursor& _metrics;
vespalib::slime::Cursor& _values;
double _snapLen;
public:
SimpleMetricSnapshot(uint32_t prevTime, uint32_t currTime);
void addCount(const char *name, const char *desc, uint32_t count);
void addGauge(const char *name, const char *desc, long gauge);
vespalib::string asString() const {
return _data.toString();
}
};
} // namespace vespalib
|