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