| // Generated by the protocol buffer compiler. DO NOT EDIT! |
| // source: metrics.proto |
| |
| #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION |
| #include "metrics.pb.h" |
| |
| #include <algorithm> |
| |
| #include <google/protobuf/stubs/common.h> |
| #include <google/protobuf/stubs/port.h> |
| #include <google/protobuf/stubs/once.h> |
| #include <google/protobuf/io/coded_stream.h> |
| #include <google/protobuf/wire_format_lite_inl.h> |
| #include <google/protobuf/descriptor.h> |
| #include <google/protobuf/generated_message_reflection.h> |
| #include <google/protobuf/reflection_ops.h> |
| #include <google/protobuf/wire_format.h> |
| // @@protoc_insertion_point(includes) |
| |
| namespace io { |
| namespace prometheus { |
| namespace client { |
| |
| namespace { |
| |
| const ::google::protobuf::Descriptor* LabelPair_descriptor_ = NULL; |
| const ::google::protobuf::internal::GeneratedMessageReflection* |
| LabelPair_reflection_ = NULL; |
| const ::google::protobuf::Descriptor* Gauge_descriptor_ = NULL; |
| const ::google::protobuf::internal::GeneratedMessageReflection* |
| Gauge_reflection_ = NULL; |
| const ::google::protobuf::Descriptor* Counter_descriptor_ = NULL; |
| const ::google::protobuf::internal::GeneratedMessageReflection* |
| Counter_reflection_ = NULL; |
| const ::google::protobuf::Descriptor* Quantile_descriptor_ = NULL; |
| const ::google::protobuf::internal::GeneratedMessageReflection* |
| Quantile_reflection_ = NULL; |
| const ::google::protobuf::Descriptor* Summary_descriptor_ = NULL; |
| const ::google::protobuf::internal::GeneratedMessageReflection* |
| Summary_reflection_ = NULL; |
| const ::google::protobuf::Descriptor* Untyped_descriptor_ = NULL; |
| const ::google::protobuf::internal::GeneratedMessageReflection* |
| Untyped_reflection_ = NULL; |
| const ::google::protobuf::Descriptor* Histogram_descriptor_ = NULL; |
| const ::google::protobuf::internal::GeneratedMessageReflection* |
| Histogram_reflection_ = NULL; |
| const ::google::protobuf::Descriptor* Bucket_descriptor_ = NULL; |
| const ::google::protobuf::internal::GeneratedMessageReflection* |
| Bucket_reflection_ = NULL; |
| const ::google::protobuf::Descriptor* Metric_descriptor_ = NULL; |
| const ::google::protobuf::internal::GeneratedMessageReflection* |
| Metric_reflection_ = NULL; |
| const ::google::protobuf::Descriptor* MetricFamily_descriptor_ = NULL; |
| const ::google::protobuf::internal::GeneratedMessageReflection* |
| MetricFamily_reflection_ = NULL; |
| const ::google::protobuf::EnumDescriptor* MetricType_descriptor_ = NULL; |
| |
| } // namespace |
| |
| |
| void protobuf_AssignDesc_metrics_2eproto() GOOGLE_ATTRIBUTE_COLD; |
| void protobuf_AssignDesc_metrics_2eproto() { |
| protobuf_AddDesc_metrics_2eproto(); |
| const ::google::protobuf::FileDescriptor* file = |
| ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( |
| "metrics.proto"); |
| GOOGLE_CHECK(file != NULL); |
| LabelPair_descriptor_ = file->message_type(0); |
| static const int LabelPair_offsets_[2] = { |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LabelPair, name_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LabelPair, value_), |
| }; |
| LabelPair_reflection_ = |
| ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
| LabelPair_descriptor_, |
| LabelPair::default_instance_, |
| LabelPair_offsets_, |
| -1, |
| -1, |
| -1, |
| sizeof(LabelPair), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LabelPair, _internal_metadata_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LabelPair, _is_default_instance_)); |
| Gauge_descriptor_ = file->message_type(1); |
| static const int Gauge_offsets_[1] = { |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Gauge, value_), |
| }; |
| Gauge_reflection_ = |
| ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
| Gauge_descriptor_, |
| Gauge::default_instance_, |
| Gauge_offsets_, |
| -1, |
| -1, |
| -1, |
| sizeof(Gauge), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Gauge, _internal_metadata_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Gauge, _is_default_instance_)); |
| Counter_descriptor_ = file->message_type(2); |
| static const int Counter_offsets_[1] = { |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Counter, value_), |
| }; |
| Counter_reflection_ = |
| ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
| Counter_descriptor_, |
| Counter::default_instance_, |
| Counter_offsets_, |
| -1, |
| -1, |
| -1, |
| sizeof(Counter), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Counter, _internal_metadata_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Counter, _is_default_instance_)); |
| Quantile_descriptor_ = file->message_type(3); |
| static const int Quantile_offsets_[2] = { |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Quantile, quantile_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Quantile, value_), |
| }; |
| Quantile_reflection_ = |
| ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
| Quantile_descriptor_, |
| Quantile::default_instance_, |
| Quantile_offsets_, |
| -1, |
| -1, |
| -1, |
| sizeof(Quantile), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Quantile, _internal_metadata_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Quantile, _is_default_instance_)); |
| Summary_descriptor_ = file->message_type(4); |
| static const int Summary_offsets_[3] = { |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Summary, sample_count_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Summary, sample_sum_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Summary, quantile_), |
| }; |
| Summary_reflection_ = |
| ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
| Summary_descriptor_, |
| Summary::default_instance_, |
| Summary_offsets_, |
| -1, |
| -1, |
| -1, |
| sizeof(Summary), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Summary, _internal_metadata_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Summary, _is_default_instance_)); |
| Untyped_descriptor_ = file->message_type(5); |
| static const int Untyped_offsets_[1] = { |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Untyped, value_), |
| }; |
| Untyped_reflection_ = |
| ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
| Untyped_descriptor_, |
| Untyped::default_instance_, |
| Untyped_offsets_, |
| -1, |
| -1, |
| -1, |
| sizeof(Untyped), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Untyped, _internal_metadata_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Untyped, _is_default_instance_)); |
| Histogram_descriptor_ = file->message_type(6); |
| static const int Histogram_offsets_[3] = { |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Histogram, sample_count_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Histogram, sample_sum_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Histogram, bucket_), |
| }; |
| Histogram_reflection_ = |
| ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
| Histogram_descriptor_, |
| Histogram::default_instance_, |
| Histogram_offsets_, |
| -1, |
| -1, |
| -1, |
| sizeof(Histogram), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Histogram, _internal_metadata_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Histogram, _is_default_instance_)); |
| Bucket_descriptor_ = file->message_type(7); |
| static const int Bucket_offsets_[2] = { |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Bucket, cumulative_count_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Bucket, upper_bound_), |
| }; |
| Bucket_reflection_ = |
| ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
| Bucket_descriptor_, |
| Bucket::default_instance_, |
| Bucket_offsets_, |
| -1, |
| -1, |
| -1, |
| sizeof(Bucket), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Bucket, _internal_metadata_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Bucket, _is_default_instance_)); |
| Metric_descriptor_ = file->message_type(8); |
| static const int Metric_offsets_[7] = { |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, label_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, gauge_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, counter_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, summary_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, untyped_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, histogram_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, timestamp_ms_), |
| }; |
| Metric_reflection_ = |
| ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
| Metric_descriptor_, |
| Metric::default_instance_, |
| Metric_offsets_, |
| -1, |
| -1, |
| -1, |
| sizeof(Metric), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, _internal_metadata_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, _is_default_instance_)); |
| MetricFamily_descriptor_ = file->message_type(9); |
| static const int MetricFamily_offsets_[4] = { |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MetricFamily, name_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MetricFamily, help_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MetricFamily, type_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MetricFamily, metric_), |
| }; |
| MetricFamily_reflection_ = |
| ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
| MetricFamily_descriptor_, |
| MetricFamily::default_instance_, |
| MetricFamily_offsets_, |
| -1, |
| -1, |
| -1, |
| sizeof(MetricFamily), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MetricFamily, _internal_metadata_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MetricFamily, _is_default_instance_)); |
| MetricType_descriptor_ = file->enum_type(0); |
| } |
| |
| namespace { |
| |
| GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); |
| inline void protobuf_AssignDescriptorsOnce() { |
| ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, |
| &protobuf_AssignDesc_metrics_2eproto); |
| } |
| |
| void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; |
| void protobuf_RegisterTypes(const ::std::string&) { |
| protobuf_AssignDescriptorsOnce(); |
| ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
| LabelPair_descriptor_, &LabelPair::default_instance()); |
| ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
| Gauge_descriptor_, &Gauge::default_instance()); |
| ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
| Counter_descriptor_, &Counter::default_instance()); |
| ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
| Quantile_descriptor_, &Quantile::default_instance()); |
| ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
| Summary_descriptor_, &Summary::default_instance()); |
| ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
| Untyped_descriptor_, &Untyped::default_instance()); |
| ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
| Histogram_descriptor_, &Histogram::default_instance()); |
| ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
| Bucket_descriptor_, &Bucket::default_instance()); |
| ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
| Metric_descriptor_, &Metric::default_instance()); |
| ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
| MetricFamily_descriptor_, &MetricFamily::default_instance()); |
| } |
| |
| } // namespace |
| |
| void protobuf_ShutdownFile_metrics_2eproto() { |
| delete LabelPair::default_instance_; |
| delete LabelPair_reflection_; |
| delete Gauge::default_instance_; |
| delete Gauge_reflection_; |
| delete Counter::default_instance_; |
| delete Counter_reflection_; |
| delete Quantile::default_instance_; |
| delete Quantile_reflection_; |
| delete Summary::default_instance_; |
| delete Summary_reflection_; |
| delete Untyped::default_instance_; |
| delete Untyped_reflection_; |
| delete Histogram::default_instance_; |
| delete Histogram_reflection_; |
| delete Bucket::default_instance_; |
| delete Bucket_reflection_; |
| delete Metric::default_instance_; |
| delete Metric_reflection_; |
| delete MetricFamily::default_instance_; |
| delete MetricFamily_reflection_; |
| } |
| |
| void protobuf_AddDesc_metrics_2eproto() GOOGLE_ATTRIBUTE_COLD; |
| void protobuf_AddDesc_metrics_2eproto() { |
| static bool already_here = false; |
| if (already_here) return; |
| already_here = true; |
| GOOGLE_PROTOBUF_VERIFY_VERSION; |
| |
| ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( |
| "\n\rmetrics.proto\022\024io.prometheus.client\"(\n" |
| "\tLabelPair\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\"" |
| "\026\n\005Gauge\022\r\n\005value\030\001 \001(\001\"\030\n\007Counter\022\r\n\005va" |
| "lue\030\001 \001(\001\"+\n\010Quantile\022\020\n\010quantile\030\001 \001(\001\022" |
| "\r\n\005value\030\002 \001(\001\"e\n\007Summary\022\024\n\014sample_coun" |
| "t\030\001 \001(\004\022\022\n\nsample_sum\030\002 \001(\001\0220\n\010quantile\030" |
| "\003 \003(\0132\036.io.prometheus.client.Quantile\"\030\n" |
| "\007Untyped\022\r\n\005value\030\001 \001(\001\"c\n\tHistogram\022\024\n\014" |
| "sample_count\030\001 \001(\004\022\022\n\nsample_sum\030\002 \001(\001\022," |
| "\n\006bucket\030\003 \003(\0132\034.io.prometheus.client.Bu" |
| "cket\"7\n\006Bucket\022\030\n\020cumulative_count\030\001 \001(\004" |
| "\022\023\n\013upper_bound\030\002 \001(\001\"\276\002\n\006Metric\022.\n\005labe" |
| "l\030\001 \003(\0132\037.io.prometheus.client.LabelPair" |
| "\022*\n\005gauge\030\002 \001(\0132\033.io.prometheus.client.G" |
| "auge\022.\n\007counter\030\003 \001(\0132\035.io.prometheus.cl" |
| "ient.Counter\022.\n\007summary\030\004 \001(\0132\035.io.prome" |
| "theus.client.Summary\022.\n\007untyped\030\005 \001(\0132\035." |
| "io.prometheus.client.Untyped\0222\n\thistogra" |
| "m\030\007 \001(\0132\037.io.prometheus.client.Histogram" |
| "\022\024\n\014timestamp_ms\030\006 \001(\003\"\210\001\n\014MetricFamily\022" |
| "\014\n\004name\030\001 \001(\t\022\014\n\004help\030\002 \001(\t\022.\n\004type\030\003 \001(" |
| "\0162 .io.prometheus.client.MetricType\022,\n\006m" |
| "etric\030\004 \003(\0132\034.io.prometheus.client.Metri" |
| "c*M\n\nMetricType\022\013\n\007COUNTER\020\000\022\t\n\005GAUGE\020\001\022" |
| "\013\n\007SUMMARY\020\002\022\013\n\007UNTYPED\020\003\022\r\n\tHISTOGRAM\020\004" |
| "B\026\n\024io.prometheus.clientb\006proto3", 1032); |
| ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( |
| "metrics.proto", &protobuf_RegisterTypes); |
| LabelPair::default_instance_ = new LabelPair(); |
| Gauge::default_instance_ = new Gauge(); |
| Counter::default_instance_ = new Counter(); |
| Quantile::default_instance_ = new Quantile(); |
| Summary::default_instance_ = new Summary(); |
| Untyped::default_instance_ = new Untyped(); |
| Histogram::default_instance_ = new Histogram(); |
| Bucket::default_instance_ = new Bucket(); |
| Metric::default_instance_ = new Metric(); |
| MetricFamily::default_instance_ = new MetricFamily(); |
| LabelPair::default_instance_->InitAsDefaultInstance(); |
| Gauge::default_instance_->InitAsDefaultInstance(); |
| Counter::default_instance_->InitAsDefaultInstance(); |
| Quantile::default_instance_->InitAsDefaultInstance(); |
| Summary::default_instance_->InitAsDefaultInstance(); |
| Untyped::default_instance_->InitAsDefaultInstance(); |
| Histogram::default_instance_->InitAsDefaultInstance(); |
| Bucket::default_instance_->InitAsDefaultInstance(); |
| Metric::default_instance_->InitAsDefaultInstance(); |
| MetricFamily::default_instance_->InitAsDefaultInstance(); |
| ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_metrics_2eproto); |
| } |
| |
| // Force AddDescriptors() to be called at static initialization time. |
| struct StaticDescriptorInitializer_metrics_2eproto { |
| StaticDescriptorInitializer_metrics_2eproto() { |
| protobuf_AddDesc_metrics_2eproto(); |
| } |
| } static_descriptor_initializer_metrics_2eproto_; |
| const ::google::protobuf::EnumDescriptor* MetricType_descriptor() { |
| protobuf_AssignDescriptorsOnce(); |
| return MetricType_descriptor_; |
| } |
| bool MetricType_IsValid(int value) { |
| switch(value) { |
| case 0: |
| case 1: |
| case 2: |
| case 3: |
| case 4: |
| return true; |
| default: |
| return false; |
| } |
| } |
| |
| |
| // =================================================================== |
| |
| #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| const int LabelPair::kNameFieldNumber; |
| const int LabelPair::kValueFieldNumber; |
| #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| |
| LabelPair::LabelPair() |
| : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:io.prometheus.client.LabelPair) |
| } |
| |
| void LabelPair::InitAsDefaultInstance() { |
| _is_default_instance_ = true; |
| } |
| |
| LabelPair::LabelPair(const LabelPair& from) |
| : ::google::protobuf::Message(), |
| _internal_metadata_(NULL) { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:io.prometheus.client.LabelPair) |
| } |
| |
| void LabelPair::SharedCtor() { |
| _is_default_instance_ = false; |
| ::google::protobuf::internal::GetEmptyString(); |
| _cached_size_ = 0; |
| name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| } |
| |
| LabelPair::~LabelPair() { |
| // @@protoc_insertion_point(destructor:io.prometheus.client.LabelPair) |
| SharedDtor(); |
| } |
| |
| void LabelPair::SharedDtor() { |
| name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| if (this != default_instance_) { |
| } |
| } |
| |
| void LabelPair::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const ::google::protobuf::Descriptor* LabelPair::descriptor() { |
| protobuf_AssignDescriptorsOnce(); |
| return LabelPair_descriptor_; |
| } |
| |
| const LabelPair& LabelPair::default_instance() { |
| if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto(); |
| return *default_instance_; |
| } |
| |
| LabelPair* LabelPair::default_instance_ = NULL; |
| |
| LabelPair* LabelPair::New(::google::protobuf::Arena* arena) const { |
| LabelPair* n = new LabelPair; |
| if (arena != NULL) { |
| arena->Own(n); |
| } |
| return n; |
| } |
| |
| void LabelPair::Clear() { |
| // @@protoc_insertion_point(message_clear_start:io.prometheus.client.LabelPair) |
| name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| } |
| |
| bool LabelPair::MergePartialFromCodedStream( |
| ::google::protobuf::io::CodedInputStream* input) { |
| #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
| ::google::protobuf::uint32 tag; |
| // @@protoc_insertion_point(parse_start:io.prometheus.client.LabelPair) |
| for (;;) { |
| ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| tag = p.first; |
| if (!p.second) goto handle_unusual; |
| switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| // optional string name = 1; |
| case 1: { |
| if (tag == 10) { |
| DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| input, this->mutable_name())); |
| DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| this->name().data(), this->name().length(), |
| ::google::protobuf::internal::WireFormatLite::PARSE, |
| "io.prometheus.client.LabelPair.name")); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(18)) goto parse_value; |
| break; |
| } |
| |
| // optional string value = 2; |
| case 2: { |
| if (tag == 18) { |
| parse_value: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| input, this->mutable_value())); |
| DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| this->value().data(), this->value().length(), |
| ::google::protobuf::internal::WireFormatLite::PARSE, |
| "io.prometheus.client.LabelPair.value")); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectAtEnd()) goto success; |
| break; |
| } |
| |
| default: { |
| handle_unusual: |
| if (tag == 0 || |
| ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
| goto success; |
| } |
| DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); |
| break; |
| } |
| } |
| } |
| success: |
| // @@protoc_insertion_point(parse_success:io.prometheus.client.LabelPair) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:io.prometheus.client.LabelPair) |
| return false; |
| #undef DO_ |
| } |
| |
| void LabelPair::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:io.prometheus.client.LabelPair) |
| // optional string name = 1; |
| if (this->name().size() > 0) { |
| ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| this->name().data(), this->name().length(), |
| ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| "io.prometheus.client.LabelPair.name"); |
| ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 1, this->name(), output); |
| } |
| |
| // optional string value = 2; |
| if (this->value().size() > 0) { |
| ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| this->value().data(), this->value().length(), |
| ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| "io.prometheus.client.LabelPair.value"); |
| ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 2, this->value(), output); |
| } |
| |
| // @@protoc_insertion_point(serialize_end:io.prometheus.client.LabelPair) |
| } |
| |
| ::google::protobuf::uint8* LabelPair::InternalSerializeWithCachedSizesToArray( |
| bool deterministic, ::google::protobuf::uint8* target) const { |
| // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.LabelPair) |
| // optional string name = 1; |
| if (this->name().size() > 0) { |
| ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| this->name().data(), this->name().length(), |
| ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| "io.prometheus.client.LabelPair.name"); |
| target = |
| ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 1, this->name(), target); |
| } |
| |
| // optional string value = 2; |
| if (this->value().size() > 0) { |
| ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| this->value().data(), this->value().length(), |
| ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| "io.prometheus.client.LabelPair.value"); |
| target = |
| ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 2, this->value(), target); |
| } |
| |
| // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.LabelPair) |
| return target; |
| } |
| |
| int LabelPair::ByteSize() const { |
| // @@protoc_insertion_point(message_byte_size_start:io.prometheus.client.LabelPair) |
| int total_size = 0; |
| |
| // optional string name = 1; |
| if (this->name().size() > 0) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::StringSize( |
| this->name()); |
| } |
| |
| // optional string value = 2; |
| if (this->value().size() > 0) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::StringSize( |
| this->value()); |
| } |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void LabelPair::MergeFrom(const ::google::protobuf::Message& from) { |
| // @@protoc_insertion_point(generalized_merge_from_start:io.prometheus.client.LabelPair) |
| if (GOOGLE_PREDICT_FALSE(&from == this)) { |
| ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); |
| } |
| const LabelPair* source = |
| ::google::protobuf::internal::DynamicCastToGenerated<const LabelPair>( |
| &from); |
| if (source == NULL) { |
| // @@protoc_insertion_point(generalized_merge_from_cast_fail:io.prometheus.client.LabelPair) |
| ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| } else { |
| // @@protoc_insertion_point(generalized_merge_from_cast_success:io.prometheus.client.LabelPair) |
| MergeFrom(*source); |
| } |
| } |
| |
| void LabelPair::MergeFrom(const LabelPair& from) { |
| // @@protoc_insertion_point(class_specific_merge_from_start:io.prometheus.client.LabelPair) |
| if (GOOGLE_PREDICT_FALSE(&from == this)) { |
| ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); |
| } |
| if (from.name().size() > 0) { |
| |
| name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); |
| } |
| if (from.value().size() > 0) { |
| |
| value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_); |
| } |
| } |
| |
| void LabelPair::CopyFrom(const ::google::protobuf::Message& from) { |
| // @@protoc_insertion_point(generalized_copy_from_start:io.prometheus.client.LabelPair) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| void LabelPair::CopyFrom(const LabelPair& from) { |
| // @@protoc_insertion_point(class_specific_copy_from_start:io.prometheus.client.LabelPair) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool LabelPair::IsInitialized() const { |
| |
| return true; |
| } |
| |
| void LabelPair::Swap(LabelPair* other) { |
| if (other == this) return; |
| InternalSwap(other); |
| } |
| void LabelPair::InternalSwap(LabelPair* other) { |
| name_.Swap(&other->name_); |
| value_.Swap(&other->value_); |
| _internal_metadata_.Swap(&other->_internal_metadata_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| |
| ::google::protobuf::Metadata LabelPair::GetMetadata() const { |
| protobuf_AssignDescriptorsOnce(); |
| ::google::protobuf::Metadata metadata; |
| metadata.descriptor = LabelPair_descriptor_; |
| metadata.reflection = LabelPair_reflection_; |
| return metadata; |
| } |
| |
| #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| // LabelPair |
| |
| // optional string name = 1; |
| void LabelPair::clear_name() { |
| name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| } |
| const ::std::string& LabelPair::name() const { |
| // @@protoc_insertion_point(field_get:io.prometheus.client.LabelPair.name) |
| return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| } |
| void LabelPair::set_name(const ::std::string& value) { |
| |
| name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| // @@protoc_insertion_point(field_set:io.prometheus.client.LabelPair.name) |
| } |
| void LabelPair::set_name(const char* value) { |
| |
| name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| // @@protoc_insertion_point(field_set_char:io.prometheus.client.LabelPair.name) |
| } |
| void LabelPair::set_name(const char* value, size_t size) { |
| |
| name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| ::std::string(reinterpret_cast<const char*>(value), size)); |
| // @@protoc_insertion_point(field_set_pointer:io.prometheus.client.LabelPair.name) |
| } |
| ::std::string* LabelPair::mutable_name() { |
| |
| // @@protoc_insertion_point(field_mutable:io.prometheus.client.LabelPair.name) |
| return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| } |
| ::std::string* LabelPair::release_name() { |
| // @@protoc_insertion_point(field_release:io.prometheus.client.LabelPair.name) |
| |
| return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| } |
| void LabelPair::set_allocated_name(::std::string* name) { |
| if (name != NULL) { |
| |
| } else { |
| |
| } |
| name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); |
| // @@protoc_insertion_point(field_set_allocated:io.prometheus.client.LabelPair.name) |
| } |
| |
| // optional string value = 2; |
| void LabelPair::clear_value() { |
| value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| } |
| const ::std::string& LabelPair::value() const { |
| // @@protoc_insertion_point(field_get:io.prometheus.client.LabelPair.value) |
| return value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| } |
| void LabelPair::set_value(const ::std::string& value) { |
| |
| value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| // @@protoc_insertion_point(field_set:io.prometheus.client.LabelPair.value) |
| } |
| void LabelPair::set_value(const char* value) { |
| |
| value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| // @@protoc_insertion_point(field_set_char:io.prometheus.client.LabelPair.value) |
| } |
| void LabelPair::set_value(const char* value, size_t size) { |
| |
| value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| ::std::string(reinterpret_cast<const char*>(value), size)); |
| // @@protoc_insertion_point(field_set_pointer:io.prometheus.client.LabelPair.value) |
| } |
| ::std::string* LabelPair::mutable_value() { |
| |
| // @@protoc_insertion_point(field_mutable:io.prometheus.client.LabelPair.value) |
| return value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| } |
| ::std::string* LabelPair::release_value() { |
| // @@protoc_insertion_point(field_release:io.prometheus.client.LabelPair.value) |
| |
| return value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| } |
| void LabelPair::set_allocated_value(::std::string* value) { |
| if (value != NULL) { |
| |
| } else { |
| |
| } |
| value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| // @@protoc_insertion_point(field_set_allocated:io.prometheus.client.LabelPair.value) |
| } |
| |
| #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
| |
| // =================================================================== |
| |
| #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| const int Gauge::kValueFieldNumber; |
| #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| |
| Gauge::Gauge() |
| : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:io.prometheus.client.Gauge) |
| } |
| |
| void Gauge::InitAsDefaultInstance() { |
| _is_default_instance_ = true; |
| } |
| |
| Gauge::Gauge(const Gauge& from) |
| : ::google::protobuf::Message(), |
| _internal_metadata_(NULL) { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Gauge) |
| } |
| |
| void Gauge::SharedCtor() { |
| _is_default_instance_ = false; |
| _cached_size_ = 0; |
| value_ = 0; |
| } |
| |
| Gauge::~Gauge() { |
| // @@protoc_insertion_point(destructor:io.prometheus.client.Gauge) |
| SharedDtor(); |
| } |
| |
| void Gauge::SharedDtor() { |
| if (this != default_instance_) { |
| } |
| } |
| |
| void Gauge::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const ::google::protobuf::Descriptor* Gauge::descriptor() { |
| protobuf_AssignDescriptorsOnce(); |
| return Gauge_descriptor_; |
| } |
| |
| const Gauge& Gauge::default_instance() { |
| if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto(); |
| return *default_instance_; |
| } |
| |
| Gauge* Gauge::default_instance_ = NULL; |
| |
| Gauge* Gauge::New(::google::protobuf::Arena* arena) const { |
| Gauge* n = new Gauge; |
| if (arena != NULL) { |
| arena->Own(n); |
| } |
| return n; |
| } |
| |
| void Gauge::Clear() { |
| // @@protoc_insertion_point(message_clear_start:io.prometheus.client.Gauge) |
| value_ = 0; |
| } |
| |
| bool Gauge::MergePartialFromCodedStream( |
| ::google::protobuf::io::CodedInputStream* input) { |
| #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
| ::google::protobuf::uint32 tag; |
| // @@protoc_insertion_point(parse_start:io.prometheus.client.Gauge) |
| for (;;) { |
| ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| tag = p.first; |
| if (!p.second) goto handle_unusual; |
| switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| // optional double value = 1; |
| case 1: { |
| if (tag == 9) { |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( |
| input, &value_))); |
| |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectAtEnd()) goto success; |
| break; |
| } |
| |
| default: { |
| handle_unusual: |
| if (tag == 0 || |
| ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
| goto success; |
| } |
| DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); |
| break; |
| } |
| } |
| } |
| success: |
| // @@protoc_insertion_point(parse_success:io.prometheus.client.Gauge) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:io.prometheus.client.Gauge) |
| return false; |
| #undef DO_ |
| } |
| |
| void Gauge::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:io.prometheus.client.Gauge) |
| // optional double value = 1; |
| if (this->value() != 0) { |
| ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->value(), output); |
| } |
| |
| // @@protoc_insertion_point(serialize_end:io.prometheus.client.Gauge) |
| } |
| |
| ::google::protobuf::uint8* Gauge::InternalSerializeWithCachedSizesToArray( |
| bool deterministic, ::google::protobuf::uint8* target) const { |
| // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Gauge) |
| // optional double value = 1; |
| if (this->value() != 0) { |
| target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->value(), target); |
| } |
| |
| // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Gauge) |
| return target; |
| } |
| |
| int Gauge::ByteSize() const { |
| // @@protoc_insertion_point(message_byte_size_start:io.prometheus.client.Gauge) |
| int total_size = 0; |
| |
| // optional double value = 1; |
| if (this->value() != 0) { |
| total_size += 1 + 8; |
| } |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void Gauge::MergeFrom(const ::google::protobuf::Message& from) { |
| // @@protoc_insertion_point(generalized_merge_from_start:io.prometheus.client.Gauge) |
| if (GOOGLE_PREDICT_FALSE(&from == this)) { |
| ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); |
| } |
| const Gauge* source = |
| ::google::protobuf::internal::DynamicCastToGenerated<const Gauge>( |
| &from); |
| if (source == NULL) { |
| // @@protoc_insertion_point(generalized_merge_from_cast_fail:io.prometheus.client.Gauge) |
| ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| } else { |
| // @@protoc_insertion_point(generalized_merge_from_cast_success:io.prometheus.client.Gauge) |
| MergeFrom(*source); |
| } |
| } |
| |
| void Gauge::MergeFrom(const Gauge& from) { |
| // @@protoc_insertion_point(class_specific_merge_from_start:io.prometheus.client.Gauge) |
| if (GOOGLE_PREDICT_FALSE(&from == this)) { |
| ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); |
| } |
| if (from.value() != 0) { |
| set_value(from.value()); |
| } |
| } |
| |
| void Gauge::CopyFrom(const ::google::protobuf::Message& from) { |
| // @@protoc_insertion_point(generalized_copy_from_start:io.prometheus.client.Gauge) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| void Gauge::CopyFrom(const Gauge& from) { |
| // @@protoc_insertion_point(class_specific_copy_from_start:io.prometheus.client.Gauge) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool Gauge::IsInitialized() const { |
| |
| return true; |
| } |
| |
| void Gauge::Swap(Gauge* other) { |
| if (other == this) return; |
| InternalSwap(other); |
| } |
| void Gauge::InternalSwap(Gauge* other) { |
| std::swap(value_, other->value_); |
| _internal_metadata_.Swap(&other->_internal_metadata_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| |
| ::google::protobuf::Metadata Gauge::GetMetadata() const { |
| protobuf_AssignDescriptorsOnce(); |
| ::google::protobuf::Metadata metadata; |
| metadata.descriptor = Gauge_descriptor_; |
| metadata.reflection = Gauge_reflection_; |
| return metadata; |
| } |
| |
| #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| // Gauge |
| |
| // optional double value = 1; |
| void Gauge::clear_value() { |
| value_ = 0; |
| } |
| double Gauge::value() const { |
| // @@protoc_insertion_point(field_get:io.prometheus.client.Gauge.value) |
| return value_; |
| } |
| void Gauge::set_value(double value) { |
| |
| value_ = value; |
| // @@protoc_insertion_point(field_set:io.prometheus.client.Gauge.value) |
| } |
| |
| #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
| |
| // =================================================================== |
| |
| #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| const int Counter::kValueFieldNumber; |
| #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| |
| Counter::Counter() |
| : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:io.prometheus.client.Counter) |
| } |
| |
| void Counter::InitAsDefaultInstance() { |
| _is_default_instance_ = true; |
| } |
| |
| Counter::Counter(const Counter& from) |
| : ::google::protobuf::Message(), |
| _internal_metadata_(NULL) { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Counter) |
| } |
| |
| void Counter::SharedCtor() { |
| _is_default_instance_ = false; |
| _cached_size_ = 0; |
| value_ = 0; |
| } |
| |
| Counter::~Counter() { |
| // @@protoc_insertion_point(destructor:io.prometheus.client.Counter) |
| SharedDtor(); |
| } |
| |
| void Counter::SharedDtor() { |
| if (this != default_instance_) { |
| } |
| } |
| |
| void Counter::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const ::google::protobuf::Descriptor* Counter::descriptor() { |
| protobuf_AssignDescriptorsOnce(); |
| return Counter_descriptor_; |
| } |
| |
| const Counter& Counter::default_instance() { |
| if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto(); |
| return *default_instance_; |
| } |
| |
| Counter* Counter::default_instance_ = NULL; |
| |
| Counter* Counter::New(::google::protobuf::Arena* arena) const { |
| Counter* n = new Counter; |
| if (arena != NULL) { |
| arena->Own(n); |
| } |
| return n; |
| } |
| |
| void Counter::Clear() { |
| // @@protoc_insertion_point(message_clear_start:io.prometheus.client.Counter) |
| value_ = 0; |
| } |
| |
| bool Counter::MergePartialFromCodedStream( |
| ::google::protobuf::io::CodedInputStream* input) { |
| #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
| ::google::protobuf::uint32 tag; |
| // @@protoc_insertion_point(parse_start:io.prometheus.client.Counter) |
| for (;;) { |
| ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| tag = p.first; |
| if (!p.second) goto handle_unusual; |
| switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| // optional double value = 1; |
| case 1: { |
| if (tag == 9) { |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( |
| input, &value_))); |
| |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectAtEnd()) goto success; |
| break; |
| } |
| |
| default: { |
| handle_unusual: |
| if (tag == 0 || |
| ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
| goto success; |
| } |
| DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); |
| break; |
| } |
| } |
| } |
| success: |
| // @@protoc_insertion_point(parse_success:io.prometheus.client.Counter) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:io.prometheus.client.Counter) |
| return false; |
| #undef DO_ |
| } |
| |
| void Counter::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:io.prometheus.client.Counter) |
| // optional double value = 1; |
| if (this->value() != 0) { |
| ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->value(), output); |
| } |
| |
| // @@protoc_insertion_point(serialize_end:io.prometheus.client.Counter) |
| } |
| |
| ::google::protobuf::uint8* Counter::InternalSerializeWithCachedSizesToArray( |
| bool deterministic, ::google::protobuf::uint8* target) const { |
| // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Counter) |
| // optional double value = 1; |
| if (this->value() != 0) { |
| target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->value(), target); |
| } |
| |
| // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Counter) |
| return target; |
| } |
| |
| int Counter::ByteSize() const { |
| // @@protoc_insertion_point(message_byte_size_start:io.prometheus.client.Counter) |
| int total_size = 0; |
| |
| // optional double value = 1; |
| if (this->value() != 0) { |
| total_size += 1 + 8; |
| } |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void Counter::MergeFrom(const ::google::protobuf::Message& from) { |
| // @@protoc_insertion_point(generalized_merge_from_start:io.prometheus.client.Counter) |
| if (GOOGLE_PREDICT_FALSE(&from == this)) { |
| ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); |
| } |
| const Counter* source = |
| ::google::protobuf::internal::DynamicCastToGenerated<const Counter>( |
| &from); |
| if (source == NULL) { |
| // @@protoc_insertion_point(generalized_merge_from_cast_fail:io.prometheus.client.Counter) |
| ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| } else { |
| // @@protoc_insertion_point(generalized_merge_from_cast_success:io.prometheus.client.Counter) |
| MergeFrom(*source); |
| } |
| } |
| |
| void Counter::MergeFrom(const Counter& from) { |
| // @@protoc_insertion_point(class_specific_merge_from_start:io.prometheus.client.Counter) |
| if (GOOGLE_PREDICT_FALSE(&from == this)) { |
| ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); |
| } |
| if (from.value() != 0) { |
| set_value(from.value()); |
| } |
| } |
| |
| void Counter::CopyFrom(const ::google::protobuf::Message& from) { |
| // @@protoc_insertion_point(generalized_copy_from_start:io.prometheus.client.Counter) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| void Counter::CopyFrom(const Counter& from) { |
| // @@protoc_insertion_point(class_specific_copy_from_start:io.prometheus.client.Counter) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool Counter::IsInitialized() const { |
| |
| return true; |
| } |
| |
| void Counter::Swap(Counter* other) { |
| if (other == this) return; |
| InternalSwap(other); |
| } |
| void Counter::InternalSwap(Counter* other) { |
| std::swap(value_, other->value_); |
| _internal_metadata_.Swap(&other->_internal_metadata_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| |
| ::google::protobuf::Metadata Counter::GetMetadata() const { |
| protobuf_AssignDescriptorsOnce(); |
| ::google::protobuf::Metadata metadata; |
| metadata.descriptor = Counter_descriptor_; |
| metadata.reflection = Counter_reflection_; |
| return metadata; |
| } |
| |
| #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| // Counter |
| |
| // optional double value = 1; |
| void Counter::clear_value() { |
| value_ = 0; |
| } |
| double Counter::value() const { |
| // @@protoc_insertion_point(field_get:io.prometheus.client.Counter.value) |
| return value_; |
| } |
| void Counter::set_value(double value) { |
| |
| value_ = value; |
| // @@protoc_insertion_point(field_set:io.prometheus.client.Counter.value) |
| } |
| |
| #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
| |
| // =================================================================== |
| |
| #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| const int Quantile::kQuantileFieldNumber; |
| const int Quantile::kValueFieldNumber; |
| #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| |
| Quantile::Quantile() |
| : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:io.prometheus.client.Quantile) |
| } |
| |
| void Quantile::InitAsDefaultInstance() { |
| _is_default_instance_ = true; |
| } |
| |
| Quantile::Quantile(const Quantile& from) |
| : ::google::protobuf::Message(), |
| _internal_metadata_(NULL) { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Quantile) |
| } |
| |
| void Quantile::SharedCtor() { |
| _is_default_instance_ = false; |
| _cached_size_ = 0; |
| quantile_ = 0; |
| value_ = 0; |
| } |
| |
| Quantile::~Quantile() { |
| // @@protoc_insertion_point(destructor:io.prometheus.client.Quantile) |
| SharedDtor(); |
| } |
| |
| void Quantile::SharedDtor() { |
| if (this != default_instance_) { |
| } |
| } |
| |
| void Quantile::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const ::google::protobuf::Descriptor* Quantile::descriptor() { |
| protobuf_AssignDescriptorsOnce(); |
| return Quantile_descriptor_; |
| } |
| |
| const Quantile& Quantile::default_instance() { |
| if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto(); |
| return *default_instance_; |
| } |
| |
| Quantile* Quantile::default_instance_ = NULL; |
| |
| Quantile* Quantile::New(::google::protobuf::Arena* arena) const { |
| Quantile* n = new Quantile; |
| if (arena != NULL) { |
| arena->Own(n); |
| } |
| return n; |
| } |
| |
| void Quantile::Clear() { |
| // @@protoc_insertion_point(message_clear_start:io.prometheus.client.Quantile) |
| #if defined(__clang__) |
| #define ZR_HELPER_(f) \ |
| _Pragma("clang diagnostic push") \ |
| _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \ |
| __builtin_offsetof(Quantile, f) \ |
| _Pragma("clang diagnostic pop") |
| #else |
| #define ZR_HELPER_(f) reinterpret_cast<char*>(\ |
| &reinterpret_cast<Quantile*>(16)->f) |
| #endif |
| |
| #define ZR_(first, last) do {\ |
| ::memset(&first, 0,\ |
| ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ |
| } while (0) |
| |
| ZR_(quantile_, value_); |
| |
| #undef ZR_HELPER_ |
| #undef ZR_ |
| |
| } |
| |
| bool Quantile::MergePartialFromCodedStream( |
| ::google::protobuf::io::CodedInputStream* input) { |
| #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
| ::google::protobuf::uint32 tag; |
| // @@protoc_insertion_point(parse_start:io.prometheus.client.Quantile) |
| for (;;) { |
| ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| tag = p.first; |
| if (!p.second) goto handle_unusual; |
| switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| // optional double quantile = 1; |
| case 1: { |
| if (tag == 9) { |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( |
| input, &quantile_))); |
| |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(17)) goto parse_value; |
| break; |
| } |
| |
| // optional double value = 2; |
| case 2: { |
| if (tag == 17) { |
| parse_value: |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( |
| input, &value_))); |
| |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectAtEnd()) goto success; |
| break; |
| } |
| |
| default: { |
| handle_unusual: |
| if (tag == 0 || |
| ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
| goto success; |
| } |
| DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); |
| break; |
| } |
| } |
| } |
| success: |
| // @@protoc_insertion_point(parse_success:io.prometheus.client.Quantile) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:io.prometheus.client.Quantile) |
| return false; |
| #undef DO_ |
| } |
| |
| void Quantile::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:io.prometheus.client.Quantile) |
| // optional double quantile = 1; |
| if (this->quantile() != 0) { |
| ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->quantile(), output); |
| } |
| |
| // optional double value = 2; |
| if (this->value() != 0) { |
| ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->value(), output); |
| } |
| |
| // @@protoc_insertion_point(serialize_end:io.prometheus.client.Quantile) |
| } |
| |
| ::google::protobuf::uint8* Quantile::InternalSerializeWithCachedSizesToArray( |
| bool deterministic, ::google::protobuf::uint8* target) const { |
| // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Quantile) |
| // optional double quantile = 1; |
| if (this->quantile() != 0) { |
| target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->quantile(), target); |
| } |
| |
| // optional double value = 2; |
| if (this->value() != 0) { |
| target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->value(), target); |
| } |
| |
| // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Quantile) |
| return target; |
| } |
| |
| int Quantile::ByteSize() const { |
| // @@protoc_insertion_point(message_byte_size_start:io.prometheus.client.Quantile) |
| int total_size = 0; |
| |
| // optional double quantile = 1; |
| if (this->quantile() != 0) { |
| total_size += 1 + 8; |
| } |
| |
| // optional double value = 2; |
| if (this->value() != 0) { |
| total_size += 1 + 8; |
| } |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void Quantile::MergeFrom(const ::google::protobuf::Message& from) { |
| // @@protoc_insertion_point(generalized_merge_from_start:io.prometheus.client.Quantile) |
| if (GOOGLE_PREDICT_FALSE(&from == this)) { |
| ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); |
| } |
| const Quantile* source = |
| ::google::protobuf::internal::DynamicCastToGenerated<const Quantile>( |
| &from); |
| if (source == NULL) { |
| // @@protoc_insertion_point(generalized_merge_from_cast_fail:io.prometheus.client.Quantile) |
| ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| } else { |
| // @@protoc_insertion_point(generalized_merge_from_cast_success:io.prometheus.client.Quantile) |
| MergeFrom(*source); |
| } |
| } |
| |
| void Quantile::MergeFrom(const Quantile& from) { |
| // @@protoc_insertion_point(class_specific_merge_from_start:io.prometheus.client.Quantile) |
| if (GOOGLE_PREDICT_FALSE(&from == this)) { |
| ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); |
| } |
| if (from.quantile() != 0) { |
| set_quantile(from.quantile()); |
| } |
| if (from.value() != 0) { |
| set_value(from.value()); |
| } |
| } |
| |
| void Quantile::CopyFrom(const ::google::protobuf::Message& from) { |
| // @@protoc_insertion_point(generalized_copy_from_start:io.prometheus.client.Quantile) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| void Quantile::CopyFrom(const Quantile& from) { |
| // @@protoc_insertion_point(class_specific_copy_from_start:io.prometheus.client.Quantile) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool Quantile::IsInitialized() const { |
| |
| return true; |
| } |
| |
| void Quantile::Swap(Quantile* other) { |
| if (other == this) return; |
| InternalSwap(other); |
| } |
| void Quantile::InternalSwap(Quantile* other) { |
| std::swap(quantile_, other->quantile_); |
| std::swap(value_, other->value_); |
| _internal_metadata_.Swap(&other->_internal_metadata_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| |
| ::google::protobuf::Metadata Quantile::GetMetadata() const { |
| protobuf_AssignDescriptorsOnce(); |
| ::google::protobuf::Metadata metadata; |
| metadata.descriptor = Quantile_descriptor_; |
| metadata.reflection = Quantile_reflection_; |
| return metadata; |
| } |
| |
| #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| // Quantile |
| |
| // optional double quantile = 1; |
| void Quantile::clear_quantile() { |
| quantile_ = 0; |
| } |
| double Quantile::quantile() const { |
| // @@protoc_insertion_point(field_get:io.prometheus.client.Quantile.quantile) |
| return quantile_; |
| } |
| void Quantile::set_quantile(double value) { |
| |
| quantile_ = value; |
| // @@protoc_insertion_point(field_set:io.prometheus.client.Quantile.quantile) |
| } |
| |
| // optional double value = 2; |
| void Quantile::clear_value() { |
| value_ = 0; |
| } |
| double Quantile::value() const { |
| // @@protoc_insertion_point(field_get:io.prometheus.client.Quantile.value) |
| return value_; |
| } |
| void Quantile::set_value(double value) { |
| |
| value_ = value; |
| // @@protoc_insertion_point(field_set:io.prometheus.client.Quantile.value) |
| } |
| |
| #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
| |
| // =================================================================== |
| |
| #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| const int Summary::kSampleCountFieldNumber; |
| const int Summary::kSampleSumFieldNumber; |
| const int Summary::kQuantileFieldNumber; |
| #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| |
| Summary::Summary() |
| : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:io.prometheus.client.Summary) |
| } |
| |
| void Summary::InitAsDefaultInstance() { |
| _is_default_instance_ = true; |
| } |
| |
| Summary::Summary(const Summary& from) |
| : ::google::protobuf::Message(), |
| _internal_metadata_(NULL) { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Summary) |
| } |
| |
| void Summary::SharedCtor() { |
| _is_default_instance_ = false; |
| _cached_size_ = 0; |
| sample_count_ = GOOGLE_ULONGLONG(0); |
| sample_sum_ = 0; |
| } |
| |
| Summary::~Summary() { |
| // @@protoc_insertion_point(destructor:io.prometheus.client.Summary) |
| SharedDtor(); |
| } |
| |
| void Summary::SharedDtor() { |
| if (this != default_instance_) { |
| } |
| } |
| |
| void Summary::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const ::google::protobuf::Descriptor* Summary::descriptor() { |
| protobuf_AssignDescriptorsOnce(); |
| return Summary_descriptor_; |
| } |
| |
| const Summary& Summary::default_instance() { |
| if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto(); |
| return *default_instance_; |
| } |
| |
| Summary* Summary::default_instance_ = NULL; |
| |
| Summary* Summary::New(::google::protobuf::Arena* arena) const { |
| Summary* n = new Summary; |
| if (arena != NULL) { |
| arena->Own(n); |
| } |
| return n; |
| } |
| |
| void Summary::Clear() { |
| // @@protoc_insertion_point(message_clear_start:io.prometheus.client.Summary) |
| #if defined(__clang__) |
| #define ZR_HELPER_(f) \ |
| _Pragma("clang diagnostic push") \ |
| _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \ |
| __builtin_offsetof(Summary, f) \ |
| _Pragma("clang diagnostic pop") |
| #else |
| #define ZR_HELPER_(f) reinterpret_cast<char*>(\ |
| &reinterpret_cast<Summary*>(16)->f) |
| #endif |
| |
| #define ZR_(first, last) do {\ |
| ::memset(&first, 0,\ |
| ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ |
| } while (0) |
| |
| ZR_(sample_count_, sample_sum_); |
| |
| #undef ZR_HELPER_ |
| #undef ZR_ |
| |
| quantile_.Clear(); |
| } |
| |
| bool Summary::MergePartialFromCodedStream( |
| ::google::protobuf::io::CodedInputStream* input) { |
| #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
| ::google::protobuf::uint32 tag; |
| // @@protoc_insertion_point(parse_start:io.prometheus.client.Summary) |
| for (;;) { |
| ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| tag = p.first; |
| if (!p.second) goto handle_unusual; |
| switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| // optional uint64 sample_count = 1; |
| case 1: { |
| if (tag == 8) { |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( |
| input, &sample_count_))); |
| |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(17)) goto parse_sample_sum; |
| break; |
| } |
| |
| // optional double sample_sum = 2; |
| case 2: { |
| if (tag == 17) { |
| parse_sample_sum: |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( |
| input, &sample_sum_))); |
| |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(26)) goto parse_quantile; |
| break; |
| } |
| |
| // repeated .io.prometheus.client.Quantile quantile = 3; |
| case 3: { |
| if (tag == 26) { |
| parse_quantile: |
| DO_(input->IncrementRecursionDepth()); |
| parse_loop_quantile: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
| input, add_quantile())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(26)) goto parse_loop_quantile; |
| input->UnsafeDecrementRecursionDepth(); |
| if (input->ExpectAtEnd()) goto success; |
| break; |
| } |
| |
| default: { |
| handle_unusual: |
| if (tag == 0 || |
| ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
| goto success; |
| } |
| DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); |
| break; |
| } |
| } |
| } |
| success: |
| // @@protoc_insertion_point(parse_success:io.prometheus.client.Summary) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:io.prometheus.client.Summary) |
| return false; |
| #undef DO_ |
| } |
| |
| void Summary::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:io.prometheus.client.Summary) |
| // optional uint64 sample_count = 1; |
| if (this->sample_count() != 0) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->sample_count(), output); |
| } |
| |
| // optional double sample_sum = 2; |
| if (this->sample_sum() != 0) { |
| ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->sample_sum(), output); |
| } |
| |
| // repeated .io.prometheus.client.Quantile quantile = 3; |
| for (unsigned int i = 0, n = this->quantile_size(); i < n; i++) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 3, this->quantile(i), output); |
| } |
| |
| // @@protoc_insertion_point(serialize_end:io.prometheus.client.Summary) |
| } |
| |
| ::google::protobuf::uint8* Summary::InternalSerializeWithCachedSizesToArray( |
| bool deterministic, ::google::protobuf::uint8* target) const { |
| // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Summary) |
| // optional uint64 sample_count = 1; |
| if (this->sample_count() != 0) { |
| target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->sample_count(), target); |
| } |
| |
| // optional double sample_sum = 2; |
| if (this->sample_sum() != 0) { |
| target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->sample_sum(), target); |
| } |
| |
| // repeated .io.prometheus.client.Quantile quantile = 3; |
| for (unsigned int i = 0, n = this->quantile_size(); i < n; i++) { |
| target = ::google::protobuf::internal::WireFormatLite:: |
| InternalWriteMessageNoVirtualToArray( |
| 3, this->quantile(i), false, target); |
| } |
| |
| // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Summary) |
| return target; |
| } |
| |
| int Summary::ByteSize() const { |
| // @@protoc_insertion_point(message_byte_size_start:io.prometheus.client.Summary) |
| int total_size = 0; |
| |
| // optional uint64 sample_count = 1; |
| if (this->sample_count() != 0) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->sample_count()); |
| } |
| |
| // optional double sample_sum = 2; |
| if (this->sample_sum() != 0) { |
| total_size += 1 + 8; |
| } |
| |
| // repeated .io.prometheus.client.Quantile quantile = 3; |
| total_size += 1 * this->quantile_size(); |
| for (int i = 0; i < this->quantile_size(); i++) { |
| total_size += |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->quantile(i)); |
| } |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void Summary::MergeFrom(const ::google::protobuf::Message& from) { |
| // @@protoc_insertion_point(generalized_merge_from_start:io.prometheus.client.Summary) |
| if (GOOGLE_PREDICT_FALSE(&from == this)) { |
| ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); |
| } |
| const Summary* source = |
| ::google::protobuf::internal::DynamicCastToGenerated<const Summary>( |
| &from); |
| if (source == NULL) { |
| // @@protoc_insertion_point(generalized_merge_from_cast_fail:io.prometheus.client.Summary) |
| ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| } else { |
| // @@protoc_insertion_point(generalized_merge_from_cast_success:io.prometheus.client.Summary) |
| MergeFrom(*source); |
| } |
| } |
| |
| void Summary::MergeFrom(const Summary& from) { |
| // @@protoc_insertion_point(class_specific_merge_from_start:io.prometheus.client.Summary) |
| if (GOOGLE_PREDICT_FALSE(&from == this)) { |
| ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); |
| } |
| quantile_.MergeFrom(from.quantile_); |
| if (from.sample_count() != 0) { |
| set_sample_count(from.sample_count()); |
| } |
| if (from.sample_sum() != 0) { |
| set_sample_sum(from.sample_sum()); |
| } |
| } |
| |
| void Summary::CopyFrom(const ::google::protobuf::Message& from) { |
| // @@protoc_insertion_point(generalized_copy_from_start:io.prometheus.client.Summary) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| void Summary::CopyFrom(const Summary& from) { |
| // @@protoc_insertion_point(class_specific_copy_from_start:io.prometheus.client.Summary) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool Summary::IsInitialized() const { |
| |
| return true; |
| } |
| |
| void Summary::Swap(Summary* other) { |
| if (other == this) return; |
| InternalSwap(other); |
| } |
| void Summary::InternalSwap(Summary* other) { |
| std::swap(sample_count_, other->sample_count_); |
| std::swap(sample_sum_, other->sample_sum_); |
| quantile_.UnsafeArenaSwap(&other->quantile_); |
| _internal_metadata_.Swap(&other->_internal_metadata_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| |
| ::google::protobuf::Metadata Summary::GetMetadata() const { |
| protobuf_AssignDescriptorsOnce(); |
| ::google::protobuf::Metadata metadata; |
| metadata.descriptor = Summary_descriptor_; |
| metadata.reflection = Summary_reflection_; |
| return metadata; |
| } |
| |
| #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| // Summary |
| |
| // optional uint64 sample_count = 1; |
| void Summary::clear_sample_count() { |
| sample_count_ = GOOGLE_ULONGLONG(0); |
| } |
| ::google::protobuf::uint64 Summary::sample_count() const { |
| // @@protoc_insertion_point(field_get:io.prometheus.client.Summary.sample_count) |
| return sample_count_; |
| } |
| void Summary::set_sample_count(::google::protobuf::uint64 value) { |
| |
| sample_count_ = value; |
| // @@protoc_insertion_point(field_set:io.prometheus.client.Summary.sample_count) |
| } |
| |
| // optional double sample_sum = 2; |
| void Summary::clear_sample_sum() { |
| sample_sum_ = 0; |
| } |
| double Summary::sample_sum() const { |
| // @@protoc_insertion_point(field_get:io.prometheus.client.Summary.sample_sum) |
| return sample_sum_; |
| } |
| void Summary::set_sample_sum(double value) { |
| |
| sample_sum_ = value; |
| // @@protoc_insertion_point(field_set:io.prometheus.client.Summary.sample_sum) |
| } |
| |
| // repeated .io.prometheus.client.Quantile quantile = 3; |
| int Summary::quantile_size() const { |
| return quantile_.size(); |
| } |
| void Summary::clear_quantile() { |
| quantile_.Clear(); |
| } |
| const ::io::prometheus::client::Quantile& Summary::quantile(int index) const { |
| // @@protoc_insertion_point(field_get:io.prometheus.client.Summary.quantile) |
| return quantile_.Get(index); |
| } |
| ::io::prometheus::client::Quantile* Summary::mutable_quantile(int index) { |
| // @@protoc_insertion_point(field_mutable:io.prometheus.client.Summary.quantile) |
| return quantile_.Mutable(index); |
| } |
| ::io::prometheus::client::Quantile* Summary::add_quantile() { |
| // @@protoc_insertion_point(field_add:io.prometheus.client.Summary.quantile) |
| return quantile_.Add(); |
| } |
| ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Quantile >* |
| Summary::mutable_quantile() { |
| // @@protoc_insertion_point(field_mutable_list:io.prometheus.client.Summary.quantile) |
| return &quantile_; |
| } |
| const ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Quantile >& |
| Summary::quantile() const { |
| // @@protoc_insertion_point(field_list:io.prometheus.client.Summary.quantile) |
| return quantile_; |
| } |
| |
| #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
| |
| // =================================================================== |
| |
| #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| const int Untyped::kValueFieldNumber; |
| #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| |
| Untyped::Untyped() |
| : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:io.prometheus.client.Untyped) |
| } |
| |
| void Untyped::InitAsDefaultInstance() { |
| _is_default_instance_ = true; |
| } |
| |
| Untyped::Untyped(const Untyped& from) |
| : ::google::protobuf::Message(), |
| _internal_metadata_(NULL) { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Untyped) |
| } |
| |
| void Untyped::SharedCtor() { |
| _is_default_instance_ = false; |
| _cached_size_ = 0; |
| value_ = 0; |
| } |
| |
| Untyped::~Untyped() { |
| // @@protoc_insertion_point(destructor:io.prometheus.client.Untyped) |
| SharedDtor(); |
| } |
| |
| void Untyped::SharedDtor() { |
| if (this != default_instance_) { |
| } |
| } |
| |
| void Untyped::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const ::google::protobuf::Descriptor* Untyped::descriptor() { |
| protobuf_AssignDescriptorsOnce(); |
| return Untyped_descriptor_; |
| } |
| |
| const Untyped& Untyped::default_instance() { |
| if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto(); |
| return *default_instance_; |
| } |
| |
| Untyped* Untyped::default_instance_ = NULL; |
| |
| Untyped* Untyped::New(::google::protobuf::Arena* arena) const { |
| Untyped* n = new Untyped; |
| if (arena != NULL) { |
| arena->Own(n); |
| } |
| return n; |
| } |
| |
| void Untyped::Clear() { |
| // @@protoc_insertion_point(message_clear_start:io.prometheus.client.Untyped) |
| value_ = 0; |
| } |
| |
| bool Untyped::MergePartialFromCodedStream( |
| ::google::protobuf::io::CodedInputStream* input) { |
| #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
| ::google::protobuf::uint32 tag; |
| // @@protoc_insertion_point(parse_start:io.prometheus.client.Untyped) |
| for (;;) { |
| ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| tag = p.first; |
| if (!p.second) goto handle_unusual; |
| switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| // optional double value = 1; |
| case 1: { |
| if (tag == 9) { |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( |
| input, &value_))); |
| |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectAtEnd()) goto success; |
| break; |
| } |
| |
| default: { |
| handle_unusual: |
| if (tag == 0 || |
| ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
| goto success; |
| } |
| DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); |
| break; |
| } |
| } |
| } |
| success: |
| // @@protoc_insertion_point(parse_success:io.prometheus.client.Untyped) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:io.prometheus.client.Untyped) |
| return false; |
| #undef DO_ |
| } |
| |
| void Untyped::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:io.prometheus.client.Untyped) |
| // optional double value = 1; |
| if (this->value() != 0) { |
| ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->value(), output); |
| } |
| |
| // @@protoc_insertion_point(serialize_end:io.prometheus.client.Untyped) |
| } |
| |
| ::google::protobuf::uint8* Untyped::InternalSerializeWithCachedSizesToArray( |
| bool deterministic, ::google::protobuf::uint8* target) const { |
| // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Untyped) |
| // optional double value = 1; |
| if (this->value() != 0) { |
| target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->value(), target); |
| } |
| |
| // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Untyped) |
| return target; |
| } |
| |
| int Untyped::ByteSize() const { |
| // @@protoc_insertion_point(message_byte_size_start:io.prometheus.client.Untyped) |
| int total_size = 0; |
| |
| // optional double value = 1; |
| if (this->value() != 0) { |
| total_size += 1 + 8; |
| } |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void Untyped::MergeFrom(const ::google::protobuf::Message& from) { |
| // @@protoc_insertion_point(generalized_merge_from_start:io.prometheus.client.Untyped) |
| if (GOOGLE_PREDICT_FALSE(&from == this)) { |
| ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); |
| } |
| const Untyped* source = |
| ::google::protobuf::internal::DynamicCastToGenerated<const Untyped>( |
| &from); |
| if (source == NULL) { |
| // @@protoc_insertion_point(generalized_merge_from_cast_fail:io.prometheus.client.Untyped) |
| ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| } else { |
| // @@protoc_insertion_point(generalized_merge_from_cast_success:io.prometheus.client.Untyped) |
| MergeFrom(*source); |
| } |
| } |
| |
| void Untyped::MergeFrom(const Untyped& from) { |
| // @@protoc_insertion_point(class_specific_merge_from_start:io.prometheus.client.Untyped) |
| if (GOOGLE_PREDICT_FALSE(&from == this)) { |
| ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); |
| } |
| if (from.value() != 0) { |
| set_value(from.value()); |
| } |
| } |
| |
| void Untyped::CopyFrom(const ::google::protobuf::Message& from) { |
| // @@protoc_insertion_point(generalized_copy_from_start:io.prometheus.client.Untyped) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| void Untyped::CopyFrom(const Untyped& from) { |
| // @@protoc_insertion_point(class_specific_copy_from_start:io.prometheus.client.Untyped) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool Untyped::IsInitialized() const { |
| |
| return true; |
| } |
| |
| void Untyped::Swap(Untyped* other) { |
| if (other == this) return; |
| InternalSwap(other); |
| } |
| void Untyped::InternalSwap(Untyped* other) { |
| std::swap(value_, other->value_); |
| _internal_metadata_.Swap(&other->_internal_metadata_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| |
| ::google::protobuf::Metadata Untyped::GetMetadata() const { |
| protobuf_AssignDescriptorsOnce(); |
| ::google::protobuf::Metadata metadata; |
| metadata.descriptor = Untyped_descriptor_; |
| metadata.reflection = Untyped_reflection_; |
| return metadata; |
| } |
| |
| #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| // Untyped |
| |
| // optional double value = 1; |
| void Untyped::clear_value() { |
| value_ = 0; |
| } |
| double Untyped::value() const { |
| // @@protoc_insertion_point(field_get:io.prometheus.client.Untyped.value) |
| return value_; |
| } |
| void Untyped::set_value(double value) { |
| |
| value_ = value; |
| // @@protoc_insertion_point(field_set:io.prometheus.client.Untyped.value) |
| } |
| |
| #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
| |
| // =================================================================== |
| |
| #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| const int Histogram::kSampleCountFieldNumber; |
| const int Histogram::kSampleSumFieldNumber; |
| const int Histogram::kBucketFieldNumber; |
| #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| |
| Histogram::Histogram() |
| : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:io.prometheus.client.Histogram) |
| } |
| |
| void Histogram::InitAsDefaultInstance() { |
| _is_default_instance_ = true; |
| } |
| |
| Histogram::Histogram(const Histogram& from) |
| : ::google::protobuf::Message(), |
| _internal_metadata_(NULL) { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Histogram) |
| } |
| |
| void Histogram::SharedCtor() { |
| _is_default_instance_ = false; |
| _cached_size_ = 0; |
| sample_count_ = GOOGLE_ULONGLONG(0); |
| sample_sum_ = 0; |
| } |
| |
| Histogram::~Histogram() { |
| // @@protoc_insertion_point(destructor:io.prometheus.client.Histogram) |
| SharedDtor(); |
| } |
| |
| void Histogram::SharedDtor() { |
| if (this != default_instance_) { |
| } |
| } |
| |
| void Histogram::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const ::google::protobuf::Descriptor* Histogram::descriptor() { |
| protobuf_AssignDescriptorsOnce(); |
| return Histogram_descriptor_; |
| } |
| |
| const Histogram& Histogram::default_instance() { |
| if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto(); |
| return *default_instance_; |
| } |
| |
| Histogram* Histogram::default_instance_ = NULL; |
| |
| Histogram* Histogram::New(::google::protobuf::Arena* arena) const { |
| Histogram* n = new Histogram; |
| if (arena != NULL) { |
| arena->Own(n); |
| } |
| return n; |
| } |
| |
| void Histogram::Clear() { |
| // @@protoc_insertion_point(message_clear_start:io.prometheus.client.Histogram) |
| #if defined(__clang__) |
| #define ZR_HELPER_(f) \ |
| _Pragma("clang diagnostic push") \ |
| _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \ |
| __builtin_offsetof(Histogram, f) \ |
| _Pragma("clang diagnostic pop") |
| #else |
| #define ZR_HELPER_(f) reinterpret_cast<char*>(\ |
| &reinterpret_cast<Histogram*>(16)->f) |
| #endif |
| |
| #define ZR_(first, last) do {\ |
| ::memset(&first, 0,\ |
| ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ |
| } while (0) |
| |
| ZR_(sample_count_, sample_sum_); |
| |
| #undef ZR_HELPER_ |
| #undef ZR_ |
| |
| bucket_.Clear(); |
| } |
| |
| bool Histogram::MergePartialFromCodedStream( |
| ::google::protobuf::io::CodedInputStream* input) { |
| #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
| ::google::protobuf::uint32 tag; |
| // @@protoc_insertion_point(parse_start:io.prometheus.client.Histogram) |
| for (;;) { |
| ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| tag = p.first; |
| if (!p.second) goto handle_unusual; |
| switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| // optional uint64 sample_count = 1; |
| case 1: { |
| if (tag == 8) { |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( |
| input, &sample_count_))); |
| |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(17)) goto parse_sample_sum; |
| break; |
| } |
| |
| // optional double sample_sum = 2; |
| case 2: { |
| if (tag == 17) { |
| parse_sample_sum: |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( |
| input, &sample_sum_))); |
| |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(26)) goto parse_bucket; |
| break; |
| } |
| |
| // repeated .io.prometheus.client.Bucket bucket = 3; |
| case 3: { |
| if (tag == 26) { |
| parse_bucket: |
| DO_(input->IncrementRecursionDepth()); |
| parse_loop_bucket: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
| input, add_bucket())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(26)) goto parse_loop_bucket; |
| input->UnsafeDecrementRecursionDepth(); |
| if (input->ExpectAtEnd()) goto success; |
| break; |
| } |
| |
| default: { |
| handle_unusual: |
| if (tag == 0 || |
| ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
| goto success; |
| } |
| DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); |
| break; |
| } |
| } |
| } |
| success: |
| // @@protoc_insertion_point(parse_success:io.prometheus.client.Histogram) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:io.prometheus.client.Histogram) |
| return false; |
| #undef DO_ |
| } |
| |
| void Histogram::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:io.prometheus.client.Histogram) |
| // optional uint64 sample_count = 1; |
| if (this->sample_count() != 0) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->sample_count(), output); |
| } |
| |
| // optional double sample_sum = 2; |
| if (this->sample_sum() != 0) { |
| ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->sample_sum(), output); |
| } |
| |
| // repeated .io.prometheus.client.Bucket bucket = 3; |
| for (unsigned int i = 0, n = this->bucket_size(); i < n; i++) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 3, this->bucket(i), output); |
| } |
| |
| // @@protoc_insertion_point(serialize_end:io.prometheus.client.Histogram) |
| } |
| |
| ::google::protobuf::uint8* Histogram::InternalSerializeWithCachedSizesToArray( |
| bool deterministic, ::google::protobuf::uint8* target) const { |
| // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Histogram) |
| // optional uint64 sample_count = 1; |
| if (this->sample_count() != 0) { |
| target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->sample_count(), target); |
| } |
| |
| // optional double sample_sum = 2; |
| if (this->sample_sum() != 0) { |
| target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->sample_sum(), target); |
| } |
| |
| // repeated .io.prometheus.client.Bucket bucket = 3; |
| for (unsigned int i = 0, n = this->bucket_size(); i < n; i++) { |
| target = ::google::protobuf::internal::WireFormatLite:: |
| InternalWriteMessageNoVirtualToArray( |
| 3, this->bucket(i), false, target); |
| } |
| |
| // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Histogram) |
| return target; |
| } |
| |
| int Histogram::ByteSize() const { |
| // @@protoc_insertion_point(message_byte_size_start:io.prometheus.client.Histogram) |
| int total_size = 0; |
| |
| // optional uint64 sample_count = 1; |
| if (this->sample_count() != 0) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->sample_count()); |
| } |
| |
| // optional double sample_sum = 2; |
| if (this->sample_sum() != 0) { |
| total_size += 1 + 8; |
| } |
| |
| // repeated .io.prometheus.client.Bucket bucket = 3; |
| total_size += 1 * this->bucket_size(); |
| for (int i = 0; i < this->bucket_size(); i++) { |
| total_size += |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->bucket(i)); |
| } |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void Histogram::MergeFrom(const ::google::protobuf::Message& from) { |
| // @@protoc_insertion_point(generalized_merge_from_start:io.prometheus.client.Histogram) |
| if (GOOGLE_PREDICT_FALSE(&from == this)) { |
| ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); |
| } |
| const Histogram* source = |
| ::google::protobuf::internal::DynamicCastToGenerated<const Histogram>( |
| &from); |
| if (source == NULL) { |
| // @@protoc_insertion_point(generalized_merge_from_cast_fail:io.prometheus.client.Histogram) |
| ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| } else { |
| // @@protoc_insertion_point(generalized_merge_from_cast_success:io.prometheus.client.Histogram) |
| MergeFrom(*source); |
| } |
| } |
| |
| void Histogram::MergeFrom(const Histogram& from) { |
| // @@protoc_insertion_point(class_specific_merge_from_start:io.prometheus.client.Histogram) |
| if (GOOGLE_PREDICT_FALSE(&from == this)) { |
| ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); |
| } |
| bucket_.MergeFrom(from.bucket_); |
| if (from.sample_count() != 0) { |
| set_sample_count(from.sample_count()); |
| } |
| if (from.sample_sum() != 0) { |
| set_sample_sum(from.sample_sum()); |
| } |
| } |
| |
| void Histogram::CopyFrom(const ::google::protobuf::Message& from) { |
| // @@protoc_insertion_point(generalized_copy_from_start:io.prometheus.client.Histogram) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| void Histogram::CopyFrom(const Histogram& from) { |
| // @@protoc_insertion_point(class_specific_copy_from_start:io.prometheus.client.Histogram) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool Histogram::IsInitialized() const { |
| |
| return true; |
| } |
| |
| void Histogram::Swap(Histogram* other) { |
| if (other == this) return; |
| InternalSwap(other); |
| } |
| void Histogram::InternalSwap(Histogram* other) { |
| std::swap(sample_count_, other->sample_count_); |
| std::swap(sample_sum_, other->sample_sum_); |
| bucket_.UnsafeArenaSwap(&other->bucket_); |
| _internal_metadata_.Swap(&other->_internal_metadata_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| |
| ::google::protobuf::Metadata Histogram::GetMetadata() const { |
| protobuf_AssignDescriptorsOnce(); |
| ::google::protobuf::Metadata metadata; |
| metadata.descriptor = Histogram_descriptor_; |
| metadata.reflection = Histogram_reflection_; |
| return metadata; |
| } |
| |
| #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| // Histogram |
| |
| // optional uint64 sample_count = 1; |
| void Histogram::clear_sample_count() { |
| sample_count_ = GOOGLE_ULONGLONG(0); |
| } |
| ::google::protobuf::uint64 Histogram::sample_count() const { |
| // @@protoc_insertion_point(field_get:io.prometheus.client.Histogram.sample_count) |
| return sample_count_; |
| } |
| void Histogram::set_sample_count(::google::protobuf::uint64 value) { |
| |
| sample_count_ = value; |
| // @@protoc_insertion_point(field_set:io.prometheus.client.Histogram.sample_count) |
| } |
| |
| // optional double sample_sum = 2; |
| void Histogram::clear_sample_sum() { |
| sample_sum_ = 0; |
| } |
| double Histogram::sample_sum() const { |
| // @@protoc_insertion_point(field_get:io.prometheus.client.Histogram.sample_sum) |
| return sample_sum_; |
| } |
| void Histogram::set_sample_sum(double value) { |
| |
| sample_sum_ = value; |
| // @@protoc_insertion_point(field_set:io.prometheus.client.Histogram.sample_sum) |
| } |
| |
| // repeated .io.prometheus.client.Bucket bucket = 3; |
| int Histogram::bucket_size() const { |
| return bucket_.size(); |
| } |
| void Histogram::clear_bucket() { |
| bucket_.Clear(); |
| } |
| const ::io::prometheus::client::Bucket& Histogram::bucket(int index) const { |
| // @@protoc_insertion_point(field_get:io.prometheus.client.Histogram.bucket) |
| return bucket_.Get(index); |
| } |
| ::io::prometheus::client::Bucket* Histogram::mutable_bucket(int index) { |
| // @@protoc_insertion_point(field_mutable:io.prometheus.client.Histogram.bucket) |
| return bucket_.Mutable(index); |
| } |
| ::io::prometheus::client::Bucket* Histogram::add_bucket() { |
| // @@protoc_insertion_point(field_add:io.prometheus.client.Histogram.bucket) |
| return bucket_.Add(); |
| } |
| ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Bucket >* |
| Histogram::mutable_bucket() { |
| // @@protoc_insertion_point(field_mutable_list:io.prometheus.client.Histogram.bucket) |
| return &bucket_; |
| } |
| const ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Bucket >& |
| Histogram::bucket() const { |
| // @@protoc_insertion_point(field_list:io.prometheus.client.Histogram.bucket) |
| return bucket_; |
| } |
| |
| #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
| |
| // =================================================================== |
| |
| #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| const int Bucket::kCumulativeCountFieldNumber; |
| const int Bucket::kUpperBoundFieldNumber; |
| #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| |
| Bucket::Bucket() |
| : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:io.prometheus.client.Bucket) |
| } |
| |
| void Bucket::InitAsDefaultInstance() { |
| _is_default_instance_ = true; |
| } |
| |
| Bucket::Bucket(const Bucket& from) |
| : ::google::protobuf::Message(), |
| _internal_metadata_(NULL) { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Bucket) |
| } |
| |
| void Bucket::SharedCtor() { |
| _is_default_instance_ = false; |
| _cached_size_ = 0; |
| cumulative_count_ = GOOGLE_ULONGLONG(0); |
| upper_bound_ = 0; |
| } |
| |
| Bucket::~Bucket() { |
| // @@protoc_insertion_point(destructor:io.prometheus.client.Bucket) |
| SharedDtor(); |
| } |
| |
| void Bucket::SharedDtor() { |
| if (this != default_instance_) { |
| } |
| } |
| |
| void Bucket::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const ::google::protobuf::Descriptor* Bucket::descriptor() { |
| protobuf_AssignDescriptorsOnce(); |
| return Bucket_descriptor_; |
| } |
| |
| const Bucket& Bucket::default_instance() { |
| if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto(); |
| return *default_instance_; |
| } |
| |
| Bucket* Bucket::default_instance_ = NULL; |
| |
| Bucket* Bucket::New(::google::protobuf::Arena* arena) const { |
| Bucket* n = new Bucket; |
| if (arena != NULL) { |
| arena->Own(n); |
| } |
| return n; |
| } |
| |
| void Bucket::Clear() { |
| // @@protoc_insertion_point(message_clear_start:io.prometheus.client.Bucket) |
| #if defined(__clang__) |
| #define ZR_HELPER_(f) \ |
| _Pragma("clang diagnostic push") \ |
| _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \ |
| __builtin_offsetof(Bucket, f) \ |
| _Pragma("clang diagnostic pop") |
| #else |
| #define ZR_HELPER_(f) reinterpret_cast<char*>(\ |
| &reinterpret_cast<Bucket*>(16)->f) |
| #endif |
| |
| #define ZR_(first, last) do {\ |
| ::memset(&first, 0,\ |
| ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ |
| } while (0) |
| |
| ZR_(cumulative_count_, upper_bound_); |
| |
| #undef ZR_HELPER_ |
| #undef ZR_ |
| |
| } |
| |
| bool Bucket::MergePartialFromCodedStream( |
| ::google::protobuf::io::CodedInputStream* input) { |
| #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
| ::google::protobuf::uint32 tag; |
| // @@protoc_insertion_point(parse_start:io.prometheus.client.Bucket) |
| for (;;) { |
| ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| tag = p.first; |
| if (!p.second) goto handle_unusual; |
| switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| // optional uint64 cumulative_count = 1; |
| case 1: { |
| if (tag == 8) { |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( |
| input, &cumulative_count_))); |
| |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(17)) goto parse_upper_bound; |
| break; |
| } |
| |
| // optional double upper_bound = 2; |
| case 2: { |
| if (tag == 17) { |
| parse_upper_bound: |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( |
| input, &upper_bound_))); |
| |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectAtEnd()) goto success; |
| break; |
| } |
| |
| default: { |
| handle_unusual: |
| if (tag == 0 || |
| ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
| goto success; |
| } |
| DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); |
| break; |
| } |
| } |
| } |
| success: |
| // @@protoc_insertion_point(parse_success:io.prometheus.client.Bucket) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:io.prometheus.client.Bucket) |
| return false; |
| #undef DO_ |
| } |
| |
| void Bucket::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:io.prometheus.client.Bucket) |
| // optional uint64 cumulative_count = 1; |
| if (this->cumulative_count() != 0) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->cumulative_count(), output); |
| } |
| |
| // optional double upper_bound = 2; |
| if (this->upper_bound() != 0) { |
| ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->upper_bound(), output); |
| } |
| |
| // @@protoc_insertion_point(serialize_end:io.prometheus.client.Bucket) |
| } |
| |
| ::google::protobuf::uint8* Bucket::InternalSerializeWithCachedSizesToArray( |
| bool deterministic, ::google::protobuf::uint8* target) const { |
| // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Bucket) |
| // optional uint64 cumulative_count = 1; |
| if (this->cumulative_count() != 0) { |
| target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->cumulative_count(), target); |
| } |
| |
| // optional double upper_bound = 2; |
| if (this->upper_bound() != 0) { |
| target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->upper_bound(), target); |
| } |
| |
| // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Bucket) |
| return target; |
| } |
| |
| int Bucket::ByteSize() const { |
| // @@protoc_insertion_point(message_byte_size_start:io.prometheus.client.Bucket) |
| int total_size = 0; |
| |
| // optional uint64 cumulative_count = 1; |
| if (this->cumulative_count() != 0) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->cumulative_count()); |
| } |
| |
| // optional double upper_bound = 2; |
| if (this->upper_bound() != 0) { |
| total_size += 1 + 8; |
| } |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void Bucket::MergeFrom(const ::google::protobuf::Message& from) { |
| // @@protoc_insertion_point(generalized_merge_from_start:io.prometheus.client.Bucket) |
| if (GOOGLE_PREDICT_FALSE(&from == this)) { |
| ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); |
| } |
| const Bucket* source = |
| ::google::protobuf::internal::DynamicCastToGenerated<const Bucket>( |
| &from); |
| if (source == NULL) { |
| // @@protoc_insertion_point(generalized_merge_from_cast_fail:io.prometheus.client.Bucket) |
| ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| } else { |
| // @@protoc_insertion_point(generalized_merge_from_cast_success:io.prometheus.client.Bucket) |
| MergeFrom(*source); |
| } |
| } |
| |
| void Bucket::MergeFrom(const Bucket& from) { |
| // @@protoc_insertion_point(class_specific_merge_from_start:io.prometheus.client.Bucket) |
| if (GOOGLE_PREDICT_FALSE(&from == this)) { |
| ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); |
| } |
| if (from.cumulative_count() != 0) { |
| set_cumulative_count(from.cumulative_count()); |
| } |
| if (from.upper_bound() != 0) { |
| set_upper_bound(from.upper_bound()); |
| } |
| } |
| |
| void Bucket::CopyFrom(const ::google::protobuf::Message& from) { |
| // @@protoc_insertion_point(generalized_copy_from_start:io.prometheus.client.Bucket) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| void Bucket::CopyFrom(const Bucket& from) { |
| // @@protoc_insertion_point(class_specific_copy_from_start:io.prometheus.client.Bucket) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool Bucket::IsInitialized() const { |
| |
| return true; |
| } |
| |
| void Bucket::Swap(Bucket* other) { |
| if (other == this) return; |
| InternalSwap(other); |
| } |
| void Bucket::InternalSwap(Bucket* other) { |
| std::swap(cumulative_count_, other->cumulative_count_); |
| std::swap(upper_bound_, other->upper_bound_); |
| _internal_metadata_.Swap(&other->_internal_metadata_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| |
| ::google::protobuf::Metadata Bucket::GetMetadata() const { |
| protobuf_AssignDescriptorsOnce(); |
| ::google::protobuf::Metadata metadata; |
| metadata.descriptor = Bucket_descriptor_; |
| metadata.reflection = Bucket_reflection_; |
| return metadata; |
| } |
| |
| #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| // Bucket |
| |
| // optional uint64 cumulative_count = 1; |
| void Bucket::clear_cumulative_count() { |
| cumulative_count_ = GOOGLE_ULONGLONG(0); |
| } |
| ::google::protobuf::uint64 Bucket::cumulative_count() const { |
| // @@protoc_insertion_point(field_get:io.prometheus.client.Bucket.cumulative_count) |
| return cumulative_count_; |
| } |
| void Bucket::set_cumulative_count(::google::protobuf::uint64 value) { |
| |
| cumulative_count_ = value; |
| // @@protoc_insertion_point(field_set:io.prometheus.client.Bucket.cumulative_count) |
| } |
| |
| // optional double upper_bound = 2; |
| void Bucket::clear_upper_bound() { |
| upper_bound_ = 0; |
| } |
| double Bucket::upper_bound() const { |
| // @@protoc_insertion_point(field_get:io.prometheus.client.Bucket.upper_bound) |
| return upper_bound_; |
| } |
| void Bucket::set_upper_bound(double value) { |
| |
| upper_bound_ = value; |
| // @@protoc_insertion_point(field_set:io.prometheus.client.Bucket.upper_bound) |
| } |
| |
| #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
| |
| // =================================================================== |
| |
| #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| const int Metric::kLabelFieldNumber; |
| const int Metric::kGaugeFieldNumber; |
| const int Metric::kCounterFieldNumber; |
| const int Metric::kSummaryFieldNumber; |
| const int Metric::kUntypedFieldNumber; |
| const int Metric::kHistogramFieldNumber; |
| const int Metric::kTimestampMsFieldNumber; |
| #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| |
| Metric::Metric() |
| : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:io.prometheus.client.Metric) |
| } |
| |
| void Metric::InitAsDefaultInstance() { |
| _is_default_instance_ = true; |
| gauge_ = const_cast< ::io::prometheus::client::Gauge*>(&::io::prometheus::client::Gauge::default_instance()); |
| counter_ = const_cast< ::io::prometheus::client::Counter*>(&::io::prometheus::client::Counter::default_instance()); |
| summary_ = const_cast< ::io::prometheus::client::Summary*>(&::io::prometheus::client::Summary::default_instance()); |
| untyped_ = const_cast< ::io::prometheus::client::Untyped*>(&::io::prometheus::client::Untyped::default_instance()); |
| histogram_ = const_cast< ::io::prometheus::client::Histogram*>(&::io::prometheus::client::Histogram::default_instance()); |
| } |
| |
| Metric::Metric(const Metric& from) |
| : ::google::protobuf::Message(), |
| _internal_metadata_(NULL) { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Metric) |
| } |
| |
| void Metric::SharedCtor() { |
| _is_default_instance_ = false; |
| _cached_size_ = 0; |
| gauge_ = NULL; |
| counter_ = NULL; |
| summary_ = NULL; |
| untyped_ = NULL; |
| histogram_ = NULL; |
| timestamp_ms_ = GOOGLE_LONGLONG(0); |
| } |
| |
| Metric::~Metric() { |
| // @@protoc_insertion_point(destructor:io.prometheus.client.Metric) |
| SharedDtor(); |
| } |
| |
| void Metric::SharedDtor() { |
| if (this != default_instance_) { |
| delete gauge_; |
| delete counter_; |
| delete summary_; |
| delete untyped_; |
| delete histogram_; |
| } |
| } |
| |
| void Metric::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const ::google::protobuf::Descriptor* Metric::descriptor() { |
| protobuf_AssignDescriptorsOnce(); |
| return Metric_descriptor_; |
| } |
| |
| const Metric& Metric::default_instance() { |
| if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto(); |
| return *default_instance_; |
| } |
| |
| Metric* Metric::default_instance_ = NULL; |
| |
| Metric* Metric::New(::google::protobuf::Arena* arena) const { |
| Metric* n = new Metric; |
| if (arena != NULL) { |
| arena->Own(n); |
| } |
| return n; |
| } |
| |
| void Metric::Clear() { |
| // @@protoc_insertion_point(message_clear_start:io.prometheus.client.Metric) |
| if (GetArenaNoVirtual() == NULL && gauge_ != NULL) delete gauge_; |
| gauge_ = NULL; |
| if (GetArenaNoVirtual() == NULL && counter_ != NULL) delete counter_; |
| counter_ = NULL; |
| if (GetArenaNoVirtual() == NULL && summary_ != NULL) delete summary_; |
| summary_ = NULL; |
| if (GetArenaNoVirtual() == NULL && untyped_ != NULL) delete untyped_; |
| untyped_ = NULL; |
| if (GetArenaNoVirtual() == NULL && histogram_ != NULL) delete histogram_; |
| histogram_ = NULL; |
| timestamp_ms_ = GOOGLE_LONGLONG(0); |
| label_.Clear(); |
| } |
| |
| bool Metric::MergePartialFromCodedStream( |
| ::google::protobuf::io::CodedInputStream* input) { |
| #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
| ::google::protobuf::uint32 tag; |
| // @@protoc_insertion_point(parse_start:io.prometheus.client.Metric) |
| for (;;) { |
| ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| tag = p.first; |
| if (!p.second) goto handle_unusual; |
| switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| // repeated .io.prometheus.client.LabelPair label = 1; |
| case 1: { |
| if (tag == 10) { |
| DO_(input->IncrementRecursionDepth()); |
| parse_loop_label: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
| input, add_label())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(10)) goto parse_loop_label; |
| input->UnsafeDecrementRecursionDepth(); |
| if (input->ExpectTag(18)) goto parse_gauge; |
| break; |
| } |
| |
| // optional .io.prometheus.client.Gauge gauge = 2; |
| case 2: { |
| if (tag == 18) { |
| parse_gauge: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_gauge())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(26)) goto parse_counter; |
| break; |
| } |
| |
| // optional .io.prometheus.client.Counter counter = 3; |
| case 3: { |
| if (tag == 26) { |
| parse_counter: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_counter())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(34)) goto parse_summary; |
| break; |
| } |
| |
| // optional .io.prometheus.client.Summary summary = 4; |
| case 4: { |
| if (tag == 34) { |
| parse_summary: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_summary())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(42)) goto parse_untyped; |
| break; |
| } |
| |
| // optional .io.prometheus.client.Untyped untyped = 5; |
| case 5: { |
| if (tag == 42) { |
| parse_untyped: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_untyped())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(48)) goto parse_timestamp_ms; |
| break; |
| } |
| |
| // optional int64 timestamp_ms = 6; |
| case 6: { |
| if (tag == 48) { |
| parse_timestamp_ms: |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( |
| input, ×tamp_ms_))); |
| |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(58)) goto parse_histogram; |
| break; |
| } |
| |
| // optional .io.prometheus.client.Histogram histogram = 7; |
| case 7: { |
| if (tag == 58) { |
| parse_histogram: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_histogram())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectAtEnd()) goto success; |
| break; |
| } |
| |
| default: { |
| handle_unusual: |
| if (tag == 0 || |
| ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
| goto success; |
| } |
| DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); |
| break; |
| } |
| } |
| } |
| success: |
| // @@protoc_insertion_point(parse_success:io.prometheus.client.Metric) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:io.prometheus.client.Metric) |
| return false; |
| #undef DO_ |
| } |
| |
| void Metric::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:io.prometheus.client.Metric) |
| // repeated .io.prometheus.client.LabelPair label = 1; |
| for (unsigned int i = 0, n = this->label_size(); i < n; i++) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 1, this->label(i), output); |
| } |
| |
| // optional .io.prometheus.client.Gauge gauge = 2; |
| if (this->has_gauge()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 2, *this->gauge_, output); |
| } |
| |
| // optional .io.prometheus.client.Counter counter = 3; |
| if (this->has_counter()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 3, *this->counter_, output); |
| } |
| |
| // optional .io.prometheus.client.Summary summary = 4; |
| if (this->has_summary()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 4, *this->summary_, output); |
| } |
| |
| // optional .io.prometheus.client.Untyped untyped = 5; |
| if (this->has_untyped()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 5, *this->untyped_, output); |
| } |
| |
| // optional int64 timestamp_ms = 6; |
| if (this->timestamp_ms() != 0) { |
| ::google::protobuf::internal::WireFormatLite::WriteInt64(6, this->timestamp_ms(), output); |
| } |
| |
| // optional .io.prometheus.client.Histogram histogram = 7; |
| if (this->has_histogram()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 7, *this->histogram_, output); |
| } |
| |
| // @@protoc_insertion_point(serialize_end:io.prometheus.client.Metric) |
| } |
| |
| ::google::protobuf::uint8* Metric::InternalSerializeWithCachedSizesToArray( |
| bool deterministic, ::google::protobuf::uint8* target) const { |
| // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Metric) |
| // repeated .io.prometheus.client.LabelPair label = 1; |
| for (unsigned int i = 0, n = this->label_size(); i < n; i++) { |
| target = ::google::protobuf::internal::WireFormatLite:: |
| InternalWriteMessageNoVirtualToArray( |
| 1, this->label(i), false, target); |
| } |
| |
| // optional .io.prometheus.client.Gauge gauge = 2; |
| if (this->has_gauge()) { |
| target = ::google::protobuf::internal::WireFormatLite:: |
| InternalWriteMessageNoVirtualToArray( |
| 2, *this->gauge_, false, target); |
| } |
| |
| // optional .io.prometheus.client.Counter counter = 3; |
| if (this->has_counter()) { |
| target = ::google::protobuf::internal::WireFormatLite:: |
| InternalWriteMessageNoVirtualToArray( |
| 3, *this->counter_, false, target); |
| } |
| |
| // optional .io.prometheus.client.Summary summary = 4; |
| if (this->has_summary()) { |
| target = ::google::protobuf::internal::WireFormatLite:: |
| InternalWriteMessageNoVirtualToArray( |
| 4, *this->summary_, false, target); |
| } |
| |
| // optional .io.prometheus.client.Untyped untyped = 5; |
| if (this->has_untyped()) { |
| target = ::google::protobuf::internal::WireFormatLite:: |
| InternalWriteMessageNoVirtualToArray( |
| 5, *this->untyped_, false, target); |
| } |
| |
| // optional int64 timestamp_ms = 6; |
| if (this->timestamp_ms() != 0) { |
| target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(6, this->timestamp_ms(), target); |
| } |
| |
| // optional .io.prometheus.client.Histogram histogram = 7; |
| if (this->has_histogram()) { |
| target = ::google::protobuf::internal::WireFormatLite:: |
| InternalWriteMessageNoVirtualToArray( |
| 7, *this->histogram_, false, target); |
| } |
| |
| // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Metric) |
| return target; |
| } |
| |
| int Metric::ByteSize() const { |
| // @@protoc_insertion_point(message_byte_size_start:io.prometheus.client.Metric) |
| int total_size = 0; |
| |
| // optional .io.prometheus.client.Gauge gauge = 2; |
| if (this->has_gauge()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| *this->gauge_); |
| } |
| |
| // optional .io.prometheus.client.Counter counter = 3; |
| if (this->has_counter()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| *this->counter_); |
| } |
| |
| // optional .io.prometheus.client.Summary summary = 4; |
| if (this->has_summary()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| *this->summary_); |
| } |
| |
| // optional .io.prometheus.client.Untyped untyped = 5; |
| if (this->has_untyped()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| *this->untyped_); |
| } |
| |
| // optional .io.prometheus.client.Histogram histogram = 7; |
| if (this->has_histogram()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| *this->histogram_); |
| } |
| |
| // optional int64 timestamp_ms = 6; |
| if (this->timestamp_ms() != 0) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::Int64Size( |
| this->timestamp_ms()); |
| } |
| |
| // repeated .io.prometheus.client.LabelPair label = 1; |
| total_size += 1 * this->label_size(); |
| for (int i = 0; i < this->label_size(); i++) { |
| total_size += |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->label(i)); |
| } |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void Metric::MergeFrom(const ::google::protobuf::Message& from) { |
| // @@protoc_insertion_point(generalized_merge_from_start:io.prometheus.client.Metric) |
| if (GOOGLE_PREDICT_FALSE(&from == this)) { |
| ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); |
| } |
| const Metric* source = |
| ::google::protobuf::internal::DynamicCastToGenerated<const Metric>( |
| &from); |
| if (source == NULL) { |
| // @@protoc_insertion_point(generalized_merge_from_cast_fail:io.prometheus.client.Metric) |
| ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| } else { |
| // @@protoc_insertion_point(generalized_merge_from_cast_success:io.prometheus.client.Metric) |
| MergeFrom(*source); |
| } |
| } |
| |
| void Metric::MergeFrom(const Metric& from) { |
| // @@protoc_insertion_point(class_specific_merge_from_start:io.prometheus.client.Metric) |
| if (GOOGLE_PREDICT_FALSE(&from == this)) { |
| ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); |
| } |
| label_.MergeFrom(from.label_); |
| if (from.has_gauge()) { |
| mutable_gauge()->::io::prometheus::client::Gauge::MergeFrom(from.gauge()); |
| } |
| if (from.has_counter()) { |
| mutable_counter()->::io::prometheus::client::Counter::MergeFrom(from.counter()); |
| } |
| if (from.has_summary()) { |
| mutable_summary()->::io::prometheus::client::Summary::MergeFrom(from.summary()); |
| } |
| if (from.has_untyped()) { |
| mutable_untyped()->::io::prometheus::client::Untyped::MergeFrom(from.untyped()); |
| } |
| if (from.has_histogram()) { |
| mutable_histogram()->::io::prometheus::client::Histogram::MergeFrom(from.histogram()); |
| } |
| if (from.timestamp_ms() != 0) { |
| set_timestamp_ms(from.timestamp_ms()); |
| } |
| } |
| |
| void Metric::CopyFrom(const ::google::protobuf::Message& from) { |
| // @@protoc_insertion_point(generalized_copy_from_start:io.prometheus.client.Metric) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| void Metric::CopyFrom(const Metric& from) { |
| // @@protoc_insertion_point(class_specific_copy_from_start:io.prometheus.client.Metric) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool Metric::IsInitialized() const { |
| |
| return true; |
| } |
| |
| void Metric::Swap(Metric* other) { |
| if (other == this) return; |
| InternalSwap(other); |
| } |
| void Metric::InternalSwap(Metric* other) { |
| label_.UnsafeArenaSwap(&other->label_); |
| std::swap(gauge_, other->gauge_); |
| std::swap(counter_, other->counter_); |
| std::swap(summary_, other->summary_); |
| std::swap(untyped_, other->untyped_); |
| std::swap(histogram_, other->histogram_); |
| std::swap(timestamp_ms_, other->timestamp_ms_); |
| _internal_metadata_.Swap(&other->_internal_metadata_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| |
| ::google::protobuf::Metadata Metric::GetMetadata() const { |
| protobuf_AssignDescriptorsOnce(); |
| ::google::protobuf::Metadata metadata; |
| metadata.descriptor = Metric_descriptor_; |
| metadata.reflection = Metric_reflection_; |
| return metadata; |
| } |
| |
| #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| // Metric |
| |
| // repeated .io.prometheus.client.LabelPair label = 1; |
| int Metric::label_size() const { |
| return label_.size(); |
| } |
| void Metric::clear_label() { |
| label_.Clear(); |
| } |
| const ::io::prometheus::client::LabelPair& Metric::label(int index) const { |
| // @@protoc_insertion_point(field_get:io.prometheus.client.Metric.label) |
| return label_.Get(index); |
| } |
| ::io::prometheus::client::LabelPair* Metric::mutable_label(int index) { |
| // @@protoc_insertion_point(field_mutable:io.prometheus.client.Metric.label) |
| return label_.Mutable(index); |
| } |
| ::io::prometheus::client::LabelPair* Metric::add_label() { |
| // @@protoc_insertion_point(field_add:io.prometheus.client.Metric.label) |
| return label_.Add(); |
| } |
| ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::LabelPair >* |
| Metric::mutable_label() { |
| // @@protoc_insertion_point(field_mutable_list:io.prometheus.client.Metric.label) |
| return &label_; |
| } |
| const ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::LabelPair >& |
| Metric::label() const { |
| // @@protoc_insertion_point(field_list:io.prometheus.client.Metric.label) |
| return label_; |
| } |
| |
| // optional .io.prometheus.client.Gauge gauge = 2; |
| bool Metric::has_gauge() const { |
| return !_is_default_instance_ && gauge_ != NULL; |
| } |
| void Metric::clear_gauge() { |
| if (GetArenaNoVirtual() == NULL && gauge_ != NULL) delete gauge_; |
| gauge_ = NULL; |
| } |
| const ::io::prometheus::client::Gauge& Metric::gauge() const { |
| // @@protoc_insertion_point(field_get:io.prometheus.client.Metric.gauge) |
| return gauge_ != NULL ? *gauge_ : *default_instance_->gauge_; |
| } |
| ::io::prometheus::client::Gauge* Metric::mutable_gauge() { |
| |
| if (gauge_ == NULL) { |
| gauge_ = new ::io::prometheus::client::Gauge; |
| } |
| // @@protoc_insertion_point(field_mutable:io.prometheus.client.Metric.gauge) |
| return gauge_; |
| } |
| ::io::prometheus::client::Gauge* Metric::release_gauge() { |
| // @@protoc_insertion_point(field_release:io.prometheus.client.Metric.gauge) |
| |
| ::io::prometheus::client::Gauge* temp = gauge_; |
| gauge_ = NULL; |
| return temp; |
| } |
| void Metric::set_allocated_gauge(::io::prometheus::client::Gauge* gauge) { |
| delete gauge_; |
| gauge_ = gauge; |
| if (gauge) { |
| |
| } else { |
| |
| } |
| // @@protoc_insertion_point(field_set_allocated:io.prometheus.client.Metric.gauge) |
| } |
| |
| // optional .io.prometheus.client.Counter counter = 3; |
| bool Metric::has_counter() const { |
| return !_is_default_instance_ && counter_ != NULL; |
| } |
| void Metric::clear_counter() { |
| if (GetArenaNoVirtual() == NULL && counter_ != NULL) delete counter_; |
| counter_ = NULL; |
| } |
| const ::io::prometheus::client::Counter& Metric::counter() const { |
| // @@protoc_insertion_point(field_get:io.prometheus.client.Metric.counter) |
| return counter_ != NULL ? *counter_ : *default_instance_->counter_; |
| } |
| ::io::prometheus::client::Counter* Metric::mutable_counter() { |
| |
| if (counter_ == NULL) { |
| counter_ = new ::io::prometheus::client::Counter; |
| } |
| // @@protoc_insertion_point(field_mutable:io.prometheus.client.Metric.counter) |
| return counter_; |
| } |
| ::io::prometheus::client::Counter* Metric::release_counter() { |
| // @@protoc_insertion_point(field_release:io.prometheus.client.Metric.counter) |
| |
| ::io::prometheus::client::Counter* temp = counter_; |
| counter_ = NULL; |
| return temp; |
| } |
| void Metric::set_allocated_counter(::io::prometheus::client::Counter* counter) { |
| delete counter_; |
| counter_ = counter; |
| if (counter) { |
| |
| } else { |
| |
| } |
| // @@protoc_insertion_point(field_set_allocated:io.prometheus.client.Metric.counter) |
| } |
| |
| // optional .io.prometheus.client.Summary summary = 4; |
| bool Metric::has_summary() const { |
| return !_is_default_instance_ && summary_ != NULL; |
| } |
| void Metric::clear_summary() { |
| if (GetArenaNoVirtual() == NULL && summary_ != NULL) delete summary_; |
| summary_ = NULL; |
| } |
| const ::io::prometheus::client::Summary& Metric::summary() const { |
| // @@protoc_insertion_point(field_get:io.prometheus.client.Metric.summary) |
| return summary_ != NULL ? *summary_ : *default_instance_->summary_; |
| } |
| ::io::prometheus::client::Summary* Metric::mutable_summary() { |
| |
| if (summary_ == NULL) { |
| summary_ = new ::io::prometheus::client::Summary; |
| } |
| // @@protoc_insertion_point(field_mutable:io.prometheus.client.Metric.summary) |
| return summary_; |
| } |
| ::io::prometheus::client::Summary* Metric::release_summary() { |
| // @@protoc_insertion_point(field_release:io.prometheus.client.Metric.summary) |
| |
| ::io::prometheus::client::Summary* temp = summary_; |
| summary_ = NULL; |
| return temp; |
| } |
| void Metric::set_allocated_summary(::io::prometheus::client::Summary* summary) { |
| delete summary_; |
| summary_ = summary; |
| if (summary) { |
| |
| } else { |
| |
| } |
| // @@protoc_insertion_point(field_set_allocated:io.prometheus.client.Metric.summary) |
| } |
| |
| // optional .io.prometheus.client.Untyped untyped = 5; |
| bool Metric::has_untyped() const { |
| return !_is_default_instance_ && untyped_ != NULL; |
| } |
| void Metric::clear_untyped() { |
| if (GetArenaNoVirtual() == NULL && untyped_ != NULL) delete untyped_; |
| untyped_ = NULL; |
| } |
| const ::io::prometheus::client::Untyped& Metric::untyped() const { |
| // @@protoc_insertion_point(field_get:io.prometheus.client.Metric.untyped) |
| return untyped_ != NULL ? *untyped_ : *default_instance_->untyped_; |
| } |
| ::io::prometheus::client::Untyped* Metric::mutable_untyped() { |
| |
| if (untyped_ == NULL) { |
| untyped_ = new ::io::prometheus::client::Untyped; |
| } |
| // @@protoc_insertion_point(field_mutable:io.prometheus.client.Metric.untyped) |
| return untyped_; |
| } |
| ::io::prometheus::client::Untyped* Metric::release_untyped() { |
| // @@protoc_insertion_point(field_release:io.prometheus.client.Metric.untyped) |
| |
| ::io::prometheus::client::Untyped* temp = untyped_; |
| untyped_ = NULL; |
| return temp; |
| } |
| void Metric::set_allocated_untyped(::io::prometheus::client::Untyped* untyped) { |
| delete untyped_; |
| untyped_ = untyped; |
| if (untyped) { |
| |
| } else { |
| |
| } |
| // @@protoc_insertion_point(field_set_allocated:io.prometheus.client.Metric.untyped) |
| } |
| |
| // optional .io.prometheus.client.Histogram histogram = 7; |
| bool Metric::has_histogram() const { |
| return !_is_default_instance_ && histogram_ != NULL; |
| } |
| void Metric::clear_histogram() { |
| if (GetArenaNoVirtual() == NULL && histogram_ != NULL) delete histogram_; |
| histogram_ = NULL; |
| } |
| const ::io::prometheus::client::Histogram& Metric::histogram() const { |
| // @@protoc_insertion_point(field_get:io.prometheus.client.Metric.histogram) |
| return histogram_ != NULL ? *histogram_ : *default_instance_->histogram_; |
| } |
| ::io::prometheus::client::Histogram* Metric::mutable_histogram() { |
| |
| if (histogram_ == NULL) { |
| histogram_ = new ::io::prometheus::client::Histogram; |
| } |
| // @@protoc_insertion_point(field_mutable:io.prometheus.client.Metric.histogram) |
| return histogram_; |
| } |
| ::io::prometheus::client::Histogram* Metric::release_histogram() { |
| // @@protoc_insertion_point(field_release:io.prometheus.client.Metric.histogram) |
| |
| ::io::prometheus::client::Histogram* temp = histogram_; |
| histogram_ = NULL; |
| return temp; |
| } |
| void Metric::set_allocated_histogram(::io::prometheus::client::Histogram* histogram) { |
| delete histogram_; |
| histogram_ = histogram; |
| if (histogram) { |
| |
| } else { |
| |
| } |
| // @@protoc_insertion_point(field_set_allocated:io.prometheus.client.Metric.histogram) |
| } |
| |
| // optional int64 timestamp_ms = 6; |
| void Metric::clear_timestamp_ms() { |
| timestamp_ms_ = GOOGLE_LONGLONG(0); |
| } |
| ::google::protobuf::int64 Metric::timestamp_ms() const { |
| // @@protoc_insertion_point(field_get:io.prometheus.client.Metric.timestamp_ms) |
| return timestamp_ms_; |
| } |
| void Metric::set_timestamp_ms(::google::protobuf::int64 value) { |
| |
| timestamp_ms_ = value; |
| // @@protoc_insertion_point(field_set:io.prometheus.client.Metric.timestamp_ms) |
| } |
| |
| #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
| |
| // =================================================================== |
| |
| #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| const int MetricFamily::kNameFieldNumber; |
| const int MetricFamily::kHelpFieldNumber; |
| const int MetricFamily::kTypeFieldNumber; |
| const int MetricFamily::kMetricFieldNumber; |
| #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| |
| MetricFamily::MetricFamily() |
| : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:io.prometheus.client.MetricFamily) |
| } |
| |
| void MetricFamily::InitAsDefaultInstance() { |
| _is_default_instance_ = true; |
| } |
| |
| MetricFamily::MetricFamily(const MetricFamily& from) |
| : ::google::protobuf::Message(), |
| _internal_metadata_(NULL) { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:io.prometheus.client.MetricFamily) |
| } |
| |
| void MetricFamily::SharedCtor() { |
| _is_default_instance_ = false; |
| ::google::protobuf::internal::GetEmptyString(); |
| _cached_size_ = 0; |
| name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| help_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| type_ = 0; |
| } |
| |
| MetricFamily::~MetricFamily() { |
| // @@protoc_insertion_point(destructor:io.prometheus.client.MetricFamily) |
| SharedDtor(); |
| } |
| |
| void MetricFamily::SharedDtor() { |
| name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| help_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| if (this != default_instance_) { |
| } |
| } |
| |
| void MetricFamily::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const ::google::protobuf::Descriptor* MetricFamily::descriptor() { |
| protobuf_AssignDescriptorsOnce(); |
| return MetricFamily_descriptor_; |
| } |
| |
| const MetricFamily& MetricFamily::default_instance() { |
| if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto(); |
| return *default_instance_; |
| } |
| |
| MetricFamily* MetricFamily::default_instance_ = NULL; |
| |
| MetricFamily* MetricFamily::New(::google::protobuf::Arena* arena) const { |
| MetricFamily* n = new MetricFamily; |
| if (arena != NULL) { |
| arena->Own(n); |
| } |
| return n; |
| } |
| |
| void MetricFamily::Clear() { |
| // @@protoc_insertion_point(message_clear_start:io.prometheus.client.MetricFamily) |
| name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| help_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| type_ = 0; |
| metric_.Clear(); |
| } |
| |
| bool MetricFamily::MergePartialFromCodedStream( |
| ::google::protobuf::io::CodedInputStream* input) { |
| #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
| ::google::protobuf::uint32 tag; |
| // @@protoc_insertion_point(parse_start:io.prometheus.client.MetricFamily) |
| for (;;) { |
| ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| tag = p.first; |
| if (!p.second) goto handle_unusual; |
| switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| // optional string name = 1; |
| case 1: { |
| if (tag == 10) { |
| DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| input, this->mutable_name())); |
| DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| this->name().data(), this->name().length(), |
| ::google::protobuf::internal::WireFormatLite::PARSE, |
| "io.prometheus.client.MetricFamily.name")); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(18)) goto parse_help; |
| break; |
| } |
| |
| // optional string help = 2; |
| case 2: { |
| if (tag == 18) { |
| parse_help: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| input, this->mutable_help())); |
| DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| this->help().data(), this->help().length(), |
| ::google::protobuf::internal::WireFormatLite::PARSE, |
| "io.prometheus.client.MetricFamily.help")); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(24)) goto parse_type; |
| break; |
| } |
| |
| // optional .io.prometheus.client.MetricType type = 3; |
| case 3: { |
| if (tag == 24) { |
| parse_type: |
| int value; |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| input, &value))); |
| set_type(static_cast< ::io::prometheus::client::MetricType >(value)); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(34)) goto parse_metric; |
| break; |
| } |
| |
| // repeated .io.prometheus.client.Metric metric = 4; |
| case 4: { |
| if (tag == 34) { |
| parse_metric: |
| DO_(input->IncrementRecursionDepth()); |
| parse_loop_metric: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
| input, add_metric())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(34)) goto parse_loop_metric; |
| input->UnsafeDecrementRecursionDepth(); |
| if (input->ExpectAtEnd()) goto success; |
| break; |
| } |
| |
| default: { |
| handle_unusual: |
| if (tag == 0 || |
| ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
| goto success; |
| } |
| DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); |
| break; |
| } |
| } |
| } |
| success: |
| // @@protoc_insertion_point(parse_success:io.prometheus.client.MetricFamily) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:io.prometheus.client.MetricFamily) |
| return false; |
| #undef DO_ |
| } |
| |
| void MetricFamily::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:io.prometheus.client.MetricFamily) |
| // optional string name = 1; |
| if (this->name().size() > 0) { |
| ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| this->name().data(), this->name().length(), |
| ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| "io.prometheus.client.MetricFamily.name"); |
| ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 1, this->name(), output); |
| } |
| |
| // optional string help = 2; |
| if (this->help().size() > 0) { |
| ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| this->help().data(), this->help().length(), |
| ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| "io.prometheus.client.MetricFamily.help"); |
| ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 2, this->help(), output); |
| } |
| |
| // optional .io.prometheus.client.MetricType type = 3; |
| if (this->type() != 0) { |
| ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 3, this->type(), output); |
| } |
| |
| // repeated .io.prometheus.client.Metric metric = 4; |
| for (unsigned int i = 0, n = this->metric_size(); i < n; i++) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 4, this->metric(i), output); |
| } |
| |
| // @@protoc_insertion_point(serialize_end:io.prometheus.client.MetricFamily) |
| } |
| |
| ::google::protobuf::uint8* MetricFamily::InternalSerializeWithCachedSizesToArray( |
| bool deterministic, ::google::protobuf::uint8* target) const { |
| // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.MetricFamily) |
| // optional string name = 1; |
| if (this->name().size() > 0) { |
| ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| this->name().data(), this->name().length(), |
| ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| "io.prometheus.client.MetricFamily.name"); |
| target = |
| ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 1, this->name(), target); |
| } |
| |
| // optional string help = 2; |
| if (this->help().size() > 0) { |
| ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| this->help().data(), this->help().length(), |
| ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| "io.prometheus.client.MetricFamily.help"); |
| target = |
| ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 2, this->help(), target); |
| } |
| |
| // optional .io.prometheus.client.MetricType type = 3; |
| if (this->type() != 0) { |
| target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 3, this->type(), target); |
| } |
| |
| // repeated .io.prometheus.client.Metric metric = 4; |
| for (unsigned int i = 0, n = this->metric_size(); i < n; i++) { |
| target = ::google::protobuf::internal::WireFormatLite:: |
| InternalWriteMessageNoVirtualToArray( |
| 4, this->metric(i), false, target); |
| } |
| |
| // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.MetricFamily) |
| return target; |
| } |
| |
| int MetricFamily::ByteSize() const { |
| // @@protoc_insertion_point(message_byte_size_start:io.prometheus.client.MetricFamily) |
| int total_size = 0; |
| |
| // optional string name = 1; |
| if (this->name().size() > 0) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::StringSize( |
| this->name()); |
| } |
| |
| // optional string help = 2; |
| if (this->help().size() > 0) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::StringSize( |
| this->help()); |
| } |
| |
| // optional .io.prometheus.client.MetricType type = 3; |
| if (this->type() != 0) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); |
| } |
| |
| // repeated .io.prometheus.client.Metric metric = 4; |
| total_size += 1 * this->metric_size(); |
| for (int i = 0; i < this->metric_size(); i++) { |
| total_size += |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->metric(i)); |
| } |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void MetricFamily::MergeFrom(const ::google::protobuf::Message& from) { |
| // @@protoc_insertion_point(generalized_merge_from_start:io.prometheus.client.MetricFamily) |
| if (GOOGLE_PREDICT_FALSE(&from == this)) { |
| ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); |
| } |
| const MetricFamily* source = |
| ::google::protobuf::internal::DynamicCastToGenerated<const MetricFamily>( |
| &from); |
| if (source == NULL) { |
| // @@protoc_insertion_point(generalized_merge_from_cast_fail:io.prometheus.client.MetricFamily) |
| ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| } else { |
| // @@protoc_insertion_point(generalized_merge_from_cast_success:io.prometheus.client.MetricFamily) |
| MergeFrom(*source); |
| } |
| } |
| |
| void MetricFamily::MergeFrom(const MetricFamily& from) { |
| // @@protoc_insertion_point(class_specific_merge_from_start:io.prometheus.client.MetricFamily) |
| if (GOOGLE_PREDICT_FALSE(&from == this)) { |
| ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); |
| } |
| metric_.MergeFrom(from.metric_); |
| if (from.name().size() > 0) { |
| |
| name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); |
| } |
| if (from.help().size() > 0) { |
| |
| help_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.help_); |
| } |
| if (from.type() != 0) { |
| set_type(from.type()); |
| } |
| } |
| |
| void MetricFamily::CopyFrom(const ::google::protobuf::Message& from) { |
| // @@protoc_insertion_point(generalized_copy_from_start:io.prometheus.client.MetricFamily) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| void MetricFamily::CopyFrom(const MetricFamily& from) { |
| // @@protoc_insertion_point(class_specific_copy_from_start:io.prometheus.client.MetricFamily) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool MetricFamily::IsInitialized() const { |
| |
| return true; |
| } |
| |
| void MetricFamily::Swap(MetricFamily* other) { |
| if (other == this) return; |
| InternalSwap(other); |
| } |
| void MetricFamily::InternalSwap(MetricFamily* other) { |
| name_.Swap(&other->name_); |
| help_.Swap(&other->help_); |
| std::swap(type_, other->type_); |
| metric_.UnsafeArenaSwap(&other->metric_); |
| _internal_metadata_.Swap(&other->_internal_metadata_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| |
| ::google::protobuf::Metadata MetricFamily::GetMetadata() const { |
| protobuf_AssignDescriptorsOnce(); |
| ::google::protobuf::Metadata metadata; |
| metadata.descriptor = MetricFamily_descriptor_; |
| metadata.reflection = MetricFamily_reflection_; |
| return metadata; |
| } |
| |
| #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| // MetricFamily |
| |
| // optional string name = 1; |
| void MetricFamily::clear_name() { |
| name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| } |
| const ::std::string& MetricFamily::name() const { |
| // @@protoc_insertion_point(field_get:io.prometheus.client.MetricFamily.name) |
| return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| } |
| void MetricFamily::set_name(const ::std::string& value) { |
| |
| name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| // @@protoc_insertion_point(field_set:io.prometheus.client.MetricFamily.name) |
| } |
| void MetricFamily::set_name(const char* value) { |
| |
| name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| // @@protoc_insertion_point(field_set_char:io.prometheus.client.MetricFamily.name) |
| } |
| void MetricFamily::set_name(const char* value, size_t size) { |
| |
| name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| ::std::string(reinterpret_cast<const char*>(value), size)); |
| // @@protoc_insertion_point(field_set_pointer:io.prometheus.client.MetricFamily.name) |
| } |
| ::std::string* MetricFamily::mutable_name() { |
| |
| // @@protoc_insertion_point(field_mutable:io.prometheus.client.MetricFamily.name) |
| return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| } |
| ::std::string* MetricFamily::release_name() { |
| // @@protoc_insertion_point(field_release:io.prometheus.client.MetricFamily.name) |
| |
| return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| } |
| void MetricFamily::set_allocated_name(::std::string* name) { |
| if (name != NULL) { |
| |
| } else { |
| |
| } |
| name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); |
| // @@protoc_insertion_point(field_set_allocated:io.prometheus.client.MetricFamily.name) |
| } |
| |
| // optional string help = 2; |
| void MetricFamily::clear_help() { |
| help_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| } |
| const ::std::string& MetricFamily::help() const { |
| // @@protoc_insertion_point(field_get:io.prometheus.client.MetricFamily.help) |
| return help_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| } |
| void MetricFamily::set_help(const ::std::string& value) { |
| |
| help_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| // @@protoc_insertion_point(field_set:io.prometheus.client.MetricFamily.help) |
| } |
| void MetricFamily::set_help(const char* value) { |
| |
| help_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| // @@protoc_insertion_point(field_set_char:io.prometheus.client.MetricFamily.help) |
| } |
| void MetricFamily::set_help(const char* value, size_t size) { |
| |
| help_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| ::std::string(reinterpret_cast<const char*>(value), size)); |
| // @@protoc_insertion_point(field_set_pointer:io.prometheus.client.MetricFamily.help) |
| } |
| ::std::string* MetricFamily::mutable_help() { |
| |
| // @@protoc_insertion_point(field_mutable:io.prometheus.client.MetricFamily.help) |
| return help_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| } |
| ::std::string* MetricFamily::release_help() { |
| // @@protoc_insertion_point(field_release:io.prometheus.client.MetricFamily.help) |
| |
| return help_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| } |
| void MetricFamily::set_allocated_help(::std::string* help) { |
| if (help != NULL) { |
| |
| } else { |
| |
| } |
| help_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), help); |
| // @@protoc_insertion_point(field_set_allocated:io.prometheus.client.MetricFamily.help) |
| } |
| |
| // optional .io.prometheus.client.MetricType type = 3; |
| void MetricFamily::clear_type() { |
| type_ = 0; |
| } |
| ::io::prometheus::client::MetricType MetricFamily::type() const { |
| // @@protoc_insertion_point(field_get:io.prometheus.client.MetricFamily.type) |
| return static_cast< ::io::prometheus::client::MetricType >(type_); |
| } |
| void MetricFamily::set_type(::io::prometheus::client::MetricType value) { |
| |
| type_ = value; |
| // @@protoc_insertion_point(field_set:io.prometheus.client.MetricFamily.type) |
| } |
| |
| // repeated .io.prometheus.client.Metric metric = 4; |
| int MetricFamily::metric_size() const { |
| return metric_.size(); |
| } |
| void MetricFamily::clear_metric() { |
| metric_.Clear(); |
| } |
| const ::io::prometheus::client::Metric& MetricFamily::metric(int index) const { |
| // @@protoc_insertion_point(field_get:io.prometheus.client.MetricFamily.metric) |
| return metric_.Get(index); |
| } |
| ::io::prometheus::client::Metric* MetricFamily::mutable_metric(int index) { |
| // @@protoc_insertion_point(field_mutable:io.prometheus.client.MetricFamily.metric) |
| return metric_.Mutable(index); |
| } |
| ::io::prometheus::client::Metric* MetricFamily::add_metric() { |
| // @@protoc_insertion_point(field_add:io.prometheus.client.MetricFamily.metric) |
| return metric_.Add(); |
| } |
| ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Metric >* |
| MetricFamily::mutable_metric() { |
| // @@protoc_insertion_point(field_mutable_list:io.prometheus.client.MetricFamily.metric) |
| return &metric_; |
| } |
| const ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Metric >& |
| MetricFamily::metric() const { |
| // @@protoc_insertion_point(field_list:io.prometheus.client.MetricFamily.metric) |
| return metric_; |
| } |
| |
| #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
| |
| // @@protoc_insertion_point(namespace_scope) |
| |
| } // namespace client |
| } // namespace prometheus |
| } // namespace io |
| |
| // @@protoc_insertion_point(global_scope) |