/**
 * Autogenerated by Thrift for /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_fbthrift/fbthrift/work/fbthrift-2024.07.29.00/thrift/lib/thrift/serverdbginfo.thrift
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated @nocommit
 */
#pragma once

#include "thrift/lib/thrift/gen-cpp2/serverdbginfo_types.h"

#include <thrift/lib/cpp2/gen/module_types_tcc.h>


namespace apache {
namespace thrift {
namespace detail {

template <>
struct TccStructTraits<::apache::thrift::serverdbginfo::RequestPileDbgInfo> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::serverdbginfo::ConcurrencyControllerDbgInfo> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::serverdbginfo::ExecutorDbgInfo> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::serverdbginfo::ResourcePoolDbgInfo> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::serverdbginfo::CPUConcurrencyControllerDbgInfo> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::serverdbginfo::ResourcePoolsDbgInfo> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};

} // namespace detail
} // namespace thrift
} // namespace apache

namespace apache::thrift::serverdbginfo {

template <class Protocol_>
void RequestPileDbgInfo::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          1,
          apache::thrift::protocol::T_STRING))) {
    goto _advance_failure;
  }
_readField_name:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::readWithContext(*iprot, this->__fbthrift_field_name, _readState);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          2,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_prioritiesCount:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::readWithContext(*iprot, this->__fbthrift_field_prioritiesCount, _readState);
    
  }
 this->__isset.set(1, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          2,
          3,
          apache::thrift::protocol::T_LIST))) {
    goto _advance_failure;
  }
_readField_bucketsPerPriority:
  {
    _readState.beforeSubobject(iprot);
    this->__fbthrift_field_bucketsPerPriority = ::std::vector<::std::int64_t>();
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::type_class::integral>, ::std::vector<::std::int64_t>>::readWithContext(*iprot, this->__fbthrift_field_bucketsPerPriority, _readState);
    _readState.afterSubobject(iprot);
    
  }
 this->__isset.set(2, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          3,
          4,
          apache::thrift::protocol::T_I64))) {
    goto _advance_failure;
  }
_readField_perBucketRequestLimit:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::readWithContext(*iprot, this->__fbthrift_field_perBucketRequestLimit, _readState);
    
  }
 this->__isset.set(3, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          4,
          5,
          apache::thrift::protocol::T_I64))) {
    goto _advance_failure;
  }
_readField_totalRequestsLimit:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::readWithContext(*iprot, this->__fbthrift_field_totalRequestsLimit, _readState);
    
  }
 this->__isset.set(4, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          5,
          6,
          apache::thrift::protocol::T_I64))) {
    goto _advance_failure;
  }
