typedef buffer_type::iterator mark_type;
typedef buffer_type::const_iterator const_mark_type;
- buffer_type _buf;
+ buffer_type _buf = {};
mark_type _pos;
bool _overflow = false;
write_le(tmpi);
break;
}
- case data_type::DERIVE:
- write(v.i()); // signed int 64, big endian
- break;
case data_type::COUNTER:
- case data_type::ABSOLUTE:
+ case data_type::REAL_COUNTER:
write(v.ui()); // unsigned int 64, big endian
break;
default:
_metrics.add_group("scollectd", {
// total_bytes value:DERIVE:0:U
- sm::make_derive("total_bytes_sent", sm::description("total bytes sent"), _bytes),
+ sm::make_counter("total_bytes_sent", sm::description("total bytes sent"), _bytes),
// total_requests value:DERIVE:0:U
- sm::make_derive("total_requests", sm::description("total requests"), _num_packets),
+ sm::make_counter("total_requests", sm::description("total requests"), _num_packets),
// latency value:GAUGE:0:U
sm::make_gauge("latency", sm::description("avrage latency"), _avg),
// total_time_in_ms value:DERIVE:0:U
- sm::make_derive("total_time_in_ms", sm::description("total time in milliseconds"), _millis),
+ sm::make_counter("total_time_in_ms", sm::description("total time in milliseconds"), _millis),
// total_values value:DERIVE:0:U
sm::make_gauge("total_values", sm::description("current number of values reported"), [this] {return values().size();}),
// records value:GAUGE:0:U