per include/seastar/core/metrics.hh,
// The value binding data types
enum class data_type : uint8_t {
COUNTER, // unsigned int 64
GAUGE, // double
DERIVE, // signed int 64
ABSOLUTE, // unsigned int 64
HISTOGRAM,
};
the DERIVE values are signed.
Signed-off-by: Kefu Chai <kchai@redhat.com>
f->dump_float(full_name, v.d());
break;
case data_type::COUNTER:
- [[fallthrough]];
- case data_type::DERIVE:
f->dump_unsigned(full_name, v.ui());
break;
+ case data_type::DERIVE:
+ f->dump_int(full_name, v.i());
+ break;
case data_type::HISTOGRAM: {
f->open_object_section(full_name);
auto&& h = v.get_histogram();