_readField_queuedRequestsCount:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::readWithContext(*iprot, this->__fbthrift_field_queuedRequestsCount, _readState);
    
  }
 this->__isset.set(5, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          6,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<RequestPileDbgInfo>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRING))) {
        goto _readField_name;
      } else {
        goto _skip;
      }
    }
    case 2:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_prioritiesCount;
      } else {
        goto _skip;
      }
    }
    case 3:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_LIST))) {
        goto _readField_bucketsPerPriority;
      } else {
        goto _skip;
      }
    }
    case 4:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I64))) {
        goto _readField_perBucketRequestLimit;
      } else {
        goto _skip;
      }
    }
    case 5:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I64))) {
        goto _readField_totalRequestsLimit;
      } else {
        goto _skip;
      }
    }
    case 6:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I64))) {
        goto _readField_queuedRequestsCount;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t RequestPileDbgInfo::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("RequestPileDbgInfo");
  {
    xfer += prot_->serializedFieldSize("name", apache::thrift::protocol::T_STRING, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_name);
  }
  {
    xfer += prot_->serializedFieldSize("prioritiesCount", apache::thrift::protocol::T_I32, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_prioritiesCount);
  }
  {
    xfer += prot_->serializedFieldSize("bucketsPerPriority", apache::thrift::protocol::T_LIST, 3);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::type_class::integral>, ::std::vector<::std::int64_t>>::serializedSize<false>(*prot_, this->__fbthrift_field_bucketsPerPriority);
  }
  {
    xfer += prot_->serializedFieldSize("perBucketRequestLimit", apache::thrift::protocol::T_I64, 4);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_perBucketRequestLimit);
  }
  {
    xfer += prot_->serializedFieldSize("totalRequestsLimit", apache::thrift::protocol::T_I64, 5);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_totalRequestsLimit);
  }
  {
    xfer += prot_->serializedFieldSize("queuedRequestsCount", apache::thrift::protocol::T_I64, 6);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_queuedRequestsCount);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t RequestPileDbgInfo::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("RequestPileDbgInfo");
  {
    xfer += prot_->serializedFieldSize("name", apache::thrift::protocol::T_STRING, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_name);
  }
  {
    xfer += prot_->serializedFieldSize("prioritiesCount", apache::thrift::protocol::T_I32, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_prioritiesCount);
  }
  {
    xfer += prot_->serializedFieldSize("bucketsPerPriority", apache::thrift::protocol::T_LIST, 3);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::type_class::integral>, ::std::vector<::std::int64_t>>::serializedSize<false>(*prot_, this->__fbthrift_field_bucketsPerPriority);
  }
  {
    xfer += prot_->serializedFieldSize("perBucketRequestLimit", apache::thrift::protocol::T_I64, 4);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_perBucketRequestLimit);
  }
  {
    xfer += prot_->serializedFieldSize("totalRequestsLimit", apache::thrift::protocol::T_I64, 5);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_totalRequestsLimit);
  }
  {
    xfer += prot_->serializedFieldSize("queuedRequestsCount", apache::thrift::protocol::T_I64, 6);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_queuedRequestsCount);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t RequestPileDbgInfo::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("RequestPileDbgInfo");
  bool previousFieldHasValue = true;
  {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRING, 1, kPrevFieldId>(*prot_, "name", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::write(*prot_, this->__fbthrift_field_name);
    xfer += prot_->writeFieldEnd();
  }
  {
    constexpr int16_t kPrevFieldId = 1;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 2, kPrevFieldId>(*prot_, "prioritiesCount", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::write(*prot_, this->__fbthrift_field_prioritiesCount);
    xfer += prot_->writeFieldEnd();
  }
  {
    constexpr int16_t kPrevFieldId = 2;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_LIST, 3, kPrevFieldId>(*prot_, "bucketsPerPriority", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::type_class::integral>, ::std::vector<::std::int64_t>>::write(*prot_, this->__fbthrift_field_bucketsPerPriority);
    xfer += prot_->writeFieldEnd();
  }
  {
    constexpr int16_t kPrevFieldId = 3;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I64, 4, kPrevFieldId>(*prot_, "perBucketRequestLimit", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::write(*prot_, this->__fbthrift_field_perBucketRequestLimit);
    xfer += prot_->writeFieldEnd();
  }
  {
    constexpr int16_t kPrevFieldId = 4;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I64, 5, kPrevFieldId>(*prot_, "totalRequestsLimit", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::write(*prot_, this->__fbthrift_field_totalRequestsLimit);
    xfer += prot_->writeFieldEnd();
  }
  {
    constexpr int16_t kPrevFieldId = 5;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I64, 6, kPrevFieldId>(*prot_, "queuedRequestsCount", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::write(*prot_, this->__fbthrift_field_queuedRequestsCount);
    xfer += prot_->writeFieldEnd();
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void RequestPileDbgInfo::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t RequestPileDbgInfo::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t RequestPileDbgInfo::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t RequestPileDbgInfo::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void RequestPileDbgInfo::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t RequestPileDbgInfo::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t RequestPileDbgInfo::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t RequestPileDbgInfo::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void RequestPileDbgInfo::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t RequestPileDbgInfo::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t RequestPileDbgInfo::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t RequestPileDbgInfo::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void ConcurrencyControllerDbgInfo::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          1,
          apache::thrift::protocol::T_STRING))) {
    goto _advance_failure;
  }
_readField_name:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::readWithContext(*iprot, this->__fbthrift_field_name, _readState);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          2,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_concurrencyLimit:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::readWithContext(*iprot, this->__fbthrift_field_concurrencyLimit, _readState);
    
  }
 this->__isset.set(1, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          2,
          3,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_qpsLimit:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::readWithContext(*iprot, this->__fbthrift_field_qpsLimit, _readState);
    
  }
 this->__isset.set(2, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          3,
          4,
          apache::thrift::protocol::T_I64))) {
    goto _advance_failure;
  }
_readField_totalProcessedRequests:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::readWithContext(*iprot, this->__fbthrift_field_totalProcessedRequests, _readState);
    
  }
 this->__isset.set(3, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          4,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<ConcurrencyControllerDbgInfo>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRING))) {
        goto _readField_name;
      } else {
        goto _skip;
      }
    }
    case 2:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_concurrencyLimit;
      } else {
        goto _skip;
      }
    }
    case 3:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_qpsLimit;
      } else {
        goto _skip;
      }
    }
    case 4:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I64))) {
        goto _readField_totalProcessedRequests;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t ConcurrencyControllerDbgInfo::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ConcurrencyControllerDbgInfo");
  {
    xfer += prot_->serializedFieldSize("name", apache::thrift::protocol::T_STRING, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_name);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("concurrencyLimit", apache::thrift::protocol::T_I32, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_concurrencyLimit);
  }
  if (this->__isset.get(2)) {
    xfer += prot_->serializedFieldSize("qpsLimit", apache::thrift::protocol::T_I32, 3);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_qpsLimit);
  }
  {
    xfer += prot_->serializedFieldSize("totalProcessedRequests", apache::thrift::protocol::T_I64, 4);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_totalProcessedRequests);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ConcurrencyControllerDbgInfo::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ConcurrencyControllerDbgInfo");
  {
    xfer += prot_->serializedFieldSize("name", apache::thrift::protocol::T_STRING, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_name);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("concurrencyLimit", apache::thrift::protocol::T_I32, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_concurrencyLimit);
  }
  if (this->__isset.get(2)) {
    xfer += prot_->serializedFieldSize("qpsLimit", apache::thrift::protocol::T_I32, 3);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_qpsLimit);
  }
  {
    xfer += prot_->serializedFieldSize("totalProcessedRequests", apache::thrift::protocol::T_I64, 4);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_totalProcessedRequests);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ConcurrencyControllerDbgInfo::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("ConcurrencyControllerDbgInfo");
  bool previousFieldHasValue = true;
  {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRING, 1, kPrevFieldId>(*prot_, "name", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::write(*prot_, this->__fbthrift_field_name);
    xfer += prot_->writeFieldEnd();
  }
  if (this->__isset.get(1)) {
    constexpr int16_t kPrevFieldId = 1;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 2, kPrevFieldId>(*prot_, "concurrencyLimit", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::write(*prot_, this->__fbthrift_field_concurrencyLimit);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(2)) {
    constexpr int16_t kPrevFieldId = 2;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 3, kPrevFieldId>(*prot_, "qpsLimit", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::write(*prot_, this->__fbthrift_field_qpsLimit);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  {
    constexpr int16_t kPrevFieldId = 3;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I64, 4, kPrevFieldId>(*prot_, "totalProcessedRequests", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::write(*prot_, this->__fbthrift_field_totalProcessedRequests);
    xfer += prot_->writeFieldEnd();
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void ConcurrencyControllerDbgInfo::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t ConcurrencyControllerDbgInfo::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t ConcurrencyControllerDbgInfo::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t ConcurrencyControllerDbgInfo::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void ConcurrencyControllerDbgInfo::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t ConcurrencyControllerDbgInfo::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t ConcurrencyControllerDbgInfo::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t ConcurrencyControllerDbgInfo::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void ConcurrencyControllerDbgInfo::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t ConcurrencyControllerDbgInfo::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t ConcurrencyControllerDbgInfo::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t ConcurrencyControllerDbgInfo::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void ExecutorDbgInfo::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          1,
          apache::thrift::protocol::T_STRING))) {
    goto _advance_failure;
  }
_readField_name:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::readWithContext(*iprot, this->__fbthrift_field_name, _readState);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          2,
          apache::thrift::protocol::T_I32))) {
    goto _advance_failure;
  }
_readField_threadsCount:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::readWithContext(*iprot, this->__fbthrift_field_threadsCount, _readState);
    
  }
 this->__isset.set(1, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          2,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<ExecutorDbgInfo>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRING))) {
        goto _readField_name;
      } else {
        goto _skip;
      }
    }
    case 2:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
        goto _readField_threadsCount;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t ExecutorDbgInfo::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ExecutorDbgInfo");
  {
    xfer += prot_->serializedFieldSize("name", apache::thrift::protocol::T_STRING, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_name);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("threadsCount", apache::thrift::protocol::T_I32, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_threadsCount);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ExecutorDbgInfo::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ExecutorDbgInfo");
  {
    xfer += prot_->serializedFieldSize("name", apache::thrift::protocol::T_STRING, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_name);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("threadsCount", apache::thrift::protocol::T_I32, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_threadsCount);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ExecutorDbgInfo::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("ExecutorDbgInfo");
  bool previousFieldHasValue = true;
  {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRING, 1, kPrevFieldId>(*prot_, "name", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::write(*prot_, this->__fbthrift_field_name);
    xfer += prot_->writeFieldEnd();
  }
  if (this->__isset.get(1)) {
    constexpr int16_t kPrevFieldId = 1;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 2, kPrevFieldId>(*prot_, "threadsCount", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::write(*prot_, this->__fbthrift_field_threadsCount);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void ExecutorDbgInfo::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t ExecutorDbgInfo::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t ExecutorDbgInfo::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t ExecutorDbgInfo::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void ExecutorDbgInfo::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t ExecutorDbgInfo::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t ExecutorDbgInfo::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t ExecutorDbgInfo::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void ExecutorDbgInfo::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t ExecutorDbgInfo::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t ExecutorDbgInfo::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t ExecutorDbgInfo::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void ResourcePoolDbgInfo::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          1,
          apache::thrift::protocol::T_STRING))) {
    goto _advance_failure;
  }
_readField_name:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::readWithContext(*iprot, this->__fbthrift_field_name, _readState);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          2,
          apache::thrift::protocol::T_STRUCT))) {
    goto _advance_failure;
  }
_readField_requestPileDbgInfo:
  {
    _readState.beforeSubobject(iprot);
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::serverdbginfo::RequestPileDbgInfo>::readWithContext(*iprot, this->__fbthrift_field_requestPileDbgInfo, _readState);
    _readState.afterSubobject(iprot);
    
  }
 this->__isset.set(1, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          2,
          3,
          apache::thrift::protocol::T_STRUCT))) {
    goto _advance_failure;
  }
_readField_concurrencyControllerDbgInfo:
  {
    _readState.beforeSubobject(iprot);
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::serverdbginfo::ConcurrencyControllerDbgInfo>::readWithContext(*iprot, this->__fbthrift_field_concurrencyControllerDbgInfo, _readState);
    _readState.afterSubobject(iprot);
    
  }
 this->__isset.set(2, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          3,
          4,
          apache::thrift::protocol::T_STRUCT))) {
    goto _advance_failure;
  }
