summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/prometheus/client_model/cpp/metrics.pb.cc
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/prometheus/client_model/cpp/metrics.pb.cc')
-rw-r--r--vendor/github.com/prometheus/client_model/cpp/metrics.pb.cc3380
1 files changed, 0 insertions, 3380 deletions
diff --git a/vendor/github.com/prometheus/client_model/cpp/metrics.pb.cc b/vendor/github.com/prometheus/client_model/cpp/metrics.pb.cc
deleted file mode 100644
index 1ff893b83..000000000
--- a/vendor/github.com/prometheus/client_model/cpp/metrics.pb.cc
+++ /dev/null
@@ -1,3380 +0,0 @@
-// 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/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() {
- 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_ =
- new ::google::protobuf::internal::GeneratedMessageReflection(
- LabelPair_descriptor_,
- LabelPair::default_instance_,
- LabelPair_offsets_,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LabelPair, _has_bits_[0]),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LabelPair, _unknown_fields_),
- -1,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory(),
- sizeof(LabelPair));
- Gauge_descriptor_ = file->message_type(1);
- static const int Gauge_offsets_[1] = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Gauge, value_),
- };
- Gauge_reflection_ =
- new ::google::protobuf::internal::GeneratedMessageReflection(
- Gauge_descriptor_,
- Gauge::default_instance_,
- Gauge_offsets_,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Gauge, _has_bits_[0]),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Gauge, _unknown_fields_),
- -1,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory(),
- sizeof(Gauge));
- Counter_descriptor_ = file->message_type(2);
- static const int Counter_offsets_[1] = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Counter, value_),
- };
- Counter_reflection_ =
- new ::google::protobuf::internal::GeneratedMessageReflection(
- Counter_descriptor_,
- Counter::default_instance_,
- Counter_offsets_,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Counter, _has_bits_[0]),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Counter, _unknown_fields_),
- -1,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory(),
- sizeof(Counter));
- 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_ =
- new ::google::protobuf::internal::GeneratedMessageReflection(
- Quantile_descriptor_,
- Quantile::default_instance_,
- Quantile_offsets_,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Quantile, _has_bits_[0]),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Quantile, _unknown_fields_),
- -1,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory(),
- sizeof(Quantile));
- 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_ =
- new ::google::protobuf::internal::GeneratedMessageReflection(
- Summary_descriptor_,
- Summary::default_instance_,
- Summary_offsets_,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Summary, _has_bits_[0]),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Summary, _unknown_fields_),
- -1,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory(),
- sizeof(Summary));
- Untyped_descriptor_ = file->message_type(5);
- static const int Untyped_offsets_[1] = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Untyped, value_),
- };
- Untyped_reflection_ =
- new ::google::protobuf::internal::GeneratedMessageReflection(
- Untyped_descriptor_,
- Untyped::default_instance_,
- Untyped_offsets_,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Untyped, _has_bits_[0]),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Untyped, _unknown_fields_),
- -1,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory(),
- sizeof(Untyped));
- 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_ =
- new ::google::protobuf::internal::GeneratedMessageReflection(
- Histogram_descriptor_,
- Histogram::default_instance_,
- Histogram_offsets_,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Histogram, _has_bits_[0]),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Histogram, _unknown_fields_),
- -1,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory(),
- sizeof(Histogram));
- 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_ =
- new ::google::protobuf::internal::GeneratedMessageReflection(
- Bucket_descriptor_,
- Bucket::default_instance_,
- Bucket_offsets_,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Bucket, _has_bits_[0]),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Bucket, _unknown_fields_),
- -1,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory(),
- sizeof(Bucket));
- 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_ =
- new ::google::protobuf::internal::GeneratedMessageReflection(
- Metric_descriptor_,
- Metric::default_instance_,
- Metric_offsets_,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, _has_bits_[0]),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, _unknown_fields_),
- -1,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory(),
- sizeof(Metric));
- 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_ =
- new ::google::protobuf::internal::GeneratedMessageReflection(
- MetricFamily_descriptor_,
- MetricFamily::default_instance_,
- MetricFamily_offsets_,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MetricFamily, _has_bits_[0]),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MetricFamily, _unknown_fields_),
- -1,
- ::google::protobuf::DescriptorPool::generated_pool(),
- ::google::protobuf::MessageFactory::generated_factory(),
- sizeof(MetricFamily));
- 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&) {
- 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() {
- 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.client", 1024);
- ::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;
- }
-}
-
-
-// ===================================================================
-
-#ifndef _MSC_VER
-const int LabelPair::kNameFieldNumber;
-const int LabelPair::kValueFieldNumber;
-#endif // !_MSC_VER
-
-LabelPair::LabelPair()
- : ::google::protobuf::Message() {
- SharedCtor();
- // @@protoc_insertion_point(constructor:io.prometheus.client.LabelPair)
-}
-
-void LabelPair::InitAsDefaultInstance() {
-}
-
-LabelPair::LabelPair(const LabelPair& from)
- : ::google::protobuf::Message() {
- SharedCtor();
- MergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:io.prometheus.client.LabelPair)
-}
-
-void LabelPair::SharedCtor() {
- ::google::protobuf::internal::GetEmptyString();
- _cached_size_ = 0;
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-LabelPair::~LabelPair() {
- // @@protoc_insertion_point(destructor:io.prometheus.client.LabelPair)
- SharedDtor();
-}
-
-void LabelPair::SharedDtor() {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete name_;
- }
- if (value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete value_;
- }
- 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() const {
- return new LabelPair;
-}
-
-void LabelPair::Clear() {
- if (_has_bits_[0 / 32] & 3) {
- if (has_name()) {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_->clear();
- }
- }
- if (has_value()) {
- if (value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- value_->clear();
- }
- }
- }
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
- mutable_unknown_fields()->Clear();
-}
-
-bool LabelPair::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!(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()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->name().data(), this->name().length(),
- ::google::protobuf::internal::WireFormat::PARSE,
- "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()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->value().data(), this->value().length(),
- ::google::protobuf::internal::WireFormat::PARSE,
- "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::WireFormat::SkipField(
- input, tag, mutable_unknown_fields()));
- 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 (has_name()) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->name().data(), this->name().length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "name");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->name(), output);
- }
-
- // optional string value = 2;
- if (has_value()) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->value().data(), this->value().length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "value");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 2, this->value(), output);
- }
-
- if (!unknown_fields().empty()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:io.prometheus.client.LabelPair)
-}
-
-::google::protobuf::uint8* LabelPair::SerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.LabelPair)
- // optional string name = 1;
- if (has_name()) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->name().data(), this->name().length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "name");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->name(), target);
- }
-
- // optional string value = 2;
- if (has_value()) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->value().data(), this->value().length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "value");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 2, this->value(), target);
- }
-
- if (!unknown_fields().empty()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.LabelPair)
- return target;
-}
-
-int LabelPair::ByteSize() const {
- int total_size = 0;
-
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- // optional string name = 1;
- if (has_name()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->name());
- }
-
- // optional string value = 2;
- if (has_value()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->value());
- }
-
- }
- if (!unknown_fields().empty()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- unknown_fields());
- }
- 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) {
- GOOGLE_CHECK_NE(&from, this);
- const LabelPair* source =
- ::google::protobuf::internal::dynamic_cast_if_available<const LabelPair*>(
- &from);
- if (source == NULL) {
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- MergeFrom(*source);
- }
-}
-
-void LabelPair::MergeFrom(const LabelPair& from) {
- GOOGLE_CHECK_NE(&from, this);
- if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (from.has_name()) {
- set_name(from.name());
- }
- if (from.has_value()) {
- set_value(from.value());
- }
- }
- mutable_unknown_fields()->MergeFrom(from.unknown_fields());
-}
-
-void LabelPair::CopyFrom(const ::google::protobuf::Message& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void LabelPair::CopyFrom(const LabelPair& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool LabelPair::IsInitialized() const {
-
- return true;
-}
-
-void LabelPair::Swap(LabelPair* other) {
- if (other != this) {
- std::swap(name_, other->name_);
- std::swap(value_, other->value_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _unknown_fields_.Swap(&other->_unknown_fields_);
- 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;
-}
-
-
-// ===================================================================
-
-#ifndef _MSC_VER
-const int Gauge::kValueFieldNumber;
-#endif // !_MSC_VER
-
-Gauge::Gauge()
- : ::google::protobuf::Message() {
- SharedCtor();
- // @@protoc_insertion_point(constructor:io.prometheus.client.Gauge)
-}
-
-void Gauge::InitAsDefaultInstance() {
-}
-
-Gauge::Gauge(const Gauge& from)
- : ::google::protobuf::Message() {
- SharedCtor();
- MergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Gauge)
-}
-
-void Gauge::SharedCtor() {
- _cached_size_ = 0;
- value_ = 0;
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-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() const {
- return new Gauge;
-}
-
-void Gauge::Clear() {
- value_ = 0;
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
- mutable_unknown_fields()->Clear();
-}
-
-bool Gauge::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!(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_)));
- set_has_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::WireFormat::SkipField(
- input, tag, mutable_unknown_fields()));
- 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 (has_value()) {
- ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->value(), output);
- }
-
- if (!unknown_fields().empty()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:io.prometheus.client.Gauge)
-}
-
-::google::protobuf::uint8* Gauge::SerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Gauge)
- // optional double value = 1;
- if (has_value()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->value(), target);
- }
-
- if (!unknown_fields().empty()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Gauge)
- return target;
-}
-
-int Gauge::ByteSize() const {
- int total_size = 0;
-
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- // optional double value = 1;
- if (has_value()) {
- total_size += 1 + 8;
- }
-
- }
- if (!unknown_fields().empty()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- unknown_fields());
- }
- 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) {
- GOOGLE_CHECK_NE(&from, this);
- const Gauge* source =
- ::google::protobuf::internal::dynamic_cast_if_available<const Gauge*>(
- &from);
- if (source == NULL) {
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- MergeFrom(*source);
- }
-}
-
-void Gauge::MergeFrom(const Gauge& from) {
- GOOGLE_CHECK_NE(&from, this);
- if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (from.has_value()) {
- set_value(from.value());
- }
- }
- mutable_unknown_fields()->MergeFrom(from.unknown_fields());
-}
-
-void Gauge::CopyFrom(const ::google::protobuf::Message& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void Gauge::CopyFrom(const Gauge& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool Gauge::IsInitialized() const {
-
- return true;
-}
-
-void Gauge::Swap(Gauge* other) {
- if (other != this) {
- std::swap(value_, other->value_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _unknown_fields_.Swap(&other->_unknown_fields_);
- 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;
-}
-
-
-// ===================================================================
-
-#ifndef _MSC_VER
-const int Counter::kValueFieldNumber;
-#endif // !_MSC_VER
-
-Counter::Counter()
- : ::google::protobuf::Message() {
- SharedCtor();
- // @@protoc_insertion_point(constructor:io.prometheus.client.Counter)
-}
-
-void Counter::InitAsDefaultInstance() {
-}
-
-Counter::Counter(const Counter& from)
- : ::google::protobuf::Message() {
- SharedCtor();
- MergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Counter)
-}
-
-void Counter::SharedCtor() {
- _cached_size_ = 0;
- value_ = 0;
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-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() const {
- return new Counter;
-}
-
-void Counter::Clear() {
- value_ = 0;
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
- mutable_unknown_fields()->Clear();
-}
-
-bool Counter::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!(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_)));
- set_has_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::WireFormat::SkipField(
- input, tag, mutable_unknown_fields()));
- 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 (has_value()) {
- ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->value(), output);
- }
-
- if (!unknown_fields().empty()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:io.prometheus.client.Counter)
-}
-
-::google::protobuf::uint8* Counter::SerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Counter)
- // optional double value = 1;
- if (has_value()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->value(), target);
- }
-
- if (!unknown_fields().empty()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Counter)
- return target;
-}
-
-int Counter::ByteSize() const {
- int total_size = 0;
-
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- // optional double value = 1;
- if (has_value()) {
- total_size += 1 + 8;
- }
-
- }
- if (!unknown_fields().empty()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- unknown_fields());
- }
- 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) {
- GOOGLE_CHECK_NE(&from, this);
- const Counter* source =
- ::google::protobuf::internal::dynamic_cast_if_available<const Counter*>(
- &from);
- if (source == NULL) {
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- MergeFrom(*source);
- }
-}
-
-void Counter::MergeFrom(const Counter& from) {
- GOOGLE_CHECK_NE(&from, this);
- if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (from.has_value()) {
- set_value(from.value());
- }
- }
- mutable_unknown_fields()->MergeFrom(from.unknown_fields());
-}
-
-void Counter::CopyFrom(const ::google::protobuf::Message& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void Counter::CopyFrom(const Counter& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool Counter::IsInitialized() const {
-
- return true;
-}
-
-void Counter::Swap(Counter* other) {
- if (other != this) {
- std::swap(value_, other->value_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _unknown_fields_.Swap(&other->_unknown_fields_);
- 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;
-}
-
-
-// ===================================================================
-
-#ifndef _MSC_VER
-const int Quantile::kQuantileFieldNumber;
-const int Quantile::kValueFieldNumber;
-#endif // !_MSC_VER
-
-Quantile::Quantile()
- : ::google::protobuf::Message() {
- SharedCtor();
- // @@protoc_insertion_point(constructor:io.prometheus.client.Quantile)
-}
-
-void Quantile::InitAsDefaultInstance() {
-}
-
-Quantile::Quantile(const Quantile& from)
- : ::google::protobuf::Message() {
- SharedCtor();
- MergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Quantile)
-}
-
-void Quantile::SharedCtor() {
- _cached_size_ = 0;
- quantile_ = 0;
- value_ = 0;
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-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() const {
- return new Quantile;
-}
-
-void Quantile::Clear() {
-#define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \
- &reinterpret_cast<Quantile*>(16)->f) - \
- reinterpret_cast<char*>(16))
-
-#define ZR_(first, last) do { \
- size_t f = OFFSET_OF_FIELD_(first); \
- size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \
- ::memset(&first, 0, n); \
- } while (0)
-
- ZR_(quantile_, value_);
-
-#undef OFFSET_OF_FIELD_
-#undef ZR_
-
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
- mutable_unknown_fields()->Clear();
-}
-
-bool Quantile::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!(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_)));
- set_has_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_)));
- set_has_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::WireFormat::SkipField(
- input, tag, mutable_unknown_fields()));
- 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 (has_quantile()) {
- ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->quantile(), output);
- }
-
- // optional double value = 2;
- if (has_value()) {
- ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->value(), output);
- }
-
- if (!unknown_fields().empty()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:io.prometheus.client.Quantile)
-}
-
-::google::protobuf::uint8* Quantile::SerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Quantile)
- // optional double quantile = 1;
- if (has_quantile()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->quantile(), target);
- }
-
- // optional double value = 2;
- if (has_value()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->value(), target);
- }
-
- if (!unknown_fields().empty()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Quantile)
- return target;
-}
-
-int Quantile::ByteSize() const {
- int total_size = 0;
-
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- // optional double quantile = 1;
- if (has_quantile()) {
- total_size += 1 + 8;
- }
-
- // optional double value = 2;
- if (has_value()) {
- total_size += 1 + 8;
- }
-
- }
- if (!unknown_fields().empty()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- unknown_fields());
- }
- 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) {
- GOOGLE_CHECK_NE(&from, this);
- const Quantile* source =
- ::google::protobuf::internal::dynamic_cast_if_available<const Quantile*>(
- &from);
- if (source == NULL) {
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- MergeFrom(*source);
- }
-}
-
-void Quantile::MergeFrom(const Quantile& from) {
- GOOGLE_CHECK_NE(&from, this);
- if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (from.has_quantile()) {
- set_quantile(from.quantile());
- }
- if (from.has_value()) {
- set_value(from.value());
- }
- }
- mutable_unknown_fields()->MergeFrom(from.unknown_fields());
-}
-
-void Quantile::CopyFrom(const ::google::protobuf::Message& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void Quantile::CopyFrom(const Quantile& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool Quantile::IsInitialized() const {
-
- return true;
-}
-
-void Quantile::Swap(Quantile* other) {
- if (other != this) {
- std::swap(quantile_, other->quantile_);
- std::swap(value_, other->value_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _unknown_fields_.Swap(&other->_unknown_fields_);
- 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;
-}
-
-
-// ===================================================================
-
-#ifndef _MSC_VER
-const int Summary::kSampleCountFieldNumber;
-const int Summary::kSampleSumFieldNumber;
-const int Summary::kQuantileFieldNumber;
-#endif // !_MSC_VER
-
-Summary::Summary()
- : ::google::protobuf::Message() {
- SharedCtor();
- // @@protoc_insertion_point(constructor:io.prometheus.client.Summary)
-}
-
-void Summary::InitAsDefaultInstance() {
-}
-
-Summary::Summary(const Summary& from)
- : ::google::protobuf::Message() {
- SharedCtor();
- MergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Summary)
-}
-
-void Summary::SharedCtor() {
- _cached_size_ = 0;
- sample_count_ = GOOGLE_ULONGLONG(0);
- sample_sum_ = 0;
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-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() const {
- return new Summary;
-}
-
-void Summary::Clear() {
-#define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \
- &reinterpret_cast<Summary*>(16)->f) - \
- reinterpret_cast<char*>(16))
-
-#define ZR_(first, last) do { \
- size_t f = OFFSET_OF_FIELD_(first); \
- size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \
- ::memset(&first, 0, n); \
- } while (0)
-
- ZR_(sample_count_, sample_sum_);
-
-#undef OFFSET_OF_FIELD_
-#undef ZR_
-
- quantile_.Clear();
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
- mutable_unknown_fields()->Clear();
-}
-
-bool Summary::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!(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_)));
- set_has_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_)));
- set_has_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_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, add_quantile()));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(26)) goto parse_quantile;
- 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::WireFormat::SkipField(
- input, tag, mutable_unknown_fields()));
- 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 (has_sample_count()) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->sample_count(), output);
- }
-
- // optional double sample_sum = 2;
- if (has_sample_sum()) {
- ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->sample_sum(), output);
- }
-
- // repeated .io.prometheus.client.Quantile quantile = 3;
- for (int i = 0; i < this->quantile_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 3, this->quantile(i), output);
- }
-
- if (!unknown_fields().empty()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:io.prometheus.client.Summary)
-}
-
-::google::protobuf::uint8* Summary::SerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Summary)
- // optional uint64 sample_count = 1;
- if (has_sample_count()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->sample_count(), target);
- }
-
- // optional double sample_sum = 2;
- if (has_sample_sum()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->sample_sum(), target);
- }
-
- // repeated .io.prometheus.client.Quantile quantile = 3;
- for (int i = 0; i < this->quantile_size(); i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteMessageNoVirtualToArray(
- 3, this->quantile(i), target);
- }
-
- if (!unknown_fields().empty()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Summary)
- return target;
-}
-
-int Summary::ByteSize() const {
- int total_size = 0;
-
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- // optional uint64 sample_count = 1;
- if (has_sample_count()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::UInt64Size(
- this->sample_count());
- }
-
- // optional double sample_sum = 2;
- if (has_sample_sum()) {
- 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));
- }
-
- if (!unknown_fields().empty()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- unknown_fields());
- }
- 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) {
- GOOGLE_CHECK_NE(&from, this);
- const Summary* source =
- ::google::protobuf::internal::dynamic_cast_if_available<const Summary*>(
- &from);
- if (source == NULL) {
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- MergeFrom(*source);
- }
-}
-
-void Summary::MergeFrom(const Summary& from) {
- GOOGLE_CHECK_NE(&from, this);
- quantile_.MergeFrom(from.quantile_);
- if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (from.has_sample_count()) {
- set_sample_count(from.sample_count());
- }
- if (from.has_sample_sum()) {
- set_sample_sum(from.sample_sum());
- }
- }
- mutable_unknown_fields()->MergeFrom(from.unknown_fields());
-}
-
-void Summary::CopyFrom(const ::google::protobuf::Message& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void Summary::CopyFrom(const Summary& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool Summary::IsInitialized() const {
-
- return true;
-}
-
-void Summary::Swap(Summary* other) {
- if (other != this) {
- std::swap(sample_count_, other->sample_count_);
- std::swap(sample_sum_, other->sample_sum_);
- quantile_.Swap(&other->quantile_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _unknown_fields_.Swap(&other->_unknown_fields_);
- 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;
-}
-
-
-// ===================================================================
-
-#ifndef _MSC_VER
-const int Untyped::kValueFieldNumber;
-#endif // !_MSC_VER
-
-Untyped::Untyped()
- : ::google::protobuf::Message() {
- SharedCtor();
- // @@protoc_insertion_point(constructor:io.prometheus.client.Untyped)
-}
-
-void Untyped::InitAsDefaultInstance() {
-}
-
-Untyped::Untyped(const Untyped& from)
- : ::google::protobuf::Message() {
- SharedCtor();
- MergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Untyped)
-}
-
-void Untyped::SharedCtor() {
- _cached_size_ = 0;
- value_ = 0;
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-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() const {
- return new Untyped;
-}
-
-void Untyped::Clear() {
- value_ = 0;
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
- mutable_unknown_fields()->Clear();
-}
-
-bool Untyped::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!(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_)));
- set_has_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::WireFormat::SkipField(
- input, tag, mutable_unknown_fields()));
- 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 (has_value()) {
- ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->value(), output);
- }
-
- if (!unknown_fields().empty()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:io.prometheus.client.Untyped)
-}
-
-::google::protobuf::uint8* Untyped::SerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Untyped)
- // optional double value = 1;
- if (has_value()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->value(), target);
- }
-
- if (!unknown_fields().empty()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Untyped)
- return target;
-}
-
-int Untyped::ByteSize() const {
- int total_size = 0;
-
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- // optional double value = 1;
- if (has_value()) {
- total_size += 1 + 8;
- }
-
- }
- if (!unknown_fields().empty()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- unknown_fields());
- }
- 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) {
- GOOGLE_CHECK_NE(&from, this);
- const Untyped* source =
- ::google::protobuf::internal::dynamic_cast_if_available<const Untyped*>(
- &from);
- if (source == NULL) {
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- MergeFrom(*source);
- }
-}
-
-void Untyped::MergeFrom(const Untyped& from) {
- GOOGLE_CHECK_NE(&from, this);
- if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (from.has_value()) {
- set_value(from.value());
- }
- }
- mutable_unknown_fields()->MergeFrom(from.unknown_fields());
-}
-
-void Untyped::CopyFrom(const ::google::protobuf::Message& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void Untyped::CopyFrom(const Untyped& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool Untyped::IsInitialized() const {
-
- return true;
-}
-
-void Untyped::Swap(Untyped* other) {
- if (other != this) {
- std::swap(value_, other->value_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _unknown_fields_.Swap(&other->_unknown_fields_);
- 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;
-}
-
-
-// ===================================================================
-
-#ifndef _MSC_VER
-const int Histogram::kSampleCountFieldNumber;
-const int Histogram::kSampleSumFieldNumber;
-const int Histogram::kBucketFieldNumber;
-#endif // !_MSC_VER
-
-Histogram::Histogram()
- : ::google::protobuf::Message() {
- SharedCtor();
- // @@protoc_insertion_point(constructor:io.prometheus.client.Histogram)
-}
-
-void Histogram::InitAsDefaultInstance() {
-}
-
-Histogram::Histogram(const Histogram& from)
- : ::google::protobuf::Message() {
- SharedCtor();
- MergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Histogram)
-}
-
-void Histogram::SharedCtor() {
- _cached_size_ = 0;
- sample_count_ = GOOGLE_ULONGLONG(0);
- sample_sum_ = 0;
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-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() const {
- return new Histogram;
-}
-
-void Histogram::Clear() {
-#define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \
- &reinterpret_cast<Histogram*>(16)->f) - \
- reinterpret_cast<char*>(16))
-
-#define ZR_(first, last) do { \
- size_t f = OFFSET_OF_FIELD_(first); \
- size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \
- ::memset(&first, 0, n); \
- } while (0)
-
- ZR_(sample_count_, sample_sum_);
-
-#undef OFFSET_OF_FIELD_
-#undef ZR_
-
- bucket_.Clear();
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
- mutable_unknown_fields()->Clear();
-}
-
-bool Histogram::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!(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_)));
- set_has_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_)));
- set_has_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_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, add_bucket()));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(26)) goto parse_bucket;
- 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::WireFormat::SkipField(
- input, tag, mutable_unknown_fields()));
- 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 (has_sample_count()) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->sample_count(), output);
- }
-
- // optional double sample_sum = 2;
- if (has_sample_sum()) {
- ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->sample_sum(), output);
- }
-
- // repeated .io.prometheus.client.Bucket bucket = 3;
- for (int i = 0; i < this->bucket_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 3, this->bucket(i), output);
- }
-
- if (!unknown_fields().empty()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:io.prometheus.client.Histogram)
-}
-
-::google::protobuf::uint8* Histogram::SerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Histogram)
- // optional uint64 sample_count = 1;
- if (has_sample_count()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->sample_count(), target);
- }
-
- // optional double sample_sum = 2;
- if (has_sample_sum()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->sample_sum(), target);
- }
-
- // repeated .io.prometheus.client.Bucket bucket = 3;
- for (int i = 0; i < this->bucket_size(); i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteMessageNoVirtualToArray(
- 3, this->bucket(i), target);
- }
-
- if (!unknown_fields().empty()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Histogram)
- return target;
-}
-
-int Histogram::ByteSize() const {
- int total_size = 0;
-
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- // optional uint64 sample_count = 1;
- if (has_sample_count()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::UInt64Size(
- this->sample_count());
- }
-
- // optional double sample_sum = 2;
- if (has_sample_sum()) {
- 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));
- }
-
- if (!unknown_fields().empty()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- unknown_fields());
- }
- 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) {
- GOOGLE_CHECK_NE(&from, this);
- const Histogram* source =
- ::google::protobuf::internal::dynamic_cast_if_available<const Histogram*>(
- &from);
- if (source == NULL) {
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- MergeFrom(*source);
- }
-}
-
-void Histogram::MergeFrom(const Histogram& from) {
- GOOGLE_CHECK_NE(&from, this);
- bucket_.MergeFrom(from.bucket_);
- if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (from.has_sample_count()) {
- set_sample_count(from.sample_count());
- }
- if (from.has_sample_sum()) {
- set_sample_sum(from.sample_sum());
- }
- }
- mutable_unknown_fields()->MergeFrom(from.unknown_fields());
-}
-
-void Histogram::CopyFrom(const ::google::protobuf::Message& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void Histogram::CopyFrom(const Histogram& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool Histogram::IsInitialized() const {
-
- return true;
-}
-
-void Histogram::Swap(Histogram* other) {
- if (other != this) {
- std::swap(sample_count_, other->sample_count_);
- std::swap(sample_sum_, other->sample_sum_);
- bucket_.Swap(&other->bucket_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _unknown_fields_.Swap(&other->_unknown_fields_);
- 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;
-}
-
-
-// ===================================================================
-
-#ifndef _MSC_VER
-const int Bucket::kCumulativeCountFieldNumber;
-const int Bucket::kUpperBoundFieldNumber;
-#endif // !_MSC_VER
-
-Bucket::Bucket()
- : ::google::protobuf::Message() {
- SharedCtor();
- // @@protoc_insertion_point(constructor:io.prometheus.client.Bucket)
-}
-
-void Bucket::InitAsDefaultInstance() {
-}
-
-Bucket::Bucket(const Bucket& from)
- : ::google::protobuf::Message() {
- SharedCtor();
- MergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Bucket)
-}
-
-void Bucket::SharedCtor() {
- _cached_size_ = 0;
- cumulative_count_ = GOOGLE_ULONGLONG(0);
- upper_bound_ = 0;
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-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() const {
- return new Bucket;
-}
-
-void Bucket::Clear() {
-#define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \
- &reinterpret_cast<Bucket*>(16)->f) - \
- reinterpret_cast<char*>(16))
-
-#define ZR_(first, last) do { \
- size_t f = OFFSET_OF_FIELD_(first); \
- size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \
- ::memset(&first, 0, n); \
- } while (0)
-
- ZR_(cumulative_count_, upper_bound_);
-
-#undef OFFSET_OF_FIELD_
-#undef ZR_
-
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
- mutable_unknown_fields()->Clear();
-}
-
-bool Bucket::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!(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_)));
- set_has_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_)));
- set_has_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::WireFormat::SkipField(
- input, tag, mutable_unknown_fields()));
- 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 (has_cumulative_count()) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->cumulative_count(), output);
- }
-
- // optional double upper_bound = 2;
- if (has_upper_bound()) {
- ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->upper_bound(), output);
- }
-
- if (!unknown_fields().empty()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:io.prometheus.client.Bucket)
-}
-
-::google::protobuf::uint8* Bucket::SerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Bucket)
- // optional uint64 cumulative_count = 1;
- if (has_cumulative_count()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->cumulative_count(), target);
- }
-
- // optional double upper_bound = 2;
- if (has_upper_bound()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->upper_bound(), target);
- }
-
- if (!unknown_fields().empty()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Bucket)
- return target;
-}
-
-int Bucket::ByteSize() const {
- int total_size = 0;
-
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- // optional uint64 cumulative_count = 1;
- if (has_cumulative_count()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::UInt64Size(
- this->cumulative_count());
- }
-
- // optional double upper_bound = 2;
- if (has_upper_bound()) {
- total_size += 1 + 8;
- }
-
- }
- if (!unknown_fields().empty()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- unknown_fields());
- }
- 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) {
- GOOGLE_CHECK_NE(&from, this);
- const Bucket* source =
- ::google::protobuf::internal::dynamic_cast_if_available<const Bucket*>(
- &from);
- if (source == NULL) {
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- MergeFrom(*source);
- }
-}
-
-void Bucket::MergeFrom(const Bucket& from) {
- GOOGLE_CHECK_NE(&from, this);
- if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (from.has_cumulative_count()) {
- set_cumulative_count(from.cumulative_count());
- }
- if (from.has_upper_bound()) {
- set_upper_bound(from.upper_bound());
- }
- }
- mutable_unknown_fields()->MergeFrom(from.unknown_fields());
-}
-
-void Bucket::CopyFrom(const ::google::protobuf::Message& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void Bucket::CopyFrom(const Bucket& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool Bucket::IsInitialized() const {
-
- return true;
-}
-
-void Bucket::Swap(Bucket* other) {
- if (other != this) {
- std::swap(cumulative_count_, other->cumulative_count_);
- std::swap(upper_bound_, other->upper_bound_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _unknown_fields_.Swap(&other->_unknown_fields_);
- 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;
-}
-
-
-// ===================================================================
-
-#ifndef _MSC_VER
-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 // !_MSC_VER
-
-Metric::Metric()
- : ::google::protobuf::Message() {
- SharedCtor();
- // @@protoc_insertion_point(constructor:io.prometheus.client.Metric)
-}
-
-void Metric::InitAsDefaultInstance() {
- 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() {
- SharedCtor();
- MergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Metric)
-}
-
-void Metric::SharedCtor() {
- _cached_size_ = 0;
- gauge_ = NULL;
- counter_ = NULL;
- summary_ = NULL;
- untyped_ = NULL;
- histogram_ = NULL;
- timestamp_ms_ = GOOGLE_LONGLONG(0);
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-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() const {
- return new Metric;
-}
-
-void Metric::Clear() {
- if (_has_bits_[0 / 32] & 126) {
- if (has_gauge()) {
- if (gauge_ != NULL) gauge_->::io::prometheus::client::Gauge::Clear();
- }
- if (has_counter()) {
- if (counter_ != NULL) counter_->::io::prometheus::client::Counter::Clear();
- }
- if (has_summary()) {
- if (summary_ != NULL) summary_->::io::prometheus::client::Summary::Clear();
- }
- if (has_untyped()) {
- if (untyped_ != NULL) untyped_->::io::prometheus::client::Untyped::Clear();
- }
- if (has_histogram()) {
- if (histogram_ != NULL) histogram_->::io::prometheus::client::Histogram::Clear();
- }
- timestamp_ms_ = GOOGLE_LONGLONG(0);
- }
- label_.Clear();
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
- mutable_unknown_fields()->Clear();
-}
-
-bool Metric::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!(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) {
- parse_label:
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, add_label()));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(10)) goto parse_label;
- 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, &timestamp_ms_)));
- set_has_timestamp_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::WireFormat::SkipField(
- input, tag, mutable_unknown_fields()));
- 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 (int i = 0; i < this->label_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 1, this->label(i), output);
- }
-
- // optional .io.prometheus.client.Gauge gauge = 2;
- if (has_gauge()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 2, this->gauge(), output);
- }
-
- // optional .io.prometheus.client.Counter counter = 3;
- if (has_counter()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 3, this->counter(), output);
- }
-
- // optional .io.prometheus.client.Summary summary = 4;
- if (has_summary()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 4, this->summary(), output);
- }
-
- // optional .io.prometheus.client.Untyped untyped = 5;
- if (has_untyped()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 5, this->untyped(), output);
- }
-
- // optional int64 timestamp_ms = 6;
- if (has_timestamp_ms()) {
- ::google::protobuf::internal::WireFormatLite::WriteInt64(6, this->timestamp_ms(), output);
- }
-
- // optional .io.prometheus.client.Histogram histogram = 7;
- if (has_histogram()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 7, this->histogram(), output);
- }
-
- if (!unknown_fields().empty()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:io.prometheus.client.Metric)
-}
-
-::google::protobuf::uint8* Metric::SerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Metric)
- // repeated .io.prometheus.client.LabelPair label = 1;
- for (int i = 0; i < this->label_size(); i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteMessageNoVirtualToArray(
- 1, this->label(i), target);
- }
-
- // optional .io.prometheus.client.Gauge gauge = 2;
- if (has_gauge()) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteMessageNoVirtualToArray(
- 2, this->gauge(), target);
- }
-
- // optional .io.prometheus.client.Counter counter = 3;
- if (has_counter()) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteMessageNoVirtualToArray(
- 3, this->counter(), target);
- }
-
- // optional .io.prometheus.client.Summary summary = 4;
- if (has_summary()) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteMessageNoVirtualToArray(
- 4, this->summary(), target);
- }
-
- // optional .io.prometheus.client.Untyped untyped = 5;
- if (has_untyped()) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteMessageNoVirtualToArray(
- 5, this->untyped(), target);
- }
-
- // optional int64 timestamp_ms = 6;
- if (has_timestamp_ms()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(6, this->timestamp_ms(), target);
- }
-
- // optional .io.prometheus.client.Histogram histogram = 7;
- if (has_histogram()) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteMessageNoVirtualToArray(
- 7, this->histogram(), target);
- }
-
- if (!unknown_fields().empty()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Metric)
- return target;
-}
-
-int Metric::ByteSize() const {
- int total_size = 0;
-
- if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) {
- // optional .io.prometheus.client.Gauge gauge = 2;
- if (has_gauge()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- this->gauge());
- }
-
- // optional .io.prometheus.client.Counter counter = 3;
- if (has_counter()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- this->counter());
- }
-
- // optional .io.prometheus.client.Summary summary = 4;
- if (has_summary()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- this->summary());
- }
-
- // optional .io.prometheus.client.Untyped untyped = 5;
- if (has_untyped()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- this->untyped());
- }
-
- // optional .io.prometheus.client.Histogram histogram = 7;
- if (has_histogram()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- this->histogram());
- }
-
- // optional int64 timestamp_ms = 6;
- if (has_timestamp_ms()) {
- 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));
- }
-
- if (!unknown_fields().empty()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- unknown_fields());
- }
- 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) {
- GOOGLE_CHECK_NE(&from, this);
- const Metric* source =
- ::google::protobuf::internal::dynamic_cast_if_available<const Metric*>(
- &from);
- if (source == NULL) {
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- MergeFrom(*source);
- }
-}
-
-void Metric::MergeFrom(const Metric& from) {
- GOOGLE_CHECK_NE(&from, this);
- label_.MergeFrom(from.label_);
- if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) {
- 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.has_timestamp_ms()) {
- set_timestamp_ms(from.timestamp_ms());
- }
- }
- mutable_unknown_fields()->MergeFrom(from.unknown_fields());
-}
-
-void Metric::CopyFrom(const ::google::protobuf::Message& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void Metric::CopyFrom(const Metric& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool Metric::IsInitialized() const {
-
- return true;
-}
-
-void Metric::Swap(Metric* other) {
- if (other != this) {
- label_.Swap(&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_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _unknown_fields_.Swap(&other->_unknown_fields_);
- 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;
-}
-
-
-// ===================================================================
-
-#ifndef _MSC_VER
-const int MetricFamily::kNameFieldNumber;
-const int MetricFamily::kHelpFieldNumber;
-const int MetricFamily::kTypeFieldNumber;
-const int MetricFamily::kMetricFieldNumber;
-#endif // !_MSC_VER
-
-MetricFamily::MetricFamily()
- : ::google::protobuf::Message() {
- SharedCtor();
- // @@protoc_insertion_point(constructor:io.prometheus.client.MetricFamily)
-}
-
-void MetricFamily::InitAsDefaultInstance() {
-}
-
-MetricFamily::MetricFamily(const MetricFamily& from)
- : ::google::protobuf::Message() {
- SharedCtor();
- MergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:io.prometheus.client.MetricFamily)
-}
-
-void MetricFamily::SharedCtor() {
- ::google::protobuf::internal::GetEmptyString();
- _cached_size_ = 0;
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- help_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- type_ = 0;
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-MetricFamily::~MetricFamily() {
- // @@protoc_insertion_point(destructor:io.prometheus.client.MetricFamily)
- SharedDtor();
-}
-
-void MetricFamily::SharedDtor() {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete name_;
- }
- if (help_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- delete help_;
- }
- 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() const {
- return new MetricFamily;
-}
-
-void MetricFamily::Clear() {
- if (_has_bits_[0 / 32] & 7) {
- if (has_name()) {
- if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- name_->clear();
- }
- }
- if (has_help()) {
- if (help_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
- help_->clear();
- }
- }
- type_ = 0;
- }
- metric_.Clear();
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
- mutable_unknown_fields()->Clear();
-}
-
-bool MetricFamily::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!(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()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->name().data(), this->name().length(),
- ::google::protobuf::internal::WireFormat::PARSE,
- "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()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->help().data(), this->help().length(),
- ::google::protobuf::internal::WireFormat::PARSE,
- "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)));
- if (::io::prometheus::client::MetricType_IsValid(value)) {
- set_type(static_cast< ::io::prometheus::client::MetricType >(value));
- } else {
- mutable_unknown_fields()->AddVarint(3, 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_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, add_metric()));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(34)) goto parse_metric;
- 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::WireFormat::SkipField(
- input, tag, mutable_unknown_fields()));
- 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 (has_name()) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->name().data(), this->name().length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "name");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->name(), output);
- }
-
- // optional string help = 2;
- if (has_help()) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->help().data(), this->help().length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "help");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 2, this->help(), output);
- }
-
- // optional .io.prometheus.client.MetricType type = 3;
- if (has_type()) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 3, this->type(), output);
- }
-
- // repeated .io.prometheus.client.Metric metric = 4;
- for (int i = 0; i < this->metric_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 4, this->metric(i), output);
- }
-
- if (!unknown_fields().empty()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:io.prometheus.client.MetricFamily)
-}
-
-::google::protobuf::uint8* MetricFamily::SerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.MetricFamily)
- // optional string name = 1;
- if (has_name()) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->name().data(), this->name().length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "name");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->name(), target);
- }
-
- // optional string help = 2;
- if (has_help()) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->help().data(), this->help().length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "help");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 2, this->help(), target);
- }
-
- // optional .io.prometheus.client.MetricType type = 3;
- if (has_type()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
- 3, this->type(), target);
- }
-
- // repeated .io.prometheus.client.Metric metric = 4;
- for (int i = 0; i < this->metric_size(); i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteMessageNoVirtualToArray(
- 4, this->metric(i), target);
- }
-
- if (!unknown_fields().empty()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.MetricFamily)
- return target;
-}
-
-int MetricFamily::ByteSize() const {
- int total_size = 0;
-
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- // optional string name = 1;
- if (has_name()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->name());
- }
-
- // optional string help = 2;
- if (has_help()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->help());
- }
-
- // optional .io.prometheus.client.MetricType type = 3;
- if (has_type()) {
- 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));
- }
-
- if (!unknown_fields().empty()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- unknown_fields());
- }
- 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) {
- GOOGLE_CHECK_NE(&from, this);
- const MetricFamily* source =
- ::google::protobuf::internal::dynamic_cast_if_available<const MetricFamily*>(
- &from);
- if (source == NULL) {
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- MergeFrom(*source);
- }
-}
-
-void MetricFamily::MergeFrom(const MetricFamily& from) {
- GOOGLE_CHECK_NE(&from, this);
- metric_.MergeFrom(from.metric_);
- if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (from.has_name()) {
- set_name(from.name());
- }
- if (from.has_help()) {
- set_help(from.help());
- }
- if (from.has_type()) {
- set_type(from.type());
- }
- }
- mutable_unknown_fields()->MergeFrom(from.unknown_fields());
-}
-
-void MetricFamily::CopyFrom(const ::google::protobuf::Message& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void MetricFamily::CopyFrom(const MetricFamily& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool MetricFamily::IsInitialized() const {
-
- return true;
-}
-
-void MetricFamily::Swap(MetricFamily* other) {
- if (other != this) {
- std::swap(name_, other->name_);
- std::swap(help_, other->help_);
- std::swap(type_, other->type_);
- metric_.Swap(&other->metric_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _unknown_fields_.Swap(&other->_unknown_fields_);
- 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;
-}
-
-
-// @@protoc_insertion_point(namespace_scope)
-
-} // namespace client
-} // namespace prometheus
-} // namespace io
-
-// @@protoc_insertion_point(global_scope)