Commit e4c2891f authored by Bjoern Rabenstein's avatar Bjoern Rabenstein

Change type CUSTOM into UNTYPED.

Change-Id: I407fbd2fd9b9482db34962a49761e8a089f279ab
parent ba21f95d
This diff is collapsed.
......@@ -41,7 +41,7 @@ class Gauge;
class Counter;
class Quantile;
class Summary;
class Custom;
class Untyped;
class Metric;
class MetricFamily;
......@@ -49,11 +49,11 @@ enum MetricType {
COUNTER = 0,
GAUGE = 1,
SUMMARY = 2,
CUSTOM = 3
UNTYPED = 3
};
bool MetricType_IsValid(int value);
const MetricType MetricType_MIN = COUNTER;
const MetricType MetricType_MAX = CUSTOM;
const MetricType MetricType_MAX = UNTYPED;
const int MetricType_ARRAYSIZE = MetricType_MAX + 1;
const ::google::protobuf::EnumDescriptor* MetricType_descriptor();
......@@ -531,14 +531,14 @@ class Summary : public ::google::protobuf::Message {
};
// -------------------------------------------------------------------
class Custom : public ::google::protobuf::Message {
class Untyped : public ::google::protobuf::Message {
public:
Custom();
virtual ~Custom();
Untyped();
virtual ~Untyped();
Custom(const Custom& from);
Untyped(const Untyped& from);
inline Custom& operator=(const Custom& from) {
inline Untyped& operator=(const Untyped& from) {
CopyFrom(from);
return *this;
}
......@@ -552,17 +552,17 @@ class Custom : public ::google::protobuf::Message {
}
static const ::google::protobuf::Descriptor* descriptor();
static const Custom& default_instance();
static const Untyped& default_instance();
void Swap(Custom* other);
void Swap(Untyped* other);
// implements Message ----------------------------------------------
Custom* New() const;
Untyped* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
void CopyFrom(const Custom& from);
void MergeFrom(const Custom& from);
void CopyFrom(const Untyped& from);
void MergeFrom(const Untyped& from);
void Clear();
bool IsInitialized() const;
......@@ -592,7 +592,7 @@ class Custom : public ::google::protobuf::Message {
inline double value() const;
inline void set_value(double value);
// @@protoc_insertion_point(class_scope:io.prometheus.client.Custom)
// @@protoc_insertion_point(class_scope:io.prometheus.client.Untyped)
private:
inline void set_has_value();
inline void clear_has_value();
......@@ -609,7 +609,7 @@ class Custom : public ::google::protobuf::Message {
friend void protobuf_ShutdownFile_metrics_2eproto();
void InitAsDefaultInstance();
static Custom* default_instance_;
static Untyped* default_instance_;
};
// -------------------------------------------------------------------
......@@ -706,14 +706,14 @@ class Metric : public ::google::protobuf::Message {
inline ::io::prometheus::client::Summary* release_summary();
inline void set_allocated_summary(::io::prometheus::client::Summary* summary);
// optional .io.prometheus.client.Custom custom = 5;
inline bool has_custom() const;
inline void clear_custom();
static const int kCustomFieldNumber = 5;
inline const ::io::prometheus::client::Custom& custom() const;
inline ::io::prometheus::client::Custom* mutable_custom();
inline ::io::prometheus::client::Custom* release_custom();
inline void set_allocated_custom(::io::prometheus::client::Custom* custom);
// optional .io.prometheus.client.Untyped untyped = 5;
inline bool has_untyped() const;
inline void clear_untyped();
static const int kUntypedFieldNumber = 5;
inline const ::io::prometheus::client::Untyped& untyped() const;
inline ::io::prometheus::client::Untyped* mutable_untyped();
inline ::io::prometheus::client::Untyped* release_untyped();
inline void set_allocated_untyped(::io::prometheus::client::Untyped* untyped);
// optional int64 timestamp_ms = 6;
inline bool has_timestamp_ms() const;
......@@ -730,8 +730,8 @@ class Metric : public ::google::protobuf::Message {
inline void clear_has_counter();
inline void set_has_summary();
inline void clear_has_summary();
inline void set_has_custom();
inline void clear_has_custom();
inline void set_has_untyped();
inline void clear_has_untyped();
inline void set_has_timestamp_ms();
inline void clear_has_timestamp_ms();
......@@ -741,7 +741,7 @@ class Metric : public ::google::protobuf::Message {
::io::prometheus::client::Gauge* gauge_;
::io::prometheus::client::Counter* counter_;
::io::prometheus::client::Summary* summary_;
::io::prometheus::client::Custom* custom_;
::io::prometheus::client::Untyped* untyped_;
::google::protobuf::int64 timestamp_ms_;
mutable int _cached_size_;
......@@ -1201,26 +1201,26 @@ Summary::mutable_quantile() {
// -------------------------------------------------------------------
// Custom
// Untyped
// optional double value = 1;
inline bool Custom::has_value() const {
inline bool Untyped::has_value() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void Custom::set_has_value() {
inline void Untyped::set_has_value() {
_has_bits_[0] |= 0x00000001u;
}
inline void Custom::clear_has_value() {
inline void Untyped::clear_has_value() {
_has_bits_[0] &= ~0x00000001u;
}
inline void Custom::clear_value() {
inline void Untyped::clear_value() {
value_ = 0;
clear_has_value();
}
inline double Custom::value() const {
inline double Untyped::value() const {
return value_;
}
inline void Custom::set_value(double value) {
inline void Untyped::set_value(double value) {
set_has_value();
value_ = value;
}
......@@ -1368,41 +1368,41 @@ inline void Metric::set_allocated_summary(::io::prometheus::client::Summary* sum
}
}
// optional .io.prometheus.client.Custom custom = 5;
inline bool Metric::has_custom() const {
// optional .io.prometheus.client.Untyped untyped = 5;
inline bool Metric::has_untyped() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
inline void Metric::set_has_custom() {
inline void Metric::set_has_untyped() {
_has_bits_[0] |= 0x00000010u;
}
inline void Metric::clear_has_custom() {
inline void Metric::clear_has_untyped() {
_has_bits_[0] &= ~0x00000010u;
}
inline void Metric::clear_custom() {
if (custom_ != NULL) custom_->::io::prometheus::client::Custom::Clear();
clear_has_custom();
inline void Metric::clear_untyped() {
if (untyped_ != NULL) untyped_->::io::prometheus::client::Untyped::Clear();
clear_has_untyped();
}
inline const ::io::prometheus::client::Custom& Metric::custom() const {
return custom_ != NULL ? *custom_ : *default_instance_->custom_;
inline const ::io::prometheus::client::Untyped& Metric::untyped() const {
return untyped_ != NULL ? *untyped_ : *default_instance_->untyped_;
}
inline ::io::prometheus::client::Custom* Metric::mutable_custom() {
set_has_custom();
if (custom_ == NULL) custom_ = new ::io::prometheus::client::Custom;
return custom_;
inline ::io::prometheus::client::Untyped* Metric::mutable_untyped() {
set_has_untyped();
if (untyped_ == NULL) untyped_ = new ::io::prometheus::client::Untyped;
return untyped_;
}
inline ::io::prometheus::client::Custom* Metric::release_custom() {
clear_has_custom();
::io::prometheus::client::Custom* temp = custom_;
custom_ = NULL;
inline ::io::prometheus::client::Untyped* Metric::release_untyped() {
clear_has_untyped();
::io::prometheus::client::Untyped* temp = untyped_;
untyped_ = NULL;
return temp;
}
inline void Metric::set_allocated_custom(::io::prometheus::client::Custom* custom) {
delete custom_;
custom_ = custom;
if (custom) {
set_has_custom();
inline void Metric::set_allocated_untyped(::io::prometheus::client::Untyped* untyped) {
delete untyped_;
untyped_ = untyped;
if (untyped) {
set_has_untyped();
} else {
clear_has_custom();
clear_has_untyped();
}
}
......
......@@ -14,7 +14,7 @@ It has these top-level messages:
Counter
Quantile
Summary
Custom
Untyped
Metric
MetricFamily
*/
......@@ -35,20 +35,20 @@ const (
MetricType_COUNTER MetricType = 0
MetricType_GAUGE MetricType = 1
MetricType_SUMMARY MetricType = 2
MetricType_CUSTOM MetricType = 3
MetricType_UNTYPED MetricType = 3
)
var MetricType_name = map[int32]string{
0: "COUNTER",
1: "GAUGE",
2: "SUMMARY",
3: "CUSTOM",
3: "UNTYPED",
}
var MetricType_value = map[string]int32{
"COUNTER": 0,
"GAUGE": 1,
"SUMMARY": 2,
"CUSTOM": 3,
"UNTYPED": 3,
}
func (x MetricType) Enum() *MetricType {
......@@ -180,16 +180,16 @@ func (m *Summary) GetQuantile() []*Quantile {
return nil
}
type Custom struct {
type Untyped struct {
Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Custom) Reset() { *m = Custom{} }
func (m *Custom) String() string { return proto.CompactTextString(m) }
func (*Custom) ProtoMessage() {}
func (m *Untyped) Reset() { *m = Untyped{} }
func (m *Untyped) String() string { return proto.CompactTextString(m) }
func (*Untyped) ProtoMessage() {}
func (m *Custom) GetValue() float64 {
func (m *Untyped) GetValue() float64 {
if m != nil && m.Value != nil {
return *m.Value
}
......@@ -201,7 +201,7 @@ type Metric struct {
Gauge *Gauge `protobuf:"bytes,2,opt,name=gauge" json:"gauge,omitempty"`
Counter *Counter `protobuf:"bytes,3,opt,name=counter" json:"counter,omitempty"`
Summary *Summary `protobuf:"bytes,4,opt,name=summary" json:"summary,omitempty"`
Custom *Custom `protobuf:"bytes,5,opt,name=custom" json:"custom,omitempty"`
Untyped *Untyped `protobuf:"bytes,5,opt,name=untyped" json:"untyped,omitempty"`
TimestampMs *int64 `protobuf:"varint,6,opt,name=timestamp_ms" json:"timestamp_ms,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
......@@ -238,9 +238,9 @@ func (m *Metric) GetSummary() *Summary {
return nil
}
func (m *Metric) GetCustom() *Custom {
func (m *Metric) GetUntyped() *Untyped {
if m != nil {
return m.Custom
return m.Untyped
}
return nil
}
......
......@@ -22,10 +22,10 @@ message LabelPair {
}
enum MetricType {
COUNTER = 0;
GAUGE = 1;
SUMMARY = 2;
CUSTOM = 3;
COUNTER = 0;
GAUGE = 1;
SUMMARY = 2;
UNTYPED = 3;
}
message Gauge {
......@@ -47,7 +47,7 @@ message Summary {
repeated Quantile quantile = 3;
}
message Custom {
message Untyped {
optional double value = 1;
}
......@@ -56,7 +56,7 @@ message Metric {
optional Gauge gauge = 2;
optional Counter counter = 3;
optional Summary summary = 4;
optional Custom custom = 5;
optional Untyped untyped = 5;
optional int64 timestamp_ms = 6;
}
......
......@@ -14,7 +14,7 @@ from google.protobuf import descriptor_pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='metrics.proto',
package='io.prometheus.client',
serialized_pb='\n\rmetrics.proto\x12\x14io.prometheus.client\"(\n\tLabelPair\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"\x16\n\x05Gauge\x12\r\n\x05value\x18\x01 \x01(\x01\"\x18\n\x07\x43ounter\x12\r\n\x05value\x18\x01 \x01(\x01\"+\n\x08Quantile\x12\x10\n\x08quantile\x18\x01 \x01(\x01\x12\r\n\x05value\x18\x02 \x01(\x01\"e\n\x07Summary\x12\x14\n\x0csample_count\x18\x01 \x01(\x04\x12\x12\n\nsample_sum\x18\x02 \x01(\x01\x12\x30\n\x08quantile\x18\x03 \x03(\x0b\x32\x1e.io.prometheus.client.Quantile\"\x17\n\x06\x43ustom\x12\r\n\x05value\x18\x01 \x01(\x01\"\x88\x02\n\x06Metric\x12.\n\x05label\x18\x01 \x03(\x0b\x32\x1f.io.prometheus.client.LabelPair\x12*\n\x05gauge\x18\x02 \x01(\x0b\x32\x1b.io.prometheus.client.Gauge\x12.\n\x07\x63ounter\x18\x03 \x01(\x0b\x32\x1d.io.prometheus.client.Counter\x12.\n\x07summary\x18\x04 \x01(\x0b\x32\x1d.io.prometheus.client.Summary\x12,\n\x06\x63ustom\x18\x05 \x01(\x0b\x32\x1c.io.prometheus.client.Custom\x12\x14\n\x0ctimestamp_ms\x18\x06 \x01(\x03\"\x88\x01\n\x0cMetricFamily\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04help\x18\x02 \x01(\t\x12.\n\x04type\x18\x03 \x01(\x0e\x32 .io.prometheus.client.MetricType\x12,\n\x06metric\x18\x04 \x03(\x0b\x32\x1c.io.prometheus.client.Metric*=\n\nMetricType\x12\x0b\n\x07\x43OUNTER\x10\x00\x12\t\n\x05GAUGE\x10\x01\x12\x0b\n\x07SUMMARY\x10\x02\x12\n\n\x06\x43USTOM\x10\x03\x42\x16\n\x14io.prometheus.client')
serialized_pb='\n\rmetrics.proto\x12\x14io.prometheus.client\"(\n\tLabelPair\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"\x16\n\x05Gauge\x12\r\n\x05value\x18\x01 \x01(\x01\"\x18\n\x07\x43ounter\x12\r\n\x05value\x18\x01 \x01(\x01\"+\n\x08Quantile\x12\x10\n\x08quantile\x18\x01 \x01(\x01\x12\r\n\x05value\x18\x02 \x01(\x01\"e\n\x07Summary\x12\x14\n\x0csample_count\x18\x01 \x01(\x04\x12\x12\n\nsample_sum\x18\x02 \x01(\x01\x12\x30\n\x08quantile\x18\x03 \x03(\x0b\x32\x1e.io.prometheus.client.Quantile\"\x18\n\x07Untyped\x12\r\n\x05value\x18\x01 \x01(\x01\"\x8a\x02\n\x06Metric\x12.\n\x05label\x18\x01 \x03(\x0b\x32\x1f.io.prometheus.client.LabelPair\x12*\n\x05gauge\x18\x02 \x01(\x0b\x32\x1b.io.prometheus.client.Gauge\x12.\n\x07\x63ounter\x18\x03 \x01(\x0b\x32\x1d.io.prometheus.client.Counter\x12.\n\x07summary\x18\x04 \x01(\x0b\x32\x1d.io.prometheus.client.Summary\x12.\n\x07untyped\x18\x05 \x01(\x0b\x32\x1d.io.prometheus.client.Untyped\x12\x14\n\x0ctimestamp_ms\x18\x06 \x01(\x03\"\x88\x01\n\x0cMetricFamily\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04help\x18\x02 \x01(\t\x12.\n\x04type\x18\x03 \x01(\x0e\x32 .io.prometheus.client.MetricType\x12,\n\x06metric\x18\x04 \x03(\x0b\x32\x1c.io.prometheus.client.Metric*>\n\nMetricType\x12\x0b\n\x07\x43OUNTER\x10\x00\x12\t\n\x05GAUGE\x10\x01\x12\x0b\n\x07SUMMARY\x10\x02\x12\x0b\n\x07UNTYPED\x10\x03\x42\x16\n\x14io.prometheus.client')
_METRICTYPE = _descriptor.EnumDescriptor(
name='MetricType',
......@@ -35,21 +35,21 @@ _METRICTYPE = _descriptor.EnumDescriptor(
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CUSTOM', index=3, number=3,
name='UNTYPED', index=3, number=3,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=710,
serialized_end=771,
serialized_start=713,
serialized_end=775,
)
MetricType = enum_type_wrapper.EnumTypeWrapper(_METRICTYPE)
COUNTER = 0
GAUGE = 1
SUMMARY = 2
CUSTOM = 3
UNTYPED = 3
......@@ -221,15 +221,15 @@ _SUMMARY = _descriptor.Descriptor(
)
_CUSTOM = _descriptor.Descriptor(
name='Custom',
full_name='io.prometheus.client.Custom',
_UNTYPED = _descriptor.Descriptor(
name='Untyped',
full_name='io.prometheus.client.Untyped',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='value', full_name='io.prometheus.client.Custom.value', index=0,
name='value', full_name='io.prometheus.client.Untyped.value', index=0,
number=1, type=1, cpp_type=5, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
......@@ -245,7 +245,7 @@ _CUSTOM = _descriptor.Descriptor(
is_extendable=False,
extension_ranges=[],
serialized_start=279,
serialized_end=302,
serialized_end=303,
)
......@@ -285,7 +285,7 @@ _METRIC = _descriptor.Descriptor(
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='custom', full_name='io.prometheus.client.Metric.custom', index=4,
name='untyped', full_name='io.prometheus.client.Metric.untyped', index=4,
number=5, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
......@@ -307,8 +307,8 @@ _METRIC = _descriptor.Descriptor(
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=305,
serialized_end=569,
serialized_start=306,
serialized_end=572,
)
......@@ -356,8 +356,8 @@ _METRICFAMILY = _descriptor.Descriptor(
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=572,
serialized_end=708,
serialized_start=575,
serialized_end=711,
)
_SUMMARY.fields_by_name['quantile'].message_type = _QUANTILE
......@@ -365,7 +365,7 @@ _METRIC.fields_by_name['label'].message_type = _LABELPAIR
_METRIC.fields_by_name['gauge'].message_type = _GAUGE
_METRIC.fields_by_name['counter'].message_type = _COUNTER
_METRIC.fields_by_name['summary'].message_type = _SUMMARY
_METRIC.fields_by_name['custom'].message_type = _CUSTOM
_METRIC.fields_by_name['untyped'].message_type = _UNTYPED
_METRICFAMILY.fields_by_name['type'].enum_type = _METRICTYPE
_METRICFAMILY.fields_by_name['metric'].message_type = _METRIC
DESCRIPTOR.message_types_by_name['LabelPair'] = _LABELPAIR
......@@ -373,7 +373,7 @@ DESCRIPTOR.message_types_by_name['Gauge'] = _GAUGE
DESCRIPTOR.message_types_by_name['Counter'] = _COUNTER
DESCRIPTOR.message_types_by_name['Quantile'] = _QUANTILE
DESCRIPTOR.message_types_by_name['Summary'] = _SUMMARY
DESCRIPTOR.message_types_by_name['Custom'] = _CUSTOM
DESCRIPTOR.message_types_by_name['Untyped'] = _UNTYPED
DESCRIPTOR.message_types_by_name['Metric'] = _METRIC
DESCRIPTOR.message_types_by_name['MetricFamily'] = _METRICFAMILY
......@@ -407,11 +407,11 @@ class Summary(_message.Message):
# @@protoc_insertion_point(class_scope:io.prometheus.client.Summary)
class Custom(_message.Message):
class Untyped(_message.Message):
__metaclass__ = _reflection.GeneratedProtocolMessageType
DESCRIPTOR = _CUSTOM
DESCRIPTOR = _UNTYPED
# @@protoc_insertion_point(class_scope:io.prometheus.client.Custom)
# @@protoc_insertion_point(class_scope:io.prometheus.client.Untyped)
class Metric(_message.Message):
__metaclass__ = _reflection.GeneratedProtocolMessageType
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment