1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: perf_stat.proto
3
4 #include "perf_stat.pb.h"
5
6 #include <algorithm>
7
8 #include <google/protobuf/io/coded_stream.h>
9 #include <google/protobuf/extension_set.h>
10 #include <google/protobuf/wire_format_lite.h>
11 #include <google/protobuf/io/zero_copy_stream_impl_lite.h>
12 // @@protoc_insertion_point(includes)
13 #include <google/protobuf/port_def.inc>
14
15 PROTOBUF_PRAGMA_INIT_SEG
16
17 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
18 namespace _pbi = _pb::internal;
19
20 namespace metrics {
PerfStatProto_PerfStatLine(::_pbi::ConstantInitialized)21 PROTOBUF_CONSTEXPR PerfStatProto_PerfStatLine::PerfStatProto_PerfStatLine(
22 ::_pbi::ConstantInitialized): _impl_{
23 /*decltype(_impl_._has_bits_)*/{}
24 , /*decltype(_impl_._cached_size_)*/{}
25 , /*decltype(_impl_.event_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
26 , /*decltype(_impl_.time_ms_)*/uint64_t{0u}
27 , /*decltype(_impl_.count_)*/uint64_t{0u}} {}
28 struct PerfStatProto_PerfStatLineDefaultTypeInternal {
PerfStatProto_PerfStatLineDefaultTypeInternalmetrics::PerfStatProto_PerfStatLineDefaultTypeInternal29 PROTOBUF_CONSTEXPR PerfStatProto_PerfStatLineDefaultTypeInternal()
30 : _instance(::_pbi::ConstantInitialized{}) {}
~PerfStatProto_PerfStatLineDefaultTypeInternalmetrics::PerfStatProto_PerfStatLineDefaultTypeInternal31 ~PerfStatProto_PerfStatLineDefaultTypeInternal() {}
32 union {
33 PerfStatProto_PerfStatLine _instance;
34 };
35 };
36 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PerfStatProto_PerfStatLineDefaultTypeInternal _PerfStatProto_PerfStatLine_default_instance_;
PerfStatProto(::_pbi::ConstantInitialized)37 PROTOBUF_CONSTEXPR PerfStatProto::PerfStatProto(
38 ::_pbi::ConstantInitialized): _impl_{
39 /*decltype(_impl_._has_bits_)*/{}
40 , /*decltype(_impl_._cached_size_)*/{}
41 , /*decltype(_impl_.line_)*/{}
42 , /*decltype(_impl_.command_line_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
43 struct PerfStatProtoDefaultTypeInternal {
PerfStatProtoDefaultTypeInternalmetrics::PerfStatProtoDefaultTypeInternal44 PROTOBUF_CONSTEXPR PerfStatProtoDefaultTypeInternal()
45 : _instance(::_pbi::ConstantInitialized{}) {}
~PerfStatProtoDefaultTypeInternalmetrics::PerfStatProtoDefaultTypeInternal46 ~PerfStatProtoDefaultTypeInternal() {}
47 union {
48 PerfStatProto _instance;
49 };
50 };
51 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PerfStatProtoDefaultTypeInternal _PerfStatProto_default_instance_;
52 } // namespace metrics
53 namespace metrics {
54
55 // ===================================================================
56
57 class PerfStatProto_PerfStatLine::_Internal {
58 public:
59 using HasBits = decltype(std::declval<PerfStatProto_PerfStatLine>()._impl_._has_bits_);
set_has_time_ms(HasBits * has_bits)60 static void set_has_time_ms(HasBits* has_bits) {
61 (*has_bits)[0] |= 2u;
62 }
set_has_count(HasBits * has_bits)63 static void set_has_count(HasBits* has_bits) {
64 (*has_bits)[0] |= 4u;
65 }
set_has_event_name(HasBits * has_bits)66 static void set_has_event_name(HasBits* has_bits) {
67 (*has_bits)[0] |= 1u;
68 }
69 };
70
PerfStatProto_PerfStatLine(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)71 PerfStatProto_PerfStatLine::PerfStatProto_PerfStatLine(::PROTOBUF_NAMESPACE_ID::Arena* arena,
72 bool is_message_owned)
73 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
74 SharedCtor(arena, is_message_owned);
75 // @@protoc_insertion_point(arena_constructor:metrics.PerfStatProto.PerfStatLine)
76 }
PerfStatProto_PerfStatLine(const PerfStatProto_PerfStatLine & from)77 PerfStatProto_PerfStatLine::PerfStatProto_PerfStatLine(const PerfStatProto_PerfStatLine& from)
78 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
79 PerfStatProto_PerfStatLine* const _this = this; (void)_this;
80 new (&_impl_) Impl_{
81 decltype(_impl_._has_bits_){from._impl_._has_bits_}
82 , /*decltype(_impl_._cached_size_)*/{}
83 , decltype(_impl_.event_name_){}
84 , decltype(_impl_.time_ms_){}
85 , decltype(_impl_.count_){}};
86
87 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
88 _impl_.event_name_.InitDefault();
89 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
90 _impl_.event_name_.Set("", GetArenaForAllocation());
91 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
92 if (from._internal_has_event_name()) {
93 _this->_impl_.event_name_.Set(from._internal_event_name(),
94 _this->GetArenaForAllocation());
95 }
96 ::memcpy(&_impl_.time_ms_, &from._impl_.time_ms_,
97 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.count_) -
98 reinterpret_cast<char*>(&_impl_.time_ms_)) + sizeof(_impl_.count_));
99 // @@protoc_insertion_point(copy_constructor:metrics.PerfStatProto.PerfStatLine)
100 }
101
SharedCtor(::_pb::Arena * arena,bool is_message_owned)102 inline void PerfStatProto_PerfStatLine::SharedCtor(
103 ::_pb::Arena* arena, bool is_message_owned) {
104 (void)arena;
105 (void)is_message_owned;
106 new (&_impl_) Impl_{
107 decltype(_impl_._has_bits_){}
108 , /*decltype(_impl_._cached_size_)*/{}
109 , decltype(_impl_.event_name_){}
110 , decltype(_impl_.time_ms_){uint64_t{0u}}
111 , decltype(_impl_.count_){uint64_t{0u}}
112 };
113 _impl_.event_name_.InitDefault();
114 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
115 _impl_.event_name_.Set("", GetArenaForAllocation());
116 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
117 }
118
~PerfStatProto_PerfStatLine()119 PerfStatProto_PerfStatLine::~PerfStatProto_PerfStatLine() {
120 // @@protoc_insertion_point(destructor:metrics.PerfStatProto.PerfStatLine)
121 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
122 (void)arena;
123 return;
124 }
125 SharedDtor();
126 }
127
SharedDtor()128 inline void PerfStatProto_PerfStatLine::SharedDtor() {
129 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
130 _impl_.event_name_.Destroy();
131 }
132
SetCachedSize(int size) const133 void PerfStatProto_PerfStatLine::SetCachedSize(int size) const {
134 _impl_._cached_size_.Set(size);
135 }
136
Clear()137 void PerfStatProto_PerfStatLine::Clear() {
138 // @@protoc_insertion_point(message_clear_start:metrics.PerfStatProto.PerfStatLine)
139 uint32_t cached_has_bits = 0;
140 // Prevent compiler warnings about cached_has_bits being unused
141 (void) cached_has_bits;
142
143 cached_has_bits = _impl_._has_bits_[0];
144 if (cached_has_bits & 0x00000001u) {
145 _impl_.event_name_.ClearNonDefaultToEmpty();
146 }
147 if (cached_has_bits & 0x00000006u) {
148 ::memset(&_impl_.time_ms_, 0, static_cast<size_t>(
149 reinterpret_cast<char*>(&_impl_.count_) -
150 reinterpret_cast<char*>(&_impl_.time_ms_)) + sizeof(_impl_.count_));
151 }
152 _impl_._has_bits_.Clear();
153 _internal_metadata_.Clear<std::string>();
154 }
155
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)156 const char* PerfStatProto_PerfStatLine::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
157 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
158 _Internal::HasBits has_bits{};
159 while (!ctx->Done(&ptr)) {
160 uint32_t tag;
161 ptr = ::_pbi::ReadTag(ptr, &tag);
162 switch (tag >> 3) {
163 // optional uint64 time_ms = 1;
164 case 1:
165 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
166 _Internal::set_has_time_ms(&has_bits);
167 _impl_.time_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
168 CHK_(ptr);
169 } else
170 goto handle_unusual;
171 continue;
172 // optional uint64 count = 2;
173 case 2:
174 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
175 _Internal::set_has_count(&has_bits);
176 _impl_.count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
177 CHK_(ptr);
178 } else
179 goto handle_unusual;
180 continue;
181 // optional string event_name = 3;
182 case 3:
183 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
184 auto str = _internal_mutable_event_name();
185 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
186 CHK_(ptr);
187 } else
188 goto handle_unusual;
189 continue;
190 default:
191 goto handle_unusual;
192 } // switch
193 handle_unusual:
194 if ((tag == 0) || ((tag & 7) == 4)) {
195 CHK_(ptr);
196 ctx->SetLastTag(tag);
197 goto message_done;
198 }
199 ptr = UnknownFieldParse(
200 tag,
201 _internal_metadata_.mutable_unknown_fields<std::string>(),
202 ptr, ctx);
203 CHK_(ptr != nullptr);
204 } // while
205 message_done:
206 _impl_._has_bits_.Or(has_bits);
207 return ptr;
208 failure:
209 ptr = nullptr;
210 goto message_done;
211 #undef CHK_
212 }
213
_InternalSerialize(uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const214 uint8_t* PerfStatProto_PerfStatLine::_InternalSerialize(
215 uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
216 // @@protoc_insertion_point(serialize_to_array_start:metrics.PerfStatProto.PerfStatLine)
217 uint32_t cached_has_bits = 0;
218 (void) cached_has_bits;
219
220 cached_has_bits = _impl_._has_bits_[0];
221 // optional uint64 time_ms = 1;
222 if (cached_has_bits & 0x00000002u) {
223 target = stream->EnsureSpace(target);
224 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_time_ms(), target);
225 }
226
227 // optional uint64 count = 2;
228 if (cached_has_bits & 0x00000004u) {
229 target = stream->EnsureSpace(target);
230 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_count(), target);
231 }
232
233 // optional string event_name = 3;
234 if (cached_has_bits & 0x00000001u) {
235 target = stream->WriteStringMaybeAliased(
236 3, this->_internal_event_name(), target);
237 }
238
239 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
240 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
241 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
242 }
243 // @@protoc_insertion_point(serialize_to_array_end:metrics.PerfStatProto.PerfStatLine)
244 return target;
245 }
246
ByteSizeLong() const247 size_t PerfStatProto_PerfStatLine::ByteSizeLong() const {
248 // @@protoc_insertion_point(message_byte_size_start:metrics.PerfStatProto.PerfStatLine)
249 size_t total_size = 0;
250
251 uint32_t cached_has_bits = 0;
252 // Prevent compiler warnings about cached_has_bits being unused
253 (void) cached_has_bits;
254
255 cached_has_bits = _impl_._has_bits_[0];
256 if (cached_has_bits & 0x00000007u) {
257 // optional string event_name = 3;
258 if (cached_has_bits & 0x00000001u) {
259 total_size += 1 +
260 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
261 this->_internal_event_name());
262 }
263
264 // optional uint64 time_ms = 1;
265 if (cached_has_bits & 0x00000002u) {
266 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_time_ms());
267 }
268
269 // optional uint64 count = 2;
270 if (cached_has_bits & 0x00000004u) {
271 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_count());
272 }
273
274 }
275 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
276 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
277 }
278 int cached_size = ::_pbi::ToCachedSize(total_size);
279 SetCachedSize(cached_size);
280 return total_size;
281 }
282
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)283 void PerfStatProto_PerfStatLine::CheckTypeAndMergeFrom(
284 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
285 MergeFrom(*::_pbi::DownCast<const PerfStatProto_PerfStatLine*>(
286 &from));
287 }
288
MergeFrom(const PerfStatProto_PerfStatLine & from)289 void PerfStatProto_PerfStatLine::MergeFrom(const PerfStatProto_PerfStatLine& from) {
290 PerfStatProto_PerfStatLine* const _this = this;
291 // @@protoc_insertion_point(class_specific_merge_from_start:metrics.PerfStatProto.PerfStatLine)
292 GOOGLE_DCHECK_NE(&from, _this);
293 uint32_t cached_has_bits = 0;
294 (void) cached_has_bits;
295
296 cached_has_bits = from._impl_._has_bits_[0];
297 if (cached_has_bits & 0x00000007u) {
298 if (cached_has_bits & 0x00000001u) {
299 _this->_internal_set_event_name(from._internal_event_name());
300 }
301 if (cached_has_bits & 0x00000002u) {
302 _this->_impl_.time_ms_ = from._impl_.time_ms_;
303 }
304 if (cached_has_bits & 0x00000004u) {
305 _this->_impl_.count_ = from._impl_.count_;
306 }
307 _this->_impl_._has_bits_[0] |= cached_has_bits;
308 }
309 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
310 }
311
CopyFrom(const PerfStatProto_PerfStatLine & from)312 void PerfStatProto_PerfStatLine::CopyFrom(const PerfStatProto_PerfStatLine& from) {
313 // @@protoc_insertion_point(class_specific_copy_from_start:metrics.PerfStatProto.PerfStatLine)
314 if (&from == this) return;
315 Clear();
316 MergeFrom(from);
317 }
318
IsInitialized() const319 bool PerfStatProto_PerfStatLine::IsInitialized() const {
320 return true;
321 }
322
InternalSwap(PerfStatProto_PerfStatLine * other)323 void PerfStatProto_PerfStatLine::InternalSwap(PerfStatProto_PerfStatLine* other) {
324 using std::swap;
325 auto* lhs_arena = GetArenaForAllocation();
326 auto* rhs_arena = other->GetArenaForAllocation();
327 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
328 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
329 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
330 &_impl_.event_name_, lhs_arena,
331 &other->_impl_.event_name_, rhs_arena
332 );
333 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
334 PROTOBUF_FIELD_OFFSET(PerfStatProto_PerfStatLine, _impl_.count_)
335 + sizeof(PerfStatProto_PerfStatLine::_impl_.count_)
336 - PROTOBUF_FIELD_OFFSET(PerfStatProto_PerfStatLine, _impl_.time_ms_)>(
337 reinterpret_cast<char*>(&_impl_.time_ms_),
338 reinterpret_cast<char*>(&other->_impl_.time_ms_));
339 }
340
GetTypeName() const341 std::string PerfStatProto_PerfStatLine::GetTypeName() const {
342 return "metrics.PerfStatProto.PerfStatLine";
343 }
344
345
346 // ===================================================================
347
348 class PerfStatProto::_Internal {
349 public:
350 using HasBits = decltype(std::declval<PerfStatProto>()._impl_._has_bits_);
set_has_command_line(HasBits * has_bits)351 static void set_has_command_line(HasBits* has_bits) {
352 (*has_bits)[0] |= 1u;
353 }
354 };
355
PerfStatProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)356 PerfStatProto::PerfStatProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
357 bool is_message_owned)
358 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
359 SharedCtor(arena, is_message_owned);
360 // @@protoc_insertion_point(arena_constructor:metrics.PerfStatProto)
361 }
PerfStatProto(const PerfStatProto & from)362 PerfStatProto::PerfStatProto(const PerfStatProto& from)
363 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
364 PerfStatProto* const _this = this; (void)_this;
365 new (&_impl_) Impl_{
366 decltype(_impl_._has_bits_){from._impl_._has_bits_}
367 , /*decltype(_impl_._cached_size_)*/{}
368 , decltype(_impl_.line_){from._impl_.line_}
369 , decltype(_impl_.command_line_){}};
370
371 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
372 _impl_.command_line_.InitDefault();
373 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
374 _impl_.command_line_.Set("", GetArenaForAllocation());
375 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
376 if (from._internal_has_command_line()) {
377 _this->_impl_.command_line_.Set(from._internal_command_line(),
378 _this->GetArenaForAllocation());
379 }
380 // @@protoc_insertion_point(copy_constructor:metrics.PerfStatProto)
381 }
382
SharedCtor(::_pb::Arena * arena,bool is_message_owned)383 inline void PerfStatProto::SharedCtor(
384 ::_pb::Arena* arena, bool is_message_owned) {
385 (void)arena;
386 (void)is_message_owned;
387 new (&_impl_) Impl_{
388 decltype(_impl_._has_bits_){}
389 , /*decltype(_impl_._cached_size_)*/{}
390 , decltype(_impl_.line_){arena}
391 , decltype(_impl_.command_line_){}
392 };
393 _impl_.command_line_.InitDefault();
394 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
395 _impl_.command_line_.Set("", GetArenaForAllocation());
396 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
397 }
398
~PerfStatProto()399 PerfStatProto::~PerfStatProto() {
400 // @@protoc_insertion_point(destructor:metrics.PerfStatProto)
401 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
402 (void)arena;
403 return;
404 }
405 SharedDtor();
406 }
407
SharedDtor()408 inline void PerfStatProto::SharedDtor() {
409 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
410 _impl_.line_.~RepeatedPtrField();
411 _impl_.command_line_.Destroy();
412 }
413
SetCachedSize(int size) const414 void PerfStatProto::SetCachedSize(int size) const {
415 _impl_._cached_size_.Set(size);
416 }
417
Clear()418 void PerfStatProto::Clear() {
419 // @@protoc_insertion_point(message_clear_start:metrics.PerfStatProto)
420 uint32_t cached_has_bits = 0;
421 // Prevent compiler warnings about cached_has_bits being unused
422 (void) cached_has_bits;
423
424 _impl_.line_.Clear();
425 cached_has_bits = _impl_._has_bits_[0];
426 if (cached_has_bits & 0x00000001u) {
427 _impl_.command_line_.ClearNonDefaultToEmpty();
428 }
429 _impl_._has_bits_.Clear();
430 _internal_metadata_.Clear<std::string>();
431 }
432
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)433 const char* PerfStatProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
434 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
435 _Internal::HasBits has_bits{};
436 while (!ctx->Done(&ptr)) {
437 uint32_t tag;
438 ptr = ::_pbi::ReadTag(ptr, &tag);
439 switch (tag >> 3) {
440 // repeated .metrics.PerfStatProto.PerfStatLine line = 1;
441 case 1:
442 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
443 ptr -= 1;
444 do {
445 ptr += 1;
446 ptr = ctx->ParseMessage(_internal_add_line(), ptr);
447 CHK_(ptr);
448 if (!ctx->DataAvailable(ptr)) break;
449 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
450 } else
451 goto handle_unusual;
452 continue;
453 // optional string command_line = 2;
454 case 2:
455 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
456 auto str = _internal_mutable_command_line();
457 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
458 CHK_(ptr);
459 } else
460 goto handle_unusual;
461 continue;
462 default:
463 goto handle_unusual;
464 } // switch
465 handle_unusual:
466 if ((tag == 0) || ((tag & 7) == 4)) {
467 CHK_(ptr);
468 ctx->SetLastTag(tag);
469 goto message_done;
470 }
471 ptr = UnknownFieldParse(
472 tag,
473 _internal_metadata_.mutable_unknown_fields<std::string>(),
474 ptr, ctx);
475 CHK_(ptr != nullptr);
476 } // while
477 message_done:
478 _impl_._has_bits_.Or(has_bits);
479 return ptr;
480 failure:
481 ptr = nullptr;
482 goto message_done;
483 #undef CHK_
484 }
485
_InternalSerialize(uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const486 uint8_t* PerfStatProto::_InternalSerialize(
487 uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
488 // @@protoc_insertion_point(serialize_to_array_start:metrics.PerfStatProto)
489 uint32_t cached_has_bits = 0;
490 (void) cached_has_bits;
491
492 // repeated .metrics.PerfStatProto.PerfStatLine line = 1;
493 for (unsigned i = 0,
494 n = static_cast<unsigned>(this->_internal_line_size()); i < n; i++) {
495 const auto& repfield = this->_internal_line(i);
496 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
497 InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
498 }
499
500 cached_has_bits = _impl_._has_bits_[0];
501 // optional string command_line = 2;
502 if (cached_has_bits & 0x00000001u) {
503 target = stream->WriteStringMaybeAliased(
504 2, this->_internal_command_line(), target);
505 }
506
507 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
508 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
509 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
510 }
511 // @@protoc_insertion_point(serialize_to_array_end:metrics.PerfStatProto)
512 return target;
513 }
514
ByteSizeLong() const515 size_t PerfStatProto::ByteSizeLong() const {
516 // @@protoc_insertion_point(message_byte_size_start:metrics.PerfStatProto)
517 size_t total_size = 0;
518
519 uint32_t cached_has_bits = 0;
520 // Prevent compiler warnings about cached_has_bits being unused
521 (void) cached_has_bits;
522
523 // repeated .metrics.PerfStatProto.PerfStatLine line = 1;
524 total_size += 1UL * this->_internal_line_size();
525 for (const auto& msg : this->_impl_.line_) {
526 total_size +=
527 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
528 }
529
530 // optional string command_line = 2;
531 cached_has_bits = _impl_._has_bits_[0];
532 if (cached_has_bits & 0x00000001u) {
533 total_size += 1 +
534 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
535 this->_internal_command_line());
536 }
537
538 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
539 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
540 }
541 int cached_size = ::_pbi::ToCachedSize(total_size);
542 SetCachedSize(cached_size);
543 return total_size;
544 }
545
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)546 void PerfStatProto::CheckTypeAndMergeFrom(
547 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
548 MergeFrom(*::_pbi::DownCast<const PerfStatProto*>(
549 &from));
550 }
551
MergeFrom(const PerfStatProto & from)552 void PerfStatProto::MergeFrom(const PerfStatProto& from) {
553 PerfStatProto* const _this = this;
554 // @@protoc_insertion_point(class_specific_merge_from_start:metrics.PerfStatProto)
555 GOOGLE_DCHECK_NE(&from, _this);
556 uint32_t cached_has_bits = 0;
557 (void) cached_has_bits;
558
559 _this->_impl_.line_.MergeFrom(from._impl_.line_);
560 if (from._internal_has_command_line()) {
561 _this->_internal_set_command_line(from._internal_command_line());
562 }
563 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
564 }
565
CopyFrom(const PerfStatProto & from)566 void PerfStatProto::CopyFrom(const PerfStatProto& from) {
567 // @@protoc_insertion_point(class_specific_copy_from_start:metrics.PerfStatProto)
568 if (&from == this) return;
569 Clear();
570 MergeFrom(from);
571 }
572
IsInitialized() const573 bool PerfStatProto::IsInitialized() const {
574 return true;
575 }
576
InternalSwap(PerfStatProto * other)577 void PerfStatProto::InternalSwap(PerfStatProto* other) {
578 using std::swap;
579 auto* lhs_arena = GetArenaForAllocation();
580 auto* rhs_arena = other->GetArenaForAllocation();
581 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
582 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
583 _impl_.line_.InternalSwap(&other->_impl_.line_);
584 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
585 &_impl_.command_line_, lhs_arena,
586 &other->_impl_.command_line_, rhs_arena
587 );
588 }
589
GetTypeName() const590 std::string PerfStatProto::GetTypeName() const {
591 return "metrics.PerfStatProto";
592 }
593
594
595 // @@protoc_insertion_point(namespace_scope)
596 } // namespace metrics
597 PROTOBUF_NAMESPACE_OPEN
598 template<> PROTOBUF_NOINLINE ::metrics::PerfStatProto_PerfStatLine*
CreateMaybeMessage(Arena * arena)599 Arena::CreateMaybeMessage< ::metrics::PerfStatProto_PerfStatLine >(Arena* arena) {
600 return Arena::CreateMessageInternal< ::metrics::PerfStatProto_PerfStatLine >(arena);
601 }
602 template<> PROTOBUF_NOINLINE ::metrics::PerfStatProto*
CreateMaybeMessage(Arena * arena)603 Arena::CreateMaybeMessage< ::metrics::PerfStatProto >(Arena* arena) {
604 return Arena::CreateMessageInternal< ::metrics::PerfStatProto >(arena);
605 }
606 PROTOBUF_NAMESPACE_CLOSE
607
608 // @@protoc_insertion_point(global_scope)
609 #include <google/protobuf/port_undef.inc>
610