_readField_executorDbgInfo:
  {
    _readState.beforeSubobject(iprot);
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::serverdbginfo::ExecutorDbgInfo>::readWithContext(*iprot, this->__fbthrift_field_executorDbgInfo, _readState);
    _readState.afterSubobject(iprot);
    
  }
 this->__isset.set(3, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          4,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<ResourcePoolDbgInfo>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRING))) {
        goto _readField_name;
      } else {
        goto _skip;
      }
    }
    case 2:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) {
        goto _readField_requestPileDbgInfo;
      } else {
        goto _skip;
      }
    }
    case 3:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) {
        goto _readField_concurrencyControllerDbgInfo;
      } else {
        goto _skip;
      }
    }
    case 4:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) {
        goto _readField_executorDbgInfo;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t ResourcePoolDbgInfo::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ResourcePoolDbgInfo");
  {
    xfer += prot_->serializedFieldSize("name", apache::thrift::protocol::T_STRING, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_name);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("requestPileDbgInfo", apache::thrift::protocol::T_STRUCT, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::serverdbginfo::RequestPileDbgInfo>::serializedSize<false>(*prot_, this->__fbthrift_field_requestPileDbgInfo);
  }
  if (this->__isset.get(2)) {
    xfer += prot_->serializedFieldSize("concurrencyControllerDbgInfo", apache::thrift::protocol::T_STRUCT, 3);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::serverdbginfo::ConcurrencyControllerDbgInfo>::serializedSize<false>(*prot_, this->__fbthrift_field_concurrencyControllerDbgInfo);
  }
  if (this->__isset.get(3)) {
    xfer += prot_->serializedFieldSize("executorDbgInfo", apache::thrift::protocol::T_STRUCT, 4);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::serverdbginfo::ExecutorDbgInfo>::serializedSize<false>(*prot_, this->__fbthrift_field_executorDbgInfo);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ResourcePoolDbgInfo::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ResourcePoolDbgInfo");
  {
    xfer += prot_->serializedFieldSize("name", apache::thrift::protocol::T_STRING, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_name);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("requestPileDbgInfo", apache::thrift::protocol::T_STRUCT, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::serverdbginfo::RequestPileDbgInfo>::serializedSize<true>(*prot_, this->__fbthrift_field_requestPileDbgInfo);
  }
  if (this->__isset.get(2)) {
    xfer += prot_->serializedFieldSize("concurrencyControllerDbgInfo", apache::thrift::protocol::T_STRUCT, 3);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::serverdbginfo::ConcurrencyControllerDbgInfo>::serializedSize<true>(*prot_, this->__fbthrift_field_concurrencyControllerDbgInfo);
  }
  if (this->__isset.get(3)) {
    xfer += prot_->serializedFieldSize("executorDbgInfo", apache::thrift::protocol::T_STRUCT, 4);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::serverdbginfo::ExecutorDbgInfo>::serializedSize<true>(*prot_, this->__fbthrift_field_executorDbgInfo);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ResourcePoolDbgInfo::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("ResourcePoolDbgInfo");
  bool previousFieldHasValue = true;
  {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRING, 1, kPrevFieldId>(*prot_, "name", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::write(*prot_, this->__fbthrift_field_name);
    xfer += prot_->writeFieldEnd();
  }
  if (this->__isset.get(1)) {
    constexpr int16_t kPrevFieldId = 1;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 2, kPrevFieldId>(*prot_, "requestPileDbgInfo", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::serverdbginfo::RequestPileDbgInfo>::write(*prot_, this->__fbthrift_field_requestPileDbgInfo);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(2)) {
    constexpr int16_t kPrevFieldId = 2;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 3, kPrevFieldId>(*prot_, "concurrencyControllerDbgInfo", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::serverdbginfo::ConcurrencyControllerDbgInfo>::write(*prot_, this->__fbthrift_field_concurrencyControllerDbgInfo);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__isset.get(3)) {
    constexpr int16_t kPrevFieldId = 3;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 4, kPrevFieldId>(*prot_, "executorDbgInfo", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::serverdbginfo::ExecutorDbgInfo>::write(*prot_, this->__fbthrift_field_executorDbgInfo);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void ResourcePoolDbgInfo::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t ResourcePoolDbgInfo::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t ResourcePoolDbgInfo::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t ResourcePoolDbgInfo::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void ResourcePoolDbgInfo::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t ResourcePoolDbgInfo::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t ResourcePoolDbgInfo::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t ResourcePoolDbgInfo::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void ResourcePoolDbgInfo::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t ResourcePoolDbgInfo::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t ResourcePoolDbgInfo::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t ResourcePoolDbgInfo::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void CPUConcurrencyControllerDbgInfo::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          1,
          apache::thrift::protocol::T_STRING))) {
    goto _advance_failure;
  }
_readField_mode:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::readWithContext(*iprot, this->__fbthrift_field_mode, _readState);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          2,
          apache::thrift::protocol::T_STRING))) {
    goto _advance_failure;
  }
_readField_method:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::readWithContext(*iprot, this->__fbthrift_field_method, _readState);
    
  }
 this->__isset.set(1, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          2,
          3,
          apache::thrift::protocol::T_I16))) {
    goto _advance_failure;
  }
_readField_cpuTarget:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int16_t>::readWithContext(*iprot, this->__fbthrift_field_cpuTarget, _readState);
    
  }
 this->__isset.set(2, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          3,
          4,
          apache::thrift::protocol::T_STRING))) {
    goto _advance_failure;
  }
_readField_cpuLoadSource:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::readWithContext(*iprot, this->__fbthrift_field_cpuLoadSource, _readState);
    
  }
 this->__isset.set(3, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          4,
          5,
          apache::thrift::protocol::T_I64))) {
    goto _advance_failure;
  }
