github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/c-deps/libroach/protos/storage/enginepb/rocksdb.pb.cc (about) 1 // Generated by the protocol buffer compiler. DO NOT EDIT! 2 // source: storage/enginepb/rocksdb.proto 3 4 #include "storage/enginepb/rocksdb.pb.h" 5 6 #include <algorithm> 7 8 #include <google/protobuf/stubs/common.h> 9 #include <google/protobuf/stubs/port.h> 10 #include <google/protobuf/io/coded_stream.h> 11 #include <google/protobuf/wire_format_lite_inl.h> 12 #include <google/protobuf/io/zero_copy_stream_impl_lite.h> 13 // This is a temporary google only hack 14 #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS 15 #include "third_party/protobuf/version.h" 16 #endif 17 // @@protoc_insertion_point(includes) 18 19 namespace protobuf_storage_2fenginepb_2frocksdb_2eproto { 20 extern PROTOBUF_INTERNAL_EXPORT_protobuf_storage_2fenginepb_2frocksdb_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_HistogramData; 21 extern PROTOBUF_INTERNAL_EXPORT_protobuf_storage_2fenginepb_2frocksdb_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TickersAndHistograms_TickersEntry_DoNotUse; 22 extern PROTOBUF_INTERNAL_EXPORT_protobuf_storage_2fenginepb_2frocksdb_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_SSTUserProperties; 23 extern PROTOBUF_INTERNAL_EXPORT_protobuf_storage_2fenginepb_2frocksdb_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TickersAndHistograms_HistogramsEntry_DoNotUse; 24 } // namespace protobuf_storage_2fenginepb_2frocksdb_2eproto 25 namespace protobuf_util_2fhlc_2ftimestamp_2eproto { 26 extern PROTOBUF_INTERNAL_EXPORT_protobuf_util_2fhlc_2ftimestamp_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Timestamp; 27 } // namespace protobuf_util_2fhlc_2ftimestamp_2eproto 28 namespace cockroach { 29 namespace storage { 30 namespace enginepb { 31 class SSTUserPropertiesDefaultTypeInternal { 32 public: 33 ::google::protobuf::internal::ExplicitlyConstructed<SSTUserProperties> 34 _instance; 35 } _SSTUserProperties_default_instance_; 36 class SSTUserPropertiesCollectionDefaultTypeInternal { 37 public: 38 ::google::protobuf::internal::ExplicitlyConstructed<SSTUserPropertiesCollection> 39 _instance; 40 } _SSTUserPropertiesCollection_default_instance_; 41 class HistogramDataDefaultTypeInternal { 42 public: 43 ::google::protobuf::internal::ExplicitlyConstructed<HistogramData> 44 _instance; 45 } _HistogramData_default_instance_; 46 class TickersAndHistograms_TickersEntry_DoNotUseDefaultTypeInternal { 47 public: 48 ::google::protobuf::internal::ExplicitlyConstructed<TickersAndHistograms_TickersEntry_DoNotUse> 49 _instance; 50 } _TickersAndHistograms_TickersEntry_DoNotUse_default_instance_; 51 class TickersAndHistograms_HistogramsEntry_DoNotUseDefaultTypeInternal { 52 public: 53 ::google::protobuf::internal::ExplicitlyConstructed<TickersAndHistograms_HistogramsEntry_DoNotUse> 54 _instance; 55 } _TickersAndHistograms_HistogramsEntry_DoNotUse_default_instance_; 56 class TickersAndHistogramsDefaultTypeInternal { 57 public: 58 ::google::protobuf::internal::ExplicitlyConstructed<TickersAndHistograms> 59 _instance; 60 } _TickersAndHistograms_default_instance_; 61 } // namespace enginepb 62 } // namespace storage 63 } // namespace cockroach 64 namespace protobuf_storage_2fenginepb_2frocksdb_2eproto { 65 static void InitDefaultsSSTUserProperties() { 66 GOOGLE_PROTOBUF_VERIFY_VERSION; 67 68 { 69 void* ptr = &::cockroach::storage::enginepb::_SSTUserProperties_default_instance_; 70 new (ptr) ::cockroach::storage::enginepb::SSTUserProperties(); 71 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); 72 } 73 ::cockroach::storage::enginepb::SSTUserProperties::InitAsDefaultInstance(); 74 } 75 76 ::google::protobuf::internal::SCCInfo<1> scc_info_SSTUserProperties = 77 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsSSTUserProperties}, { 78 &protobuf_util_2fhlc_2ftimestamp_2eproto::scc_info_Timestamp.base,}}; 79 80 static void InitDefaultsSSTUserPropertiesCollection() { 81 GOOGLE_PROTOBUF_VERIFY_VERSION; 82 83 { 84 void* ptr = &::cockroach::storage::enginepb::_SSTUserPropertiesCollection_default_instance_; 85 new (ptr) ::cockroach::storage::enginepb::SSTUserPropertiesCollection(); 86 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); 87 } 88 ::cockroach::storage::enginepb::SSTUserPropertiesCollection::InitAsDefaultInstance(); 89 } 90 91 ::google::protobuf::internal::SCCInfo<1> scc_info_SSTUserPropertiesCollection = 92 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsSSTUserPropertiesCollection}, { 93 &protobuf_storage_2fenginepb_2frocksdb_2eproto::scc_info_SSTUserProperties.base,}}; 94 95 static void InitDefaultsHistogramData() { 96 GOOGLE_PROTOBUF_VERIFY_VERSION; 97 98 { 99 void* ptr = &::cockroach::storage::enginepb::_HistogramData_default_instance_; 100 new (ptr) ::cockroach::storage::enginepb::HistogramData(); 101 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); 102 } 103 ::cockroach::storage::enginepb::HistogramData::InitAsDefaultInstance(); 104 } 105 106 ::google::protobuf::internal::SCCInfo<0> scc_info_HistogramData = 107 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsHistogramData}, {}}; 108 109 static void InitDefaultsTickersAndHistograms_TickersEntry_DoNotUse() { 110 GOOGLE_PROTOBUF_VERIFY_VERSION; 111 112 { 113 void* ptr = &::cockroach::storage::enginepb::_TickersAndHistograms_TickersEntry_DoNotUse_default_instance_; 114 new (ptr) ::cockroach::storage::enginepb::TickersAndHistograms_TickersEntry_DoNotUse(); 115 } 116 ::cockroach::storage::enginepb::TickersAndHistograms_TickersEntry_DoNotUse::InitAsDefaultInstance(); 117 } 118 119 ::google::protobuf::internal::SCCInfo<0> scc_info_TickersAndHistograms_TickersEntry_DoNotUse = 120 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTickersAndHistograms_TickersEntry_DoNotUse}, {}}; 121 122 static void InitDefaultsTickersAndHistograms_HistogramsEntry_DoNotUse() { 123 GOOGLE_PROTOBUF_VERIFY_VERSION; 124 125 { 126 void* ptr = &::cockroach::storage::enginepb::_TickersAndHistograms_HistogramsEntry_DoNotUse_default_instance_; 127 new (ptr) ::cockroach::storage::enginepb::TickersAndHistograms_HistogramsEntry_DoNotUse(); 128 } 129 ::cockroach::storage::enginepb::TickersAndHistograms_HistogramsEntry_DoNotUse::InitAsDefaultInstance(); 130 } 131 132 ::google::protobuf::internal::SCCInfo<1> scc_info_TickersAndHistograms_HistogramsEntry_DoNotUse = 133 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTickersAndHistograms_HistogramsEntry_DoNotUse}, { 134 &protobuf_storage_2fenginepb_2frocksdb_2eproto::scc_info_HistogramData.base,}}; 135 136 static void InitDefaultsTickersAndHistograms() { 137 GOOGLE_PROTOBUF_VERIFY_VERSION; 138 139 { 140 void* ptr = &::cockroach::storage::enginepb::_TickersAndHistograms_default_instance_; 141 new (ptr) ::cockroach::storage::enginepb::TickersAndHistograms(); 142 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); 143 } 144 ::cockroach::storage::enginepb::TickersAndHistograms::InitAsDefaultInstance(); 145 } 146 147 ::google::protobuf::internal::SCCInfo<2> scc_info_TickersAndHistograms = 148 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsTickersAndHistograms}, { 149 &protobuf_storage_2fenginepb_2frocksdb_2eproto::scc_info_TickersAndHistograms_TickersEntry_DoNotUse.base, 150 &protobuf_storage_2fenginepb_2frocksdb_2eproto::scc_info_TickersAndHistograms_HistogramsEntry_DoNotUse.base,}}; 151 152 void InitDefaults() { 153 ::google::protobuf::internal::InitSCC(&scc_info_SSTUserProperties.base); 154 ::google::protobuf::internal::InitSCC(&scc_info_SSTUserPropertiesCollection.base); 155 ::google::protobuf::internal::InitSCC(&scc_info_HistogramData.base); 156 ::google::protobuf::internal::InitSCC(&scc_info_TickersAndHistograms_TickersEntry_DoNotUse.base); 157 ::google::protobuf::internal::InitSCC(&scc_info_TickersAndHistograms_HistogramsEntry_DoNotUse.base); 158 ::google::protobuf::internal::InitSCC(&scc_info_TickersAndHistograms.base); 159 } 160 161 } // namespace protobuf_storage_2fenginepb_2frocksdb_2eproto 162 namespace cockroach { 163 namespace storage { 164 namespace enginepb { 165 166 // =================================================================== 167 168 void SSTUserProperties::InitAsDefaultInstance() { 169 ::cockroach::storage::enginepb::_SSTUserProperties_default_instance_._instance.get_mutable()->ts_min_ = const_cast< ::cockroach::util::hlc::Timestamp*>( 170 ::cockroach::util::hlc::Timestamp::internal_default_instance()); 171 ::cockroach::storage::enginepb::_SSTUserProperties_default_instance_._instance.get_mutable()->ts_max_ = const_cast< ::cockroach::util::hlc::Timestamp*>( 172 ::cockroach::util::hlc::Timestamp::internal_default_instance()); 173 } 174 void SSTUserProperties::clear_ts_min() { 175 if (GetArenaNoVirtual() == NULL && ts_min_ != NULL) { 176 delete ts_min_; 177 } 178 ts_min_ = NULL; 179 } 180 void SSTUserProperties::clear_ts_max() { 181 if (GetArenaNoVirtual() == NULL && ts_max_ != NULL) { 182 delete ts_max_; 183 } 184 ts_max_ = NULL; 185 } 186 #if !defined(_MSC_VER) || _MSC_VER >= 1900 187 const int SSTUserProperties::kPathFieldNumber; 188 const int SSTUserProperties::kTsMinFieldNumber; 189 const int SSTUserProperties::kTsMaxFieldNumber; 190 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 191 192 SSTUserProperties::SSTUserProperties() 193 : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { 194 ::google::protobuf::internal::InitSCC( 195 &protobuf_storage_2fenginepb_2frocksdb_2eproto::scc_info_SSTUserProperties.base); 196 SharedCtor(); 197 // @@protoc_insertion_point(constructor:cockroach.storage.enginepb.SSTUserProperties) 198 } 199 SSTUserProperties::SSTUserProperties(const SSTUserProperties& from) 200 : ::google::protobuf::MessageLite(), 201 _internal_metadata_(NULL) { 202 _internal_metadata_.MergeFrom(from._internal_metadata_); 203 path_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 204 if (from.path().size() > 0) { 205 path_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.path_); 206 } 207 if (from.has_ts_min()) { 208 ts_min_ = new ::cockroach::util::hlc::Timestamp(*from.ts_min_); 209 } else { 210 ts_min_ = NULL; 211 } 212 if (from.has_ts_max()) { 213 ts_max_ = new ::cockroach::util::hlc::Timestamp(*from.ts_max_); 214 } else { 215 ts_max_ = NULL; 216 } 217 // @@protoc_insertion_point(copy_constructor:cockroach.storage.enginepb.SSTUserProperties) 218 } 219 220 void SSTUserProperties::SharedCtor() { 221 path_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 222 ::memset(&ts_min_, 0, static_cast<size_t>( 223 reinterpret_cast<char*>(&ts_max_) - 224 reinterpret_cast<char*>(&ts_min_)) + sizeof(ts_max_)); 225 } 226 227 SSTUserProperties::~SSTUserProperties() { 228 // @@protoc_insertion_point(destructor:cockroach.storage.enginepb.SSTUserProperties) 229 SharedDtor(); 230 } 231 232 void SSTUserProperties::SharedDtor() { 233 path_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 234 if (this != internal_default_instance()) delete ts_min_; 235 if (this != internal_default_instance()) delete ts_max_; 236 } 237 238 void SSTUserProperties::SetCachedSize(int size) const { 239 _cached_size_.Set(size); 240 } 241 const SSTUserProperties& SSTUserProperties::default_instance() { 242 ::google::protobuf::internal::InitSCC(&protobuf_storage_2fenginepb_2frocksdb_2eproto::scc_info_SSTUserProperties.base); 243 return *internal_default_instance(); 244 } 245 246 247 void SSTUserProperties::Clear() { 248 // @@protoc_insertion_point(message_clear_start:cockroach.storage.enginepb.SSTUserProperties) 249 ::google::protobuf::uint32 cached_has_bits = 0; 250 // Prevent compiler warnings about cached_has_bits being unused 251 (void) cached_has_bits; 252 253 path_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 254 if (GetArenaNoVirtual() == NULL && ts_min_ != NULL) { 255 delete ts_min_; 256 } 257 ts_min_ = NULL; 258 if (GetArenaNoVirtual() == NULL && ts_max_ != NULL) { 259 delete ts_max_; 260 } 261 ts_max_ = NULL; 262 _internal_metadata_.Clear(); 263 } 264 265 bool SSTUserProperties::MergePartialFromCodedStream( 266 ::google::protobuf::io::CodedInputStream* input) { 267 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure 268 ::google::protobuf::uint32 tag; 269 ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter( 270 &_internal_metadata_); 271 ::google::protobuf::io::StringOutputStream unknown_fields_output( 272 unknown_fields_setter.buffer()); 273 ::google::protobuf::io::CodedOutputStream unknown_fields_stream( 274 &unknown_fields_output, false); 275 // @@protoc_insertion_point(parse_start:cockroach.storage.enginepb.SSTUserProperties) 276 for (;;) { 277 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); 278 tag = p.first; 279 if (!p.second) goto handle_unusual; 280 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { 281 // string path = 1; 282 case 1: { 283 if (static_cast< ::google::protobuf::uint8>(tag) == 284 static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { 285 DO_(::google::protobuf::internal::WireFormatLite::ReadString( 286 input, this->mutable_path())); 287 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( 288 this->path().data(), static_cast<int>(this->path().length()), 289 ::google::protobuf::internal::WireFormatLite::PARSE, 290 "cockroach.storage.enginepb.SSTUserProperties.path")); 291 } else { 292 goto handle_unusual; 293 } 294 break; 295 } 296 297 // .cockroach.util.hlc.Timestamp ts_min = 2; 298 case 2: { 299 if (static_cast< ::google::protobuf::uint8>(tag) == 300 static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { 301 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( 302 input, mutable_ts_min())); 303 } else { 304 goto handle_unusual; 305 } 306 break; 307 } 308 309 // .cockroach.util.hlc.Timestamp ts_max = 3; 310 case 3: { 311 if (static_cast< ::google::protobuf::uint8>(tag) == 312 static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { 313 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( 314 input, mutable_ts_max())); 315 } else { 316 goto handle_unusual; 317 } 318 break; 319 } 320 321 default: { 322 handle_unusual: 323 if (tag == 0) { 324 goto success; 325 } 326 DO_(::google::protobuf::internal::WireFormatLite::SkipField( 327 input, tag, &unknown_fields_stream)); 328 break; 329 } 330 } 331 } 332 success: 333 // @@protoc_insertion_point(parse_success:cockroach.storage.enginepb.SSTUserProperties) 334 return true; 335 failure: 336 // @@protoc_insertion_point(parse_failure:cockroach.storage.enginepb.SSTUserProperties) 337 return false; 338 #undef DO_ 339 } 340 341 void SSTUserProperties::SerializeWithCachedSizes( 342 ::google::protobuf::io::CodedOutputStream* output) const { 343 // @@protoc_insertion_point(serialize_start:cockroach.storage.enginepb.SSTUserProperties) 344 ::google::protobuf::uint32 cached_has_bits = 0; 345 (void) cached_has_bits; 346 347 // string path = 1; 348 if (this->path().size() > 0) { 349 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( 350 this->path().data(), static_cast<int>(this->path().length()), 351 ::google::protobuf::internal::WireFormatLite::SERIALIZE, 352 "cockroach.storage.enginepb.SSTUserProperties.path"); 353 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 354 1, this->path(), output); 355 } 356 357 // .cockroach.util.hlc.Timestamp ts_min = 2; 358 if (this->has_ts_min()) { 359 ::google::protobuf::internal::WireFormatLite::WriteMessage( 360 2, this->_internal_ts_min(), output); 361 } 362 363 // .cockroach.util.hlc.Timestamp ts_max = 3; 364 if (this->has_ts_max()) { 365 ::google::protobuf::internal::WireFormatLite::WriteMessage( 366 3, this->_internal_ts_max(), output); 367 } 368 369 output->WriteRaw((::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).data(), 370 static_cast<int>((::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).size())); 371 // @@protoc_insertion_point(serialize_end:cockroach.storage.enginepb.SSTUserProperties) 372 } 373 374 size_t SSTUserProperties::ByteSizeLong() const { 375 // @@protoc_insertion_point(message_byte_size_start:cockroach.storage.enginepb.SSTUserProperties) 376 size_t total_size = 0; 377 378 total_size += (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).size(); 379 380 // string path = 1; 381 if (this->path().size() > 0) { 382 total_size += 1 + 383 ::google::protobuf::internal::WireFormatLite::StringSize( 384 this->path()); 385 } 386 387 // .cockroach.util.hlc.Timestamp ts_min = 2; 388 if (this->has_ts_min()) { 389 total_size += 1 + 390 ::google::protobuf::internal::WireFormatLite::MessageSize( 391 *ts_min_); 392 } 393 394 // .cockroach.util.hlc.Timestamp ts_max = 3; 395 if (this->has_ts_max()) { 396 total_size += 1 + 397 ::google::protobuf::internal::WireFormatLite::MessageSize( 398 *ts_max_); 399 } 400 401 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); 402 SetCachedSize(cached_size); 403 return total_size; 404 } 405 406 void SSTUserProperties::CheckTypeAndMergeFrom( 407 const ::google::protobuf::MessageLite& from) { 408 MergeFrom(*::google::protobuf::down_cast<const SSTUserProperties*>(&from)); 409 } 410 411 void SSTUserProperties::MergeFrom(const SSTUserProperties& from) { 412 // @@protoc_insertion_point(class_specific_merge_from_start:cockroach.storage.enginepb.SSTUserProperties) 413 GOOGLE_DCHECK_NE(&from, this); 414 _internal_metadata_.MergeFrom(from._internal_metadata_); 415 ::google::protobuf::uint32 cached_has_bits = 0; 416 (void) cached_has_bits; 417 418 if (from.path().size() > 0) { 419 420 path_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.path_); 421 } 422 if (from.has_ts_min()) { 423 mutable_ts_min()->::cockroach::util::hlc::Timestamp::MergeFrom(from.ts_min()); 424 } 425 if (from.has_ts_max()) { 426 mutable_ts_max()->::cockroach::util::hlc::Timestamp::MergeFrom(from.ts_max()); 427 } 428 } 429 430 void SSTUserProperties::CopyFrom(const SSTUserProperties& from) { 431 // @@protoc_insertion_point(class_specific_copy_from_start:cockroach.storage.enginepb.SSTUserProperties) 432 if (&from == this) return; 433 Clear(); 434 MergeFrom(from); 435 } 436 437 bool SSTUserProperties::IsInitialized() const { 438 return true; 439 } 440 441 void SSTUserProperties::Swap(SSTUserProperties* other) { 442 if (other == this) return; 443 InternalSwap(other); 444 } 445 void SSTUserProperties::InternalSwap(SSTUserProperties* other) { 446 using std::swap; 447 path_.Swap(&other->path_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), 448 GetArenaNoVirtual()); 449 swap(ts_min_, other->ts_min_); 450 swap(ts_max_, other->ts_max_); 451 _internal_metadata_.Swap(&other->_internal_metadata_); 452 } 453 454 ::std::string SSTUserProperties::GetTypeName() const { 455 return "cockroach.storage.enginepb.SSTUserProperties"; 456 } 457 458 459 // =================================================================== 460 461 void SSTUserPropertiesCollection::InitAsDefaultInstance() { 462 } 463 #if !defined(_MSC_VER) || _MSC_VER >= 1900 464 const int SSTUserPropertiesCollection::kSstFieldNumber; 465 const int SSTUserPropertiesCollection::kErrorFieldNumber; 466 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 467 468 SSTUserPropertiesCollection::SSTUserPropertiesCollection() 469 : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { 470 ::google::protobuf::internal::InitSCC( 471 &protobuf_storage_2fenginepb_2frocksdb_2eproto::scc_info_SSTUserPropertiesCollection.base); 472 SharedCtor(); 473 // @@protoc_insertion_point(constructor:cockroach.storage.enginepb.SSTUserPropertiesCollection) 474 } 475 SSTUserPropertiesCollection::SSTUserPropertiesCollection(const SSTUserPropertiesCollection& from) 476 : ::google::protobuf::MessageLite(), 477 _internal_metadata_(NULL), 478 sst_(from.sst_) { 479 _internal_metadata_.MergeFrom(from._internal_metadata_); 480 error_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 481 if (from.error().size() > 0) { 482 error_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_); 483 } 484 // @@protoc_insertion_point(copy_constructor:cockroach.storage.enginepb.SSTUserPropertiesCollection) 485 } 486 487 void SSTUserPropertiesCollection::SharedCtor() { 488 error_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 489 } 490 491 SSTUserPropertiesCollection::~SSTUserPropertiesCollection() { 492 // @@protoc_insertion_point(destructor:cockroach.storage.enginepb.SSTUserPropertiesCollection) 493 SharedDtor(); 494 } 495 496 void SSTUserPropertiesCollection::SharedDtor() { 497 error_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 498 } 499 500 void SSTUserPropertiesCollection::SetCachedSize(int size) const { 501 _cached_size_.Set(size); 502 } 503 const SSTUserPropertiesCollection& SSTUserPropertiesCollection::default_instance() { 504 ::google::protobuf::internal::InitSCC(&protobuf_storage_2fenginepb_2frocksdb_2eproto::scc_info_SSTUserPropertiesCollection.base); 505 return *internal_default_instance(); 506 } 507 508 509 void SSTUserPropertiesCollection::Clear() { 510 // @@protoc_insertion_point(message_clear_start:cockroach.storage.enginepb.SSTUserPropertiesCollection) 511 ::google::protobuf::uint32 cached_has_bits = 0; 512 // Prevent compiler warnings about cached_has_bits being unused 513 (void) cached_has_bits; 514 515 sst_.Clear(); 516 error_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 517 _internal_metadata_.Clear(); 518 } 519 520 bool SSTUserPropertiesCollection::MergePartialFromCodedStream( 521 ::google::protobuf::io::CodedInputStream* input) { 522 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure 523 ::google::protobuf::uint32 tag; 524 ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter( 525 &_internal_metadata_); 526 ::google::protobuf::io::StringOutputStream unknown_fields_output( 527 unknown_fields_setter.buffer()); 528 ::google::protobuf::io::CodedOutputStream unknown_fields_stream( 529 &unknown_fields_output, false); 530 // @@protoc_insertion_point(parse_start:cockroach.storage.enginepb.SSTUserPropertiesCollection) 531 for (;;) { 532 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); 533 tag = p.first; 534 if (!p.second) goto handle_unusual; 535 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { 536 case 1: { 537 if (static_cast< ::google::protobuf::uint8>(tag) == 538 static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { 539 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( 540 input, add_sst())); 541 } else { 542 goto handle_unusual; 543 } 544 break; 545 } 546 547 // string error = 2; 548 case 2: { 549 if (static_cast< ::google::protobuf::uint8>(tag) == 550 static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { 551 DO_(::google::protobuf::internal::WireFormatLite::ReadString( 552 input, this->mutable_error())); 553 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( 554 this->error().data(), static_cast<int>(this->error().length()), 555 ::google::protobuf::internal::WireFormatLite::PARSE, 556 "cockroach.storage.enginepb.SSTUserPropertiesCollection.error")); 557 } else { 558 goto handle_unusual; 559 } 560 break; 561 } 562 563 default: { 564 handle_unusual: 565 if (tag == 0) { 566 goto success; 567 } 568 DO_(::google::protobuf::internal::WireFormatLite::SkipField( 569 input, tag, &unknown_fields_stream)); 570 break; 571 } 572 } 573 } 574 success: 575 // @@protoc_insertion_point(parse_success:cockroach.storage.enginepb.SSTUserPropertiesCollection) 576 return true; 577 failure: 578 // @@protoc_insertion_point(parse_failure:cockroach.storage.enginepb.SSTUserPropertiesCollection) 579 return false; 580 #undef DO_ 581 } 582 583 void SSTUserPropertiesCollection::SerializeWithCachedSizes( 584 ::google::protobuf::io::CodedOutputStream* output) const { 585 // @@protoc_insertion_point(serialize_start:cockroach.storage.enginepb.SSTUserPropertiesCollection) 586 ::google::protobuf::uint32 cached_has_bits = 0; 587 (void) cached_has_bits; 588 589 for (unsigned int i = 0, 590 n = static_cast<unsigned int>(this->sst_size()); i < n; i++) { 591 ::google::protobuf::internal::WireFormatLite::WriteMessage( 592 1, 593 this->sst(static_cast<int>(i)), 594 output); 595 } 596 597 // string error = 2; 598 if (this->error().size() > 0) { 599 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( 600 this->error().data(), static_cast<int>(this->error().length()), 601 ::google::protobuf::internal::WireFormatLite::SERIALIZE, 602 "cockroach.storage.enginepb.SSTUserPropertiesCollection.error"); 603 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 604 2, this->error(), output); 605 } 606 607 output->WriteRaw((::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).data(), 608 static_cast<int>((::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).size())); 609 // @@protoc_insertion_point(serialize_end:cockroach.storage.enginepb.SSTUserPropertiesCollection) 610 } 611 612 size_t SSTUserPropertiesCollection::ByteSizeLong() const { 613 // @@protoc_insertion_point(message_byte_size_start:cockroach.storage.enginepb.SSTUserPropertiesCollection) 614 size_t total_size = 0; 615 616 total_size += (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).size(); 617 618 { 619 unsigned int count = static_cast<unsigned int>(this->sst_size()); 620 total_size += 1UL * count; 621 for (unsigned int i = 0; i < count; i++) { 622 total_size += 623 ::google::protobuf::internal::WireFormatLite::MessageSize( 624 this->sst(static_cast<int>(i))); 625 } 626 } 627 628 // string error = 2; 629 if (this->error().size() > 0) { 630 total_size += 1 + 631 ::google::protobuf::internal::WireFormatLite::StringSize( 632 this->error()); 633 } 634 635 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); 636 SetCachedSize(cached_size); 637 return total_size; 638 } 639 640 void SSTUserPropertiesCollection::CheckTypeAndMergeFrom( 641 const ::google::protobuf::MessageLite& from) { 642 MergeFrom(*::google::protobuf::down_cast<const SSTUserPropertiesCollection*>(&from)); 643 } 644 645 void SSTUserPropertiesCollection::MergeFrom(const SSTUserPropertiesCollection& from) { 646 // @@protoc_insertion_point(class_specific_merge_from_start:cockroach.storage.enginepb.SSTUserPropertiesCollection) 647 GOOGLE_DCHECK_NE(&from, this); 648 _internal_metadata_.MergeFrom(from._internal_metadata_); 649 ::google::protobuf::uint32 cached_has_bits = 0; 650 (void) cached_has_bits; 651 652 sst_.MergeFrom(from.sst_); 653 if (from.error().size() > 0) { 654 655 error_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_); 656 } 657 } 658 659 void SSTUserPropertiesCollection::CopyFrom(const SSTUserPropertiesCollection& from) { 660 // @@protoc_insertion_point(class_specific_copy_from_start:cockroach.storage.enginepb.SSTUserPropertiesCollection) 661 if (&from == this) return; 662 Clear(); 663 MergeFrom(from); 664 } 665 666 bool SSTUserPropertiesCollection::IsInitialized() const { 667 return true; 668 } 669 670 void SSTUserPropertiesCollection::Swap(SSTUserPropertiesCollection* other) { 671 if (other == this) return; 672 InternalSwap(other); 673 } 674 void SSTUserPropertiesCollection::InternalSwap(SSTUserPropertiesCollection* other) { 675 using std::swap; 676 CastToBase(&sst_)->InternalSwap(CastToBase(&other->sst_)); 677 error_.Swap(&other->error_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), 678 GetArenaNoVirtual()); 679 _internal_metadata_.Swap(&other->_internal_metadata_); 680 } 681 682 ::std::string SSTUserPropertiesCollection::GetTypeName() const { 683 return "cockroach.storage.enginepb.SSTUserPropertiesCollection"; 684 } 685 686 687 // =================================================================== 688 689 void HistogramData::InitAsDefaultInstance() { 690 } 691 #if !defined(_MSC_VER) || _MSC_VER >= 1900 692 const int HistogramData::kMeanFieldNumber; 693 const int HistogramData::kP50FieldNumber; 694 const int HistogramData::kP95FieldNumber; 695 const int HistogramData::kP99FieldNumber; 696 const int HistogramData::kMaxFieldNumber; 697 const int HistogramData::kCountFieldNumber; 698 const int HistogramData::kSumFieldNumber; 699 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 700 701 HistogramData::HistogramData() 702 : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { 703 ::google::protobuf::internal::InitSCC( 704 &protobuf_storage_2fenginepb_2frocksdb_2eproto::scc_info_HistogramData.base); 705 SharedCtor(); 706 // @@protoc_insertion_point(constructor:cockroach.storage.enginepb.HistogramData) 707 } 708 HistogramData::HistogramData(const HistogramData& from) 709 : ::google::protobuf::MessageLite(), 710 _internal_metadata_(NULL) { 711 _internal_metadata_.MergeFrom(from._internal_metadata_); 712 ::memcpy(&mean_, &from.mean_, 713 static_cast<size_t>(reinterpret_cast<char*>(&sum_) - 714 reinterpret_cast<char*>(&mean_)) + sizeof(sum_)); 715 // @@protoc_insertion_point(copy_constructor:cockroach.storage.enginepb.HistogramData) 716 } 717 718 void HistogramData::SharedCtor() { 719 ::memset(&mean_, 0, static_cast<size_t>( 720 reinterpret_cast<char*>(&sum_) - 721 reinterpret_cast<char*>(&mean_)) + sizeof(sum_)); 722 } 723 724 HistogramData::~HistogramData() { 725 // @@protoc_insertion_point(destructor:cockroach.storage.enginepb.HistogramData) 726 SharedDtor(); 727 } 728 729 void HistogramData::SharedDtor() { 730 } 731 732 void HistogramData::SetCachedSize(int size) const { 733 _cached_size_.Set(size); 734 } 735 const HistogramData& HistogramData::default_instance() { 736 ::google::protobuf::internal::InitSCC(&protobuf_storage_2fenginepb_2frocksdb_2eproto::scc_info_HistogramData.base); 737 return *internal_default_instance(); 738 } 739 740 741 void HistogramData::Clear() { 742 // @@protoc_insertion_point(message_clear_start:cockroach.storage.enginepb.HistogramData) 743 ::google::protobuf::uint32 cached_has_bits = 0; 744 // Prevent compiler warnings about cached_has_bits being unused 745 (void) cached_has_bits; 746 747 ::memset(&mean_, 0, static_cast<size_t>( 748 reinterpret_cast<char*>(&sum_) - 749 reinterpret_cast<char*>(&mean_)) + sizeof(sum_)); 750 _internal_metadata_.Clear(); 751 } 752 753 bool HistogramData::MergePartialFromCodedStream( 754 ::google::protobuf::io::CodedInputStream* input) { 755 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure 756 ::google::protobuf::uint32 tag; 757 ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter( 758 &_internal_metadata_); 759 ::google::protobuf::io::StringOutputStream unknown_fields_output( 760 unknown_fields_setter.buffer()); 761 ::google::protobuf::io::CodedOutputStream unknown_fields_stream( 762 &unknown_fields_output, false); 763 // @@protoc_insertion_point(parse_start:cockroach.storage.enginepb.HistogramData) 764 for (;;) { 765 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); 766 tag = p.first; 767 if (!p.second) goto handle_unusual; 768 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { 769 // double mean = 1; 770 case 1: { 771 if (static_cast< ::google::protobuf::uint8>(tag) == 772 static_cast< ::google::protobuf::uint8>(9u /* 9 & 0xFF */)) { 773 774 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 775 double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( 776 input, &mean_))); 777 } else { 778 goto handle_unusual; 779 } 780 break; 781 } 782 783 // double p50 = 2; 784 case 2: { 785 if (static_cast< ::google::protobuf::uint8>(tag) == 786 static_cast< ::google::protobuf::uint8>(17u /* 17 & 0xFF */)) { 787 788 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 789 double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( 790 input, &p50_))); 791 } else { 792 goto handle_unusual; 793 } 794 break; 795 } 796 797 // double p95 = 3; 798 case 3: { 799 if (static_cast< ::google::protobuf::uint8>(tag) == 800 static_cast< ::google::protobuf::uint8>(25u /* 25 & 0xFF */)) { 801 802 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 803 double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( 804 input, &p95_))); 805 } else { 806 goto handle_unusual; 807 } 808 break; 809 } 810 811 // double p99 = 4; 812 case 4: { 813 if (static_cast< ::google::protobuf::uint8>(tag) == 814 static_cast< ::google::protobuf::uint8>(33u /* 33 & 0xFF */)) { 815 816 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 817 double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( 818 input, &p99_))); 819 } else { 820 goto handle_unusual; 821 } 822 break; 823 } 824 825 // double max = 5; 826 case 5: { 827 if (static_cast< ::google::protobuf::uint8>(tag) == 828 static_cast< ::google::protobuf::uint8>(41u /* 41 & 0xFF */)) { 829 830 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 831 double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( 832 input, &max_))); 833 } else { 834 goto handle_unusual; 835 } 836 break; 837 } 838 839 // uint64 count = 6; 840 case 6: { 841 if (static_cast< ::google::protobuf::uint8>(tag) == 842 static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) { 843 844 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 845 ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( 846 input, &count_))); 847 } else { 848 goto handle_unusual; 849 } 850 break; 851 } 852 853 // uint64 sum = 7; 854 case 7: { 855 if (static_cast< ::google::protobuf::uint8>(tag) == 856 static_cast< ::google::protobuf::uint8>(56u /* 56 & 0xFF */)) { 857 858 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 859 ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( 860 input, &sum_))); 861 } else { 862 goto handle_unusual; 863 } 864 break; 865 } 866 867 default: { 868 handle_unusual: 869 if (tag == 0) { 870 goto success; 871 } 872 DO_(::google::protobuf::internal::WireFormatLite::SkipField( 873 input, tag, &unknown_fields_stream)); 874 break; 875 } 876 } 877 } 878 success: 879 // @@protoc_insertion_point(parse_success:cockroach.storage.enginepb.HistogramData) 880 return true; 881 failure: 882 // @@protoc_insertion_point(parse_failure:cockroach.storage.enginepb.HistogramData) 883 return false; 884 #undef DO_ 885 } 886 887 void HistogramData::SerializeWithCachedSizes( 888 ::google::protobuf::io::CodedOutputStream* output) const { 889 // @@protoc_insertion_point(serialize_start:cockroach.storage.enginepb.HistogramData) 890 ::google::protobuf::uint32 cached_has_bits = 0; 891 (void) cached_has_bits; 892 893 // double mean = 1; 894 if (this->mean() != 0) { 895 ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->mean(), output); 896 } 897 898 // double p50 = 2; 899 if (this->p50() != 0) { 900 ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->p50(), output); 901 } 902 903 // double p95 = 3; 904 if (this->p95() != 0) { 905 ::google::protobuf::internal::WireFormatLite::WriteDouble(3, this->p95(), output); 906 } 907 908 // double p99 = 4; 909 if (this->p99() != 0) { 910 ::google::protobuf::internal::WireFormatLite::WriteDouble(4, this->p99(), output); 911 } 912 913 // double max = 5; 914 if (this->max() != 0) { 915 ::google::protobuf::internal::WireFormatLite::WriteDouble(5, this->max(), output); 916 } 917 918 // uint64 count = 6; 919 if (this->count() != 0) { 920 ::google::protobuf::internal::WireFormatLite::WriteUInt64(6, this->count(), output); 921 } 922 923 // uint64 sum = 7; 924 if (this->sum() != 0) { 925 ::google::protobuf::internal::WireFormatLite::WriteUInt64(7, this->sum(), output); 926 } 927 928 output->WriteRaw((::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).data(), 929 static_cast<int>((::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).size())); 930 // @@protoc_insertion_point(serialize_end:cockroach.storage.enginepb.HistogramData) 931 } 932 933 size_t HistogramData::ByteSizeLong() const { 934 // @@protoc_insertion_point(message_byte_size_start:cockroach.storage.enginepb.HistogramData) 935 size_t total_size = 0; 936 937 total_size += (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).size(); 938 939 // double mean = 1; 940 if (this->mean() != 0) { 941 total_size += 1 + 8; 942 } 943 944 // double p50 = 2; 945 if (this->p50() != 0) { 946 total_size += 1 + 8; 947 } 948 949 // double p95 = 3; 950 if (this->p95() != 0) { 951 total_size += 1 + 8; 952 } 953 954 // double p99 = 4; 955 if (this->p99() != 0) { 956 total_size += 1 + 8; 957 } 958 959 // double max = 5; 960 if (this->max() != 0) { 961 total_size += 1 + 8; 962 } 963 964 // uint64 count = 6; 965 if (this->count() != 0) { 966 total_size += 1 + 967 ::google::protobuf::internal::WireFormatLite::UInt64Size( 968 this->count()); 969 } 970 971 // uint64 sum = 7; 972 if (this->sum() != 0) { 973 total_size += 1 + 974 ::google::protobuf::internal::WireFormatLite::UInt64Size( 975 this->sum()); 976 } 977 978 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); 979 SetCachedSize(cached_size); 980 return total_size; 981 } 982 983 void HistogramData::CheckTypeAndMergeFrom( 984 const ::google::protobuf::MessageLite& from) { 985 MergeFrom(*::google::protobuf::down_cast<const HistogramData*>(&from)); 986 } 987 988 void HistogramData::MergeFrom(const HistogramData& from) { 989 // @@protoc_insertion_point(class_specific_merge_from_start:cockroach.storage.enginepb.HistogramData) 990 GOOGLE_DCHECK_NE(&from, this); 991 _internal_metadata_.MergeFrom(from._internal_metadata_); 992 ::google::protobuf::uint32 cached_has_bits = 0; 993 (void) cached_has_bits; 994 995 if (from.mean() != 0) { 996 set_mean(from.mean()); 997 } 998 if (from.p50() != 0) { 999 set_p50(from.p50()); 1000 } 1001 if (from.p95() != 0) { 1002 set_p95(from.p95()); 1003 } 1004 if (from.p99() != 0) { 1005 set_p99(from.p99()); 1006 } 1007 if (from.max() != 0) { 1008 set_max(from.max()); 1009 } 1010 if (from.count() != 0) { 1011 set_count(from.count()); 1012 } 1013 if (from.sum() != 0) { 1014 set_sum(from.sum()); 1015 } 1016 } 1017 1018 void HistogramData::CopyFrom(const HistogramData& from) { 1019 // @@protoc_insertion_point(class_specific_copy_from_start:cockroach.storage.enginepb.HistogramData) 1020 if (&from == this) return; 1021 Clear(); 1022 MergeFrom(from); 1023 } 1024 1025 bool HistogramData::IsInitialized() const { 1026 return true; 1027 } 1028 1029 void HistogramData::Swap(HistogramData* other) { 1030 if (other == this) return; 1031 InternalSwap(other); 1032 } 1033 void HistogramData::InternalSwap(HistogramData* other) { 1034 using std::swap; 1035 swap(mean_, other->mean_); 1036 swap(p50_, other->p50_); 1037 swap(p95_, other->p95_); 1038 swap(p99_, other->p99_); 1039 swap(max_, other->max_); 1040 swap(count_, other->count_); 1041 swap(sum_, other->sum_); 1042 _internal_metadata_.Swap(&other->_internal_metadata_); 1043 } 1044 1045 ::std::string HistogramData::GetTypeName() const { 1046 return "cockroach.storage.enginepb.HistogramData"; 1047 } 1048 1049 1050 // =================================================================== 1051 1052 TickersAndHistograms_TickersEntry_DoNotUse::TickersAndHistograms_TickersEntry_DoNotUse() {} 1053 TickersAndHistograms_TickersEntry_DoNotUse::TickersAndHistograms_TickersEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {} 1054 void TickersAndHistograms_TickersEntry_DoNotUse::MergeFrom(const TickersAndHistograms_TickersEntry_DoNotUse& other) { 1055 MergeFromInternal(other); 1056 } 1057 1058 // =================================================================== 1059 1060 TickersAndHistograms_HistogramsEntry_DoNotUse::TickersAndHistograms_HistogramsEntry_DoNotUse() {} 1061 TickersAndHistograms_HistogramsEntry_DoNotUse::TickersAndHistograms_HistogramsEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {} 1062 void TickersAndHistograms_HistogramsEntry_DoNotUse::MergeFrom(const TickersAndHistograms_HistogramsEntry_DoNotUse& other) { 1063 MergeFromInternal(other); 1064 } 1065 1066 // =================================================================== 1067 1068 void TickersAndHistograms::InitAsDefaultInstance() { 1069 } 1070 #if !defined(_MSC_VER) || _MSC_VER >= 1900 1071 const int TickersAndHistograms::kTickersFieldNumber; 1072 const int TickersAndHistograms::kHistogramsFieldNumber; 1073 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 1074 1075 TickersAndHistograms::TickersAndHistograms() 1076 : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { 1077 ::google::protobuf::internal::InitSCC( 1078 &protobuf_storage_2fenginepb_2frocksdb_2eproto::scc_info_TickersAndHistograms.base); 1079 SharedCtor(); 1080 // @@protoc_insertion_point(constructor:cockroach.storage.enginepb.TickersAndHistograms) 1081 } 1082 TickersAndHistograms::TickersAndHistograms(const TickersAndHistograms& from) 1083 : ::google::protobuf::MessageLite(), 1084 _internal_metadata_(NULL) { 1085 _internal_metadata_.MergeFrom(from._internal_metadata_); 1086 tickers_.MergeFrom(from.tickers_); 1087 histograms_.MergeFrom(from.histograms_); 1088 // @@protoc_insertion_point(copy_constructor:cockroach.storage.enginepb.TickersAndHistograms) 1089 } 1090 1091 void TickersAndHistograms::SharedCtor() { 1092 } 1093 1094 TickersAndHistograms::~TickersAndHistograms() { 1095 // @@protoc_insertion_point(destructor:cockroach.storage.enginepb.TickersAndHistograms) 1096 SharedDtor(); 1097 } 1098 1099 void TickersAndHistograms::SharedDtor() { 1100 } 1101 1102 void TickersAndHistograms::SetCachedSize(int size) const { 1103 _cached_size_.Set(size); 1104 } 1105 const TickersAndHistograms& TickersAndHistograms::default_instance() { 1106 ::google::protobuf::internal::InitSCC(&protobuf_storage_2fenginepb_2frocksdb_2eproto::scc_info_TickersAndHistograms.base); 1107 return *internal_default_instance(); 1108 } 1109 1110 1111 void TickersAndHistograms::Clear() { 1112 // @@protoc_insertion_point(message_clear_start:cockroach.storage.enginepb.TickersAndHistograms) 1113 ::google::protobuf::uint32 cached_has_bits = 0; 1114 // Prevent compiler warnings about cached_has_bits being unused 1115 (void) cached_has_bits; 1116 1117 tickers_.Clear(); 1118 histograms_.Clear(); 1119 _internal_metadata_.Clear(); 1120 } 1121 1122 bool TickersAndHistograms::MergePartialFromCodedStream( 1123 ::google::protobuf::io::CodedInputStream* input) { 1124 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure 1125 ::google::protobuf::uint32 tag; 1126 ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter( 1127 &_internal_metadata_); 1128 ::google::protobuf::io::StringOutputStream unknown_fields_output( 1129 unknown_fields_setter.buffer()); 1130 ::google::protobuf::io::CodedOutputStream unknown_fields_stream( 1131 &unknown_fields_output, false); 1132 // @@protoc_insertion_point(parse_start:cockroach.storage.enginepb.TickersAndHistograms) 1133 for (;;) { 1134 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); 1135 tag = p.first; 1136 if (!p.second) goto handle_unusual; 1137 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { 1138 // map<string, uint64> tickers = 1; 1139 case 1: { 1140 if (static_cast< ::google::protobuf::uint8>(tag) == 1141 static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { 1142 TickersAndHistograms_TickersEntry_DoNotUse::Parser< ::google::protobuf::internal::MapFieldLite< 1143 TickersAndHistograms_TickersEntry_DoNotUse, 1144 ::std::string, ::google::protobuf::uint64, 1145 ::google::protobuf::internal::WireFormatLite::TYPE_STRING, 1146 ::google::protobuf::internal::WireFormatLite::TYPE_UINT64, 1147 0 >, 1148 ::google::protobuf::Map< ::std::string, ::google::protobuf::uint64 > > parser(&tickers_); 1149 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( 1150 input, &parser)); 1151 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( 1152 parser.key().data(), static_cast<int>(parser.key().length()), 1153 ::google::protobuf::internal::WireFormatLite::PARSE, 1154 "cockroach.storage.enginepb.TickersAndHistograms.TickersEntry.key")); 1155 } else { 1156 goto handle_unusual; 1157 } 1158 break; 1159 } 1160 1161 case 2: { 1162 if (static_cast< ::google::protobuf::uint8>(tag) == 1163 static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { 1164 TickersAndHistograms_HistogramsEntry_DoNotUse::Parser< ::google::protobuf::internal::MapFieldLite< 1165 TickersAndHistograms_HistogramsEntry_DoNotUse, 1166 ::std::string, ::cockroach::storage::enginepb::HistogramData, 1167 ::google::protobuf::internal::WireFormatLite::TYPE_STRING, 1168 ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, 1169 0 >, 1170 ::google::protobuf::Map< ::std::string, ::cockroach::storage::enginepb::HistogramData > > parser(&histograms_); 1171 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( 1172 input, &parser)); 1173 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( 1174 parser.key().data(), static_cast<int>(parser.key().length()), 1175 ::google::protobuf::internal::WireFormatLite::PARSE, 1176 "cockroach.storage.enginepb.TickersAndHistograms.HistogramsEntry.key")); 1177 } else { 1178 goto handle_unusual; 1179 } 1180 break; 1181 } 1182 1183 default: { 1184 handle_unusual: 1185 if (tag == 0) { 1186 goto success; 1187 } 1188 DO_(::google::protobuf::internal::WireFormatLite::SkipField( 1189 input, tag, &unknown_fields_stream)); 1190 break; 1191 } 1192 } 1193 } 1194 success: 1195 // @@protoc_insertion_point(parse_success:cockroach.storage.enginepb.TickersAndHistograms) 1196 return true; 1197 failure: 1198 // @@protoc_insertion_point(parse_failure:cockroach.storage.enginepb.TickersAndHistograms) 1199 return false; 1200 #undef DO_ 1201 } 1202 1203 void TickersAndHistograms::SerializeWithCachedSizes( 1204 ::google::protobuf::io::CodedOutputStream* output) const { 1205 // @@protoc_insertion_point(serialize_start:cockroach.storage.enginepb.TickersAndHistograms) 1206 ::google::protobuf::uint32 cached_has_bits = 0; 1207 (void) cached_has_bits; 1208 1209 // map<string, uint64> tickers = 1; 1210 if (!this->tickers().empty()) { 1211 typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::uint64 >::const_pointer 1212 ConstPtr; 1213 typedef ConstPtr SortItem; 1214 typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less; 1215 struct Utf8Check { 1216 static void Check(ConstPtr p) { 1217 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( 1218 p->first.data(), static_cast<int>(p->first.length()), 1219 ::google::protobuf::internal::WireFormatLite::SERIALIZE, 1220 "cockroach.storage.enginepb.TickersAndHistograms.TickersEntry.key"); 1221 } 1222 }; 1223 1224 if (output->IsSerializationDeterministic() && 1225 this->tickers().size() > 1) { 1226 ::std::unique_ptr<SortItem[]> items( 1227 new SortItem[this->tickers().size()]); 1228 typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::uint64 >::size_type size_type; 1229 size_type n = 0; 1230 for (::google::protobuf::Map< ::std::string, ::google::protobuf::uint64 >::const_iterator 1231 it = this->tickers().begin(); 1232 it != this->tickers().end(); ++it, ++n) { 1233 items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); 1234 } 1235 ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); 1236 ::std::unique_ptr<TickersAndHistograms_TickersEntry_DoNotUse> entry; 1237 for (size_type i = 0; i < n; i++) { 1238 entry.reset(tickers_.NewEntryWrapper( 1239 items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second)); 1240 ::google::protobuf::internal::WireFormatLite::WriteMessage( 1241 1, *entry, output); 1242 Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]); 1243 } 1244 } else { 1245 ::std::unique_ptr<TickersAndHistograms_TickersEntry_DoNotUse> entry; 1246 for (::google::protobuf::Map< ::std::string, ::google::protobuf::uint64 >::const_iterator 1247 it = this->tickers().begin(); 1248 it != this->tickers().end(); ++it) { 1249 entry.reset(tickers_.NewEntryWrapper( 1250 it->first, it->second)); 1251 ::google::protobuf::internal::WireFormatLite::WriteMessage( 1252 1, *entry, output); 1253 Utf8Check::Check(&*it); 1254 } 1255 } 1256 } 1257 1258 if (!this->histograms().empty()) { 1259 typedef ::google::protobuf::Map< ::std::string, ::cockroach::storage::enginepb::HistogramData >::const_pointer 1260 ConstPtr; 1261 typedef ConstPtr SortItem; 1262 typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less; 1263 struct Utf8Check { 1264 static void Check(ConstPtr p) { 1265 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( 1266 p->first.data(), static_cast<int>(p->first.length()), 1267 ::google::protobuf::internal::WireFormatLite::SERIALIZE, 1268 "cockroach.storage.enginepb.TickersAndHistograms.HistogramsEntry.key"); 1269 } 1270 }; 1271 1272 if (output->IsSerializationDeterministic() && 1273 this->histograms().size() > 1) { 1274 ::std::unique_ptr<SortItem[]> items( 1275 new SortItem[this->histograms().size()]); 1276 typedef ::google::protobuf::Map< ::std::string, ::cockroach::storage::enginepb::HistogramData >::size_type size_type; 1277 size_type n = 0; 1278 for (::google::protobuf::Map< ::std::string, ::cockroach::storage::enginepb::HistogramData >::const_iterator 1279 it = this->histograms().begin(); 1280 it != this->histograms().end(); ++it, ++n) { 1281 items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); 1282 } 1283 ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); 1284 ::std::unique_ptr<TickersAndHistograms_HistogramsEntry_DoNotUse> entry; 1285 for (size_type i = 0; i < n; i++) { 1286 entry.reset(histograms_.NewEntryWrapper( 1287 items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second)); 1288 ::google::protobuf::internal::WireFormatLite::WriteMessage( 1289 2, *entry, output); 1290 Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]); 1291 } 1292 } else { 1293 ::std::unique_ptr<TickersAndHistograms_HistogramsEntry_DoNotUse> entry; 1294 for (::google::protobuf::Map< ::std::string, ::cockroach::storage::enginepb::HistogramData >::const_iterator 1295 it = this->histograms().begin(); 1296 it != this->histograms().end(); ++it) { 1297 entry.reset(histograms_.NewEntryWrapper( 1298 it->first, it->second)); 1299 ::google::protobuf::internal::WireFormatLite::WriteMessage( 1300 2, *entry, output); 1301 Utf8Check::Check(&*it); 1302 } 1303 } 1304 } 1305 1306 output->WriteRaw((::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).data(), 1307 static_cast<int>((::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).size())); 1308 // @@protoc_insertion_point(serialize_end:cockroach.storage.enginepb.TickersAndHistograms) 1309 } 1310 1311 size_t TickersAndHistograms::ByteSizeLong() const { 1312 // @@protoc_insertion_point(message_byte_size_start:cockroach.storage.enginepb.TickersAndHistograms) 1313 size_t total_size = 0; 1314 1315 total_size += (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).size(); 1316 1317 // map<string, uint64> tickers = 1; 1318 total_size += 1 * 1319 ::google::protobuf::internal::FromIntSize(this->tickers_size()); 1320 { 1321 ::std::unique_ptr<TickersAndHistograms_TickersEntry_DoNotUse> entry; 1322 for (::google::protobuf::Map< ::std::string, ::google::protobuf::uint64 >::const_iterator 1323 it = this->tickers().begin(); 1324 it != this->tickers().end(); ++it) { 1325 entry.reset(tickers_.NewEntryWrapper(it->first, it->second)); 1326 total_size += ::google::protobuf::internal::WireFormatLite:: 1327 MessageSizeNoVirtual(*entry); 1328 } 1329 } 1330 1331 total_size += 1 * 1332 ::google::protobuf::internal::FromIntSize(this->histograms_size()); 1333 { 1334 ::std::unique_ptr<TickersAndHistograms_HistogramsEntry_DoNotUse> entry; 1335 for (::google::protobuf::Map< ::std::string, ::cockroach::storage::enginepb::HistogramData >::const_iterator 1336 it = this->histograms().begin(); 1337 it != this->histograms().end(); ++it) { 1338 entry.reset(histograms_.NewEntryWrapper(it->first, it->second)); 1339 total_size += ::google::protobuf::internal::WireFormatLite:: 1340 MessageSizeNoVirtual(*entry); 1341 } 1342 } 1343 1344 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); 1345 SetCachedSize(cached_size); 1346 return total_size; 1347 } 1348 1349 void TickersAndHistograms::CheckTypeAndMergeFrom( 1350 const ::google::protobuf::MessageLite& from) { 1351 MergeFrom(*::google::protobuf::down_cast<const TickersAndHistograms*>(&from)); 1352 } 1353 1354 void TickersAndHistograms::MergeFrom(const TickersAndHistograms& from) { 1355 // @@protoc_insertion_point(class_specific_merge_from_start:cockroach.storage.enginepb.TickersAndHistograms) 1356 GOOGLE_DCHECK_NE(&from, this); 1357 _internal_metadata_.MergeFrom(from._internal_metadata_); 1358 ::google::protobuf::uint32 cached_has_bits = 0; 1359 (void) cached_has_bits; 1360 1361 tickers_.MergeFrom(from.tickers_); 1362 histograms_.MergeFrom(from.histograms_); 1363 } 1364 1365 void TickersAndHistograms::CopyFrom(const TickersAndHistograms& from) { 1366 // @@protoc_insertion_point(class_specific_copy_from_start:cockroach.storage.enginepb.TickersAndHistograms) 1367 if (&from == this) return; 1368 Clear(); 1369 MergeFrom(from); 1370 } 1371 1372 bool TickersAndHistograms::IsInitialized() const { 1373 return true; 1374 } 1375 1376 void TickersAndHistograms::Swap(TickersAndHistograms* other) { 1377 if (other == this) return; 1378 InternalSwap(other); 1379 } 1380 void TickersAndHistograms::InternalSwap(TickersAndHistograms* other) { 1381 using std::swap; 1382 tickers_.Swap(&other->tickers_); 1383 histograms_.Swap(&other->histograms_); 1384 _internal_metadata_.Swap(&other->_internal_metadata_); 1385 } 1386 1387 ::std::string TickersAndHistograms::GetTypeName() const { 1388 return "cockroach.storage.enginepb.TickersAndHistograms"; 1389 } 1390 1391 1392 // @@protoc_insertion_point(namespace_scope) 1393 } // namespace enginepb 1394 } // namespace storage 1395 } // namespace cockroach 1396 namespace google { 1397 namespace protobuf { 1398 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cockroach::storage::enginepb::SSTUserProperties* Arena::CreateMaybeMessage< ::cockroach::storage::enginepb::SSTUserProperties >(Arena* arena) { 1399 return Arena::CreateInternal< ::cockroach::storage::enginepb::SSTUserProperties >(arena); 1400 } 1401 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cockroach::storage::enginepb::SSTUserPropertiesCollection* Arena::CreateMaybeMessage< ::cockroach::storage::enginepb::SSTUserPropertiesCollection >(Arena* arena) { 1402 return Arena::CreateInternal< ::cockroach::storage::enginepb::SSTUserPropertiesCollection >(arena); 1403 } 1404 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cockroach::storage::enginepb::HistogramData* Arena::CreateMaybeMessage< ::cockroach::storage::enginepb::HistogramData >(Arena* arena) { 1405 return Arena::CreateInternal< ::cockroach::storage::enginepb::HistogramData >(arena); 1406 } 1407 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cockroach::storage::enginepb::TickersAndHistograms_TickersEntry_DoNotUse* Arena::CreateMaybeMessage< ::cockroach::storage::enginepb::TickersAndHistograms_TickersEntry_DoNotUse >(Arena* arena) { 1408 return Arena::CreateInternal< ::cockroach::storage::enginepb::TickersAndHistograms_TickersEntry_DoNotUse >(arena); 1409 } 1410 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cockroach::storage::enginepb::TickersAndHistograms_HistogramsEntry_DoNotUse* Arena::CreateMaybeMessage< ::cockroach::storage::enginepb::TickersAndHistograms_HistogramsEntry_DoNotUse >(Arena* arena) { 1411 return Arena::CreateInternal< ::cockroach::storage::enginepb::TickersAndHistograms_HistogramsEntry_DoNotUse >(arena); 1412 } 1413 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cockroach::storage::enginepb::TickersAndHistograms* Arena::CreateMaybeMessage< ::cockroach::storage::enginepb::TickersAndHistograms >(Arena* arena) { 1414 return Arena::CreateInternal< ::cockroach::storage::enginepb::TickersAndHistograms >(arena); 1415 } 1416 } // namespace protobuf 1417 } // namespace google 1418 1419 // @@protoc_insertion_point(global_scope)