_readField_refreshPeriodMs:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::readWithContext(*iprot, this->__fbthrift_field_refreshPeriodMs, _readState);
    
  }
 this->__isset.set(4, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          5,
          6,
          apache::thrift::protocol::T_DOUBLE))) {
    goto _advance_failure;
  }
_readField_additiveMultiplier:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::floating_point, double>::readWithContext(*iprot, this->__fbthrift_field_additiveMultiplier, _readState);
    
  }
 this->__isset.set(5, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          6,
          7,
          apache::thrift::protocol::T_DOUBLE))) {
    goto _advance_failure;
  }
_readField_decreaseMultiplier:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::floating_point, double>::readWithContext(*iprot, this->__fbthrift_field_decreaseMultiplier, _readState);
    
  }
 this->__isset.set(6, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          7,
          8,
          apache::thrift::protocol::T_DOUBLE))) {
    goto _advance_failure;
  }
_readField_increaseDistanceRatio:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::floating_point, double>::readWithContext(*iprot, this->__fbthrift_field_increaseDistanceRatio, _readState);
    
  }
 this->__isset.set(7, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          8,
          9,
          apache::thrift::protocol::T_BOOL))) {
    goto _advance_failure;
  }
_readField_bumpOnError:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, bool>::readWithContext(*iprot, this->__fbthrift_field_bumpOnError, _readState);
    
  }
 this->__isset.set(8, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          9,
          10,
          apache::thrift::protocol::T_I64))) {
    goto _advance_failure;
  }
_readField_refractoryPeriodMs:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::readWithContext(*iprot, this->__fbthrift_field_refractoryPeriodMs, _readState);
    
  }
 this->__isset.set(9, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          10,
          11,
          apache::thrift::protocol::T_DOUBLE))) {
    goto _advance_failure;
  }
_readField_initialEstimateFactor:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::floating_point, double>::readWithContext(*iprot, this->__fbthrift_field_initialEstimateFactor, _readState);
    
  }
 this->__isset.set(10, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          11,
          12,
          apache::thrift::protocol::T_DOUBLE))) {
    goto _advance_failure;
  }
_readField_initialEstimatePercentile:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::floating_point, double>::readWithContext(*iprot, this->__fbthrift_field_initialEstimatePercentile, _readState);
    
  }
 this->__isset.set(11, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          12,
          13,
          apache::thrift::protocol::T_I64))) {
    goto _advance_failure;
  }
_readField_collectionSampleSize:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::readWithContext(*iprot, this->__fbthrift_field_collectionSampleSize, _readState);
    
  }
 this->__isset.set(12, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          13,
          14,
          apache::thrift::protocol::T_I64))) {
    goto _advance_failure;
  }
_readField_concurrencyUpperBound:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::readWithContext(*iprot, this->__fbthrift_field_concurrencyUpperBound, _readState);
    
  }
 this->__isset.set(13, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          14,
          15,
          apache::thrift::protocol::T_I64))) {
    goto _advance_failure;
  }
_readField_concurrencyLowerBound:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::readWithContext(*iprot, this->__fbthrift_field_concurrencyLowerBound, _readState);
    
  }
 this->__isset.set(14, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          15,
          16,
          apache::thrift::protocol::T_I16))) {
    goto _advance_failure;
  }
_readField_cpuLoad:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int16_t>::readWithContext(*iprot, this->__fbthrift_field_cpuLoad, _readState);
    
  }
 this->__isset.set(15, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          16,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<CPUConcurrencyControllerDbgInfo>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRING))) {
        goto _readField_mode;
      } else {
        goto _skip;
      }
    }
    case 2:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRING))) {
        goto _readField_method;
      } else {
        goto _skip;
      }
    }
    case 3:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I16))) {
        goto _readField_cpuTarget;
      } else {
        goto _skip;
      }
    }
    case 4:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRING))) {
        goto _readField_cpuLoadSource;
      } else {
        goto _skip;
      }
    }
    case 5:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I64))) {
        goto _readField_refreshPeriodMs;
      } else {
        goto _skip;
      }
    }
    case 6:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_DOUBLE))) {
        goto _readField_additiveMultiplier;
      } else {
        goto _skip;
      }
    }
    case 7:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_DOUBLE))) {
        goto _readField_decreaseMultiplier;
      } else {
        goto _skip;
      }
    }
    case 8:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_DOUBLE))) {
        goto _readField_increaseDistanceRatio;
      } else {
        goto _skip;
      }
    }
    case 9:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_BOOL))) {
        goto _readField_bumpOnError;
      } else {
        goto _skip;
      }
    }
    case 10:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I64))) {
        goto _readField_refractoryPeriodMs;
      } else {
        goto _skip;
      }
    }
    case 11:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_DOUBLE))) {
        goto _readField_initialEstimateFactor;
      } else {
        goto _skip;
      }
    }
    case 12:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_DOUBLE))) {
        goto _readField_initialEstimatePercentile;
      } else {
        goto _skip;
      }
    }
    case 13:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I64))) {
        goto _readField_collectionSampleSize;
      } else {
        goto _skip;
      }
    }
    case 14:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I64))) {
        goto _readField_concurrencyUpperBound;
      } else {
        goto _skip;
      }
    }
    case 15:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I64))) {
        goto _readField_concurrencyLowerBound;
      } else {
        goto _skip;
      }
    }
    case 16:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I16))) {
        goto _readField_cpuLoad;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t CPUConcurrencyControllerDbgInfo::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("CPUConcurrencyControllerDbgInfo");
  {
    xfer += prot_->serializedFieldSize("mode", apache::thrift::protocol::T_STRING, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_mode);
  }
  {
    xfer += prot_->serializedFieldSize("method", apache::thrift::protocol::T_STRING, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_method);
  }
  {
    xfer += prot_->serializedFieldSize("cpuTarget", apache::thrift::protocol::T_I16, 3);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int16_t>::serializedSize<false>(*prot_, this->__fbthrift_field_cpuTarget);
  }
  {
    xfer += prot_->serializedFieldSize("cpuLoadSource", apache::thrift::protocol::T_STRING, 4);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_cpuLoadSource);
  }
  {
    xfer += prot_->serializedFieldSize("refreshPeriodMs", apache::thrift::protocol::T_I64, 5);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_refreshPeriodMs);
  }
  {
    xfer += prot_->serializedFieldSize("additiveMultiplier", apache::thrift::protocol::T_DOUBLE, 6);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::floating_point, double>::serializedSize<false>(*prot_, this->__fbthrift_field_additiveMultiplier);
  }
  {
    xfer += prot_->serializedFieldSize("decreaseMultiplier", apache::thrift::protocol::T_DOUBLE, 7);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::floating_point, double>::serializedSize<false>(*prot_, this->__fbthrift_field_decreaseMultiplier);
  }
  {
    xfer += prot_->serializedFieldSize("increaseDistanceRatio", apache::thrift::protocol::T_DOUBLE, 8);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::floating_point, double>::serializedSize<false>(*prot_, this->__fbthrift_field_increaseDistanceRatio);
  }
  {
    xfer += prot_->serializedFieldSize("bumpOnError", apache::thrift::protocol::T_BOOL, 9);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, bool>::serializedSize<false>(*prot_, this->__fbthrift_field_bumpOnError);
  }
  {
    xfer += prot_->serializedFieldSize("refractoryPeriodMs", apache::thrift::protocol::T_I64, 10);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_refractoryPeriodMs);
  }
  {
    xfer += prot_->serializedFieldSize("initialEstimateFactor", apache::thrift::protocol::T_DOUBLE, 11);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::floating_point, double>::serializedSize<false>(*prot_, this->__fbthrift_field_initialEstimateFactor);
  }
  {
    xfer += prot_->serializedFieldSize("initialEstimatePercentile", apache::thrift::protocol::T_DOUBLE, 12);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::floating_point, double>::serializedSize<false>(*prot_, this->__fbthrift_field_initialEstimatePercentile);
  }
  {
    xfer += prot_->serializedFieldSize("collectionSampleSize", apache::thrift::protocol::T_I64, 13);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_collectionSampleSize);
  }
  {
    xfer += prot_->serializedFieldSize("concurrencyUpperBound", apache::thrift::protocol::T_I64, 14);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_concurrencyUpperBound);
  }
  {
    xfer += prot_->serializedFieldSize("concurrencyLowerBound", apache::thrift::protocol::T_I64, 15);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_concurrencyLowerBound);
  }
  {
    xfer += prot_->serializedFieldSize("cpuLoad", apache::thrift::protocol::T_I16, 16);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int16_t>::serializedSize<false>(*prot_, this->__fbthrift_field_cpuLoad);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t CPUConcurrencyControllerDbgInfo::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("CPUConcurrencyControllerDbgInfo");
  {
    xfer += prot_->serializedFieldSize("mode", apache::thrift::protocol::T_STRING, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_mode);
  }
  {
    xfer += prot_->serializedFieldSize("method", apache::thrift::protocol::T_STRING, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_method);
  }
  {
    xfer += prot_->serializedFieldSize("cpuTarget", apache::thrift::protocol::T_I16, 3);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int16_t>::serializedSize<false>(*prot_, this->__fbthrift_field_cpuTarget);
  }
  {
    xfer += prot_->serializedFieldSize("cpuLoadSource", apache::thrift::protocol::T_STRING, 4);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_cpuLoadSource);
  }
  {
    xfer += prot_->serializedFieldSize("refreshPeriodMs", apache::thrift::protocol::T_I64, 5);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_refreshPeriodMs);
  }
  {
    xfer += prot_->serializedFieldSize("additiveMultiplier", apache::thrift::protocol::T_DOUBLE, 6);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::floating_point, double>::serializedSize<false>(*prot_, this->__fbthrift_field_additiveMultiplier);
  }
  {
    xfer += prot_->serializedFieldSize("decreaseMultiplier", apache::thrift::protocol::T_DOUBLE, 7);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::floating_point, double>::serializedSize<false>(*prot_, this->__fbthrift_field_decreaseMultiplier);
  }
  {
    xfer += prot_->serializedFieldSize("increaseDistanceRatio", apache::thrift::protocol::T_DOUBLE, 8);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::floating_point, double>::serializedSize<false>(*prot_, this->__fbthrift_field_increaseDistanceRatio);
  }
  {
    xfer += prot_->serializedFieldSize("bumpOnError", apache::thrift::protocol::T_BOOL, 9);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, bool>::serializedSize<false>(*prot_, this->__fbthrift_field_bumpOnError);
  }
  {
    xfer += prot_->serializedFieldSize("refractoryPeriodMs", apache::thrift::protocol::T_I64, 10);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_refractoryPeriodMs);
  }
  {
    xfer += prot_->serializedFieldSize("initialEstimateFactor", apache::thrift::protocol::T_DOUBLE, 11);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::floating_point, double>::serializedSize<false>(*prot_, this->__fbthrift_field_initialEstimateFactor);
  }
  {
    xfer += prot_->serializedFieldSize("initialEstimatePercentile", apache::thrift::protocol::T_DOUBLE, 12);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::floating_point, double>::serializedSize<false>(*prot_, this->__fbthrift_field_initialEstimatePercentile);
  }
  {
    xfer += prot_->serializedFieldSize("collectionSampleSize", apache::thrift::protocol::T_I64, 13);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_collectionSampleSize);
  }
  {
    xfer += prot_->serializedFieldSize("concurrencyUpperBound", apache::thrift::protocol::T_I64, 14);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_concurrencyUpperBound);
  }
  {
    xfer += prot_->serializedFieldSize("concurrencyLowerBound", apache::thrift::protocol::T_I64, 15);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::serializedSize<false>(*prot_, this->__fbthrift_field_concurrencyLowerBound);
  }
  {
    xfer += prot_->serializedFieldSize("cpuLoad", apache::thrift::protocol::T_I16, 16);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int16_t>::serializedSize<false>(*prot_, this->__fbthrift_field_cpuLoad);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t CPUConcurrencyControllerDbgInfo::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("CPUConcurrencyControllerDbgInfo");
  bool previousFieldHasValue = true;
  {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRING, 1, kPrevFieldId>(*prot_, "mode", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::write(*prot_, this->__fbthrift_field_mode);
    xfer += prot_->writeFieldEnd();
  }
  {
    constexpr int16_t kPrevFieldId = 1;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRING, 2, kPrevFieldId>(*prot_, "method", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::write(*prot_, this->__fbthrift_field_method);
    xfer += prot_->writeFieldEnd();
  }
  {
    constexpr int16_t kPrevFieldId = 2;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I16, 3, kPrevFieldId>(*prot_, "cpuTarget", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int16_t>::write(*prot_, this->__fbthrift_field_cpuTarget);
    xfer += prot_->writeFieldEnd();
  }
  {
    constexpr int16_t kPrevFieldId = 3;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRING, 4, kPrevFieldId>(*prot_, "cpuLoadSource", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::write(*prot_, this->__fbthrift_field_cpuLoadSource);
    xfer += prot_->writeFieldEnd();
  }
  {
    constexpr int16_t kPrevFieldId = 4;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I64, 5, kPrevFieldId>(*prot_, "refreshPeriodMs", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::write(*prot_, this->__fbthrift_field_refreshPeriodMs);
    xfer += prot_->writeFieldEnd();
  }
  {
    constexpr int16_t kPrevFieldId = 5;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_DOUBLE, 6, kPrevFieldId>(*prot_, "additiveMultiplier", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::floating_point, double>::write(*prot_, this->__fbthrift_field_additiveMultiplier);
    xfer += prot_->writeFieldEnd();
  }
  {
    constexpr int16_t kPrevFieldId = 6;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_DOUBLE, 7, kPrevFieldId>(*prot_, "decreaseMultiplier", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::floating_point, double>::write(*prot_, this->__fbthrift_field_decreaseMultiplier);
    xfer += prot_->writeFieldEnd();
  }
  {
    constexpr int16_t kPrevFieldId = 7;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_DOUBLE, 8, kPrevFieldId>(*prot_, "increaseDistanceRatio", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::floating_point, double>::write(*prot_, this->__fbthrift_field_increaseDistanceRatio);
    xfer += prot_->writeFieldEnd();
  }
  {
    constexpr int16_t kPrevFieldId = 8;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_BOOL, 9, kPrevFieldId>(*prot_, "bumpOnError", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, bool>::write(*prot_, this->__fbthrift_field_bumpOnError);
    xfer += prot_->writeFieldEnd();
  }
  {
    constexpr int16_t kPrevFieldId = 9;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I64, 10, kPrevFieldId>(*prot_, "refractoryPeriodMs", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::write(*prot_, this->__fbthrift_field_refractoryPeriodMs);
    xfer += prot_->writeFieldEnd();
  }
  {
    constexpr int16_t kPrevFieldId = 10;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_DOUBLE, 11, kPrevFieldId>(*prot_, "initialEstimateFactor", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::floating_point, double>::write(*prot_, this->__fbthrift_field_initialEstimateFactor);
    xfer += prot_->writeFieldEnd();
  }
  {
    constexpr int16_t kPrevFieldId = 11;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_DOUBLE, 12, kPrevFieldId>(*prot_, "initialEstimatePercentile", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::floating_point, double>::write(*prot_, this->__fbthrift_field_initialEstimatePercentile);
    xfer += prot_->writeFieldEnd();
  }
  {
    constexpr int16_t kPrevFieldId = 12;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I64, 13, kPrevFieldId>(*prot_, "collectionSampleSize", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::write(*prot_, this->__fbthrift_field_collectionSampleSize);
    xfer += prot_->writeFieldEnd();
  }
  {
    constexpr int16_t kPrevFieldId = 13;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I64, 14, kPrevFieldId>(*prot_, "concurrencyUpperBound", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::write(*prot_, this->__fbthrift_field_concurrencyUpperBound);
    xfer += prot_->writeFieldEnd();
  }
  {
    constexpr int16_t kPrevFieldId = 14;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I64, 15, kPrevFieldId>(*prot_, "concurrencyLowerBound", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int64_t>::write(*prot_, this->__fbthrift_field_concurrencyLowerBound);
    xfer += prot_->writeFieldEnd();
  }
  {
    constexpr int16_t kPrevFieldId = 15;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I16, 16, kPrevFieldId>(*prot_, "cpuLoad", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int16_t>::write(*prot_, this->__fbthrift_field_cpuLoad);
    xfer += prot_->writeFieldEnd();
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void CPUConcurrencyControllerDbgInfo::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t CPUConcurrencyControllerDbgInfo::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t CPUConcurrencyControllerDbgInfo::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t CPUConcurrencyControllerDbgInfo::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void CPUConcurrencyControllerDbgInfo::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t CPUConcurrencyControllerDbgInfo::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t CPUConcurrencyControllerDbgInfo::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t CPUConcurrencyControllerDbgInfo::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void CPUConcurrencyControllerDbgInfo::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t CPUConcurrencyControllerDbgInfo::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t CPUConcurrencyControllerDbgInfo::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t CPUConcurrencyControllerDbgInfo::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


template <class Protocol_>
void ResourcePoolsDbgInfo::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          1,
          apache::thrift::protocol::T_BOOL))) {
    goto _advance_failure;
  }
_readField_enabled:
  {
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, bool>::readWithContext(*iprot, this->__fbthrift_field_enabled, _readState);
    
  }
 this->__isset.set(0, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          2,
          apache::thrift::protocol::T_LIST))) {
    goto _advance_failure;
  }
_readField_resourcePools:
  {
    _readState.beforeSubobject(iprot);
    this->__fbthrift_field_resourcePools = ::std::vector<::apache::thrift::serverdbginfo::ResourcePoolDbgInfo>();
    ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, ::std::vector<::apache::thrift::serverdbginfo::ResourcePoolDbgInfo>>::readWithContext(*iprot, this->__fbthrift_field_resourcePools, _readState);
    _readState.afterSubobject(iprot);
    
  }
 this->__isset.set(1, true);

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          2,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<ResourcePoolsDbgInfo>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_BOOL))) {
        goto _readField_enabled;
      } else {
        goto _skip;
      }
    }
    case 2:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_LIST))) {
        goto _readField_resourcePools;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t ResourcePoolsDbgInfo::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ResourcePoolsDbgInfo");
  {
    xfer += prot_->serializedFieldSize("enabled", apache::thrift::protocol::T_BOOL, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, bool>::serializedSize<false>(*prot_, this->__fbthrift_field_enabled);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("resourcePools", apache::thrift::protocol::T_LIST, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, ::std::vector<::apache::thrift::serverdbginfo::ResourcePoolDbgInfo>>::serializedSize<false>(*prot_, this->__fbthrift_field_resourcePools);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ResourcePoolsDbgInfo::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ResourcePoolsDbgInfo");
  {
    xfer += prot_->serializedFieldSize("enabled", apache::thrift::protocol::T_BOOL, 1);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, bool>::serializedSize<false>(*prot_, this->__fbthrift_field_enabled);
  }
  if (this->__isset.get(1)) {
    xfer += prot_->serializedFieldSize("resourcePools", apache::thrift::protocol::T_LIST, 2);
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, ::std::vector<::apache::thrift::serverdbginfo::ResourcePoolDbgInfo>>::serializedSize<false>(*prot_, this->__fbthrift_field_resourcePools);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ResourcePoolsDbgInfo::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("ResourcePoolsDbgInfo");
  bool previousFieldHasValue = true;
  {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_BOOL, 1, kPrevFieldId>(*prot_, "enabled", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, bool>::write(*prot_, this->__fbthrift_field_enabled);
    xfer += prot_->writeFieldEnd();
  }
  if (this->__isset.get(1)) {
    constexpr int16_t kPrevFieldId = 1;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_LIST, 2, kPrevFieldId>(*prot_, "resourcePools", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, ::std::vector<::apache::thrift::serverdbginfo::ResourcePoolDbgInfo>>::write(*prot_, this->__fbthrift_field_resourcePools);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void ResourcePoolsDbgInfo::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t ResourcePoolsDbgInfo::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t ResourcePoolsDbgInfo::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t ResourcePoolsDbgInfo::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void ResourcePoolsDbgInfo::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t ResourcePoolsDbgInfo::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t ResourcePoolsDbgInfo::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t ResourcePoolsDbgInfo::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
extern template void ResourcePoolsDbgInfo::readNoXfer<>(apache::thrift::SimpleJSONProtocolReader*);
extern template uint32_t ResourcePoolsDbgInfo::write<>(apache::thrift::SimpleJSONProtocolWriter*) const;
extern template uint32_t ResourcePoolsDbgInfo::serializedSize<>(apache::thrift::SimpleJSONProtocolWriter const*) const;
extern template uint32_t ResourcePoolsDbgInfo::serializedSizeZC<>(apache::thrift::SimpleJSONProtocolWriter const*) const;


} // namespace apache::thrift::serverdbginfo
