Skip to content

File calculator_profile.pb.cc

File List > framework > calculator_profile.pb.cc

Go to the documentation of this file

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: mediapipe/framework/calculator_profile.proto

#include "mediapipe/framework/calculator_profile.pb.h"

#include <algorithm>

#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>

PROTOBUF_PRAGMA_INIT_SEG
namespace mediapipe {
constexpr TimeHistogram::TimeHistogram(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : count_()
  , total_(int64_t{0})
  , interval_size_usec_(int64_t{1000000})
  , num_intervals_(int64_t{1}){}
struct TimeHistogramDefaultTypeInternal {
  constexpr TimeHistogramDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~TimeHistogramDefaultTypeInternal() {}
  union {
    TimeHistogram _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TimeHistogramDefaultTypeInternal _TimeHistogram_default_instance_;
constexpr StreamProfile::StreamProfile(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , latency_(nullptr)
  , back_edge_(false){}
struct StreamProfileDefaultTypeInternal {
  constexpr StreamProfileDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~StreamProfileDefaultTypeInternal() {}
  union {
    StreamProfile _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT StreamProfileDefaultTypeInternal _StreamProfile_default_instance_;
constexpr CalculatorProfile::CalculatorProfile(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : input_stream_profiles_()
  , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , process_runtime_(nullptr)
  , process_input_latency_(nullptr)
  , process_output_latency_(nullptr)
  , open_runtime_(int64_t{0})
  , close_runtime_(int64_t{0}){}
struct CalculatorProfileDefaultTypeInternal {
  constexpr CalculatorProfileDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~CalculatorProfileDefaultTypeInternal() {}
  union {
    CalculatorProfile _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT CalculatorProfileDefaultTypeInternal _CalculatorProfile_default_instance_;
constexpr GraphTrace_StreamTrace::GraphTrace_StreamTrace(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : start_time_(int64_t{0})
  , finish_time_(int64_t{0})
  , packet_timestamp_(int64_t{0})
  , packet_id_(int64_t{0})
  , event_data_(int64_t{0})
  , stream_id_(0){}
struct GraphTrace_StreamTraceDefaultTypeInternal {
  constexpr GraphTrace_StreamTraceDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~GraphTrace_StreamTraceDefaultTypeInternal() {}
  union {
    GraphTrace_StreamTrace _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GraphTrace_StreamTraceDefaultTypeInternal _GraphTrace_StreamTrace_default_instance_;
constexpr GraphTrace_CalculatorTrace::GraphTrace_CalculatorTrace(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : input_trace_()
  , output_trace_()
  , input_timestamp_(int64_t{0})
  , node_id_(0)
  , event_type_(0)

  , start_time_(int64_t{0})
  , finish_time_(int64_t{0})
  , thread_id_(0){}
struct GraphTrace_CalculatorTraceDefaultTypeInternal {
  constexpr GraphTrace_CalculatorTraceDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~GraphTrace_CalculatorTraceDefaultTypeInternal() {}
  union {
    GraphTrace_CalculatorTrace _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GraphTrace_CalculatorTraceDefaultTypeInternal _GraphTrace_CalculatorTrace_default_instance_;
constexpr GraphTrace::GraphTrace(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : calculator_name_()
  , stream_name_()
  , calculator_trace_()
  , base_time_(int64_t{0})
  , base_timestamp_(int64_t{0}){}
struct GraphTraceDefaultTypeInternal {
  constexpr GraphTraceDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~GraphTraceDefaultTypeInternal() {}
  union {
    GraphTrace _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GraphTraceDefaultTypeInternal _GraphTrace_default_instance_;
constexpr GraphProfile::GraphProfile(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : graph_trace_()
  , calculator_profiles_()
  , config_(nullptr){}
struct GraphProfileDefaultTypeInternal {
  constexpr GraphProfileDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~GraphProfileDefaultTypeInternal() {}
  union {
    GraphProfile _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GraphProfileDefaultTypeInternal _GraphProfile_default_instance_;
}  // namespace mediapipe
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_mediapipe_2fframework_2fcalculator_5fprofile_2eproto[7];
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_mediapipe_2fframework_2fcalculator_5fprofile_2eproto[1];
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_mediapipe_2fframework_2fcalculator_5fprofile_2eproto = nullptr;

const uint32_t TableStruct_mediapipe_2fframework_2fcalculator_5fprofile_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  PROTOBUF_FIELD_OFFSET(::mediapipe::TimeHistogram, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::TimeHistogram, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::mediapipe::TimeHistogram, total_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::TimeHistogram, interval_size_usec_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::TimeHistogram, num_intervals_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::TimeHistogram, count_),
  0,
  1,
  2,
  ~0u,
  PROTOBUF_FIELD_OFFSET(::mediapipe::StreamProfile, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::StreamProfile, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::mediapipe::StreamProfile, name_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::StreamProfile, back_edge_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::StreamProfile, latency_),
  0,
  2,
  1,
  PROTOBUF_FIELD_OFFSET(::mediapipe::CalculatorProfile, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::CalculatorProfile, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::mediapipe::CalculatorProfile, name_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::CalculatorProfile, open_runtime_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::CalculatorProfile, close_runtime_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::CalculatorProfile, process_runtime_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::CalculatorProfile, process_input_latency_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::CalculatorProfile, process_output_latency_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::CalculatorProfile, input_stream_profiles_),
  0,
  4,
  5,
  1,
  2,
  3,
  ~0u,
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphTrace_StreamTrace, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphTrace_StreamTrace, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphTrace_StreamTrace, start_time_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphTrace_StreamTrace, finish_time_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphTrace_StreamTrace, packet_timestamp_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphTrace_StreamTrace, stream_id_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphTrace_StreamTrace, packet_id_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphTrace_StreamTrace, event_data_),
  0,
  1,
  2,
  5,
  3,
  4,
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphTrace_CalculatorTrace, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphTrace_CalculatorTrace, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphTrace_CalculatorTrace, node_id_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphTrace_CalculatorTrace, input_timestamp_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphTrace_CalculatorTrace, event_type_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphTrace_CalculatorTrace, start_time_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphTrace_CalculatorTrace, finish_time_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphTrace_CalculatorTrace, input_trace_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphTrace_CalculatorTrace, output_trace_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphTrace_CalculatorTrace, thread_id_),
  1,
  0,
  2,
  3,
  4,
  ~0u,
  ~0u,
  5,
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphTrace, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphTrace, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphTrace, base_time_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphTrace, base_timestamp_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphTrace, calculator_name_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphTrace, stream_name_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphTrace, calculator_trace_),
  0,
  1,
  ~0u,
  ~0u,
  ~0u,
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphProfile, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphProfile, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphProfile, graph_trace_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphProfile, calculator_profiles_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::GraphProfile, config_),
  ~0u,
  ~0u,
  0,
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, 10, -1, sizeof(::mediapipe::TimeHistogram)},
  { 14, 23, -1, sizeof(::mediapipe::StreamProfile)},
  { 26, 39, -1, sizeof(::mediapipe::CalculatorProfile)},
  { 46, 58, -1, sizeof(::mediapipe::GraphTrace_StreamTrace)},
  { 64, 78, -1, sizeof(::mediapipe::GraphTrace_CalculatorTrace)},
  { 86, 97, -1, sizeof(::mediapipe::GraphTrace)},
  { 102, 111, -1, sizeof(::mediapipe::GraphProfile)},
};

static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::mediapipe::_TimeHistogram_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::mediapipe::_StreamProfile_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::mediapipe::_CalculatorProfile_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::mediapipe::_GraphTrace_StreamTrace_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::mediapipe::_GraphTrace_CalculatorTrace_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::mediapipe::_GraphTrace_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::mediapipe::_GraphProfile_default_instance_),
};

const char descriptor_table_protodef_mediapipe_2fframework_2fcalculator_5fprofile_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n,mediapipe/framework/calculator_profile"
  ".proto\022\tmediapipe\032$mediapipe/framework/c"
  "alculator.proto\"o\n\rTimeHistogram\022\020\n\005tota"
  "l\030\001 \001(\003:\0010\022#\n\022interval_size_usec\030\002 \001(\003:\007"
  "1000000\022\030\n\rnum_intervals\030\003 \001(\003:\0011\022\r\n\005cou"
  "nt\030\004 \003(\003\"b\n\rStreamProfile\022\014\n\004name\030\001 \001(\t\022"
  "\030\n\tback_edge\030\002 \001(\010:\005false\022)\n\007latency\030\003 \001"
  "(\0132\030.mediapipe.TimeHistogram\"\263\002\n\021Calcula"
  "torProfile\022\014\n\004name\030\001 \001(\t\022\027\n\014open_runtime"
  "\030\002 \001(\003:\0010\022\030\n\rclose_runtime\030\003 \001(\003:\0010\0221\n\017p"
  "rocess_runtime\030\004 \001(\0132\030.mediapipe.TimeHis"
  "togram\0227\n\025process_input_latency\030\005 \001(\0132\030."
  "mediapipe.TimeHistogram\0228\n\026process_outpu"
  "t_latency\030\006 \001(\0132\030.mediapipe.TimeHistogra"
  "m\0227\n\025input_stream_profiles\030\007 \003(\0132\030.media"
  "pipe.StreamProfile\"\341\007\n\nGraphTrace\022\021\n\tbas"
  "e_time\030\001 \001(\003\022\026\n\016base_timestamp\030\002 \001(\003\022\027\n\017"
  "calculator_name\030\003 \003(\t\022\023\n\013stream_name\030\004 \003"
  "(\t\022\?\n\020calculator_trace\030\005 \003(\0132%.mediapipe"
  ".GraphTrace.CalculatorTrace\032\216\001\n\013StreamTr"
  "ace\022\022\n\nstart_time\030\001 \001(\003\022\023\n\013finish_time\030\002"
  " \001(\003\022\030\n\020packet_timestamp\030\003 \001(\003\022\021\n\tstream"
  "_id\030\004 \001(\005\022\025\n\tpacket_id\030\005 \001(\003B\002\030\001\022\022\n\neven"
  "t_data\030\006 \001(\003\032\235\002\n\017CalculatorTrace\022\017\n\007node"
  "_id\030\001 \001(\005\022\027\n\017input_timestamp\030\002 \001(\003\0223\n\nev"
  "ent_type\030\003 \001(\0162\037.mediapipe.GraphTrace.Ev"
  "entType\022\022\n\nstart_time\030\004 \001(\003\022\023\n\013finish_ti"
  "me\030\005 \001(\003\0226\n\013input_trace\030\006 \003(\0132!.mediapip"
  "e.GraphTrace.StreamTrace\0227\n\014output_trace"
  "\030\007 \003(\0132!.mediapipe.GraphTrace.StreamTrac"
  "e\022\021\n\tthread_id\030\010 \001(\005\"\207\003\n\tEventType\022\013\n\007UN"
  "KNOWN\020\000\022\010\n\004OPEN\020\001\022\013\n\007PROCESS\020\002\022\t\n\005CLOSE\020"
  "\003\022\r\n\tNOT_READY\020\004\022\025\n\021READY_FOR_PROCESS\020\005\022"
  "\023\n\017READY_FOR_CLOSE\020\006\022\r\n\tTHROTTLED\020\007\022\017\n\013U"
  "NTHROTTLED\020\010\022\021\n\rCPU_TASK_USER\020\t\022\023\n\017CPU_T"
  "ASK_SYSTEM\020\n\022\014\n\010GPU_TASK\020\013\022\014\n\010DSP_TASK\020\014"
  "\022\014\n\010TPU_TASK\020\r\022\023\n\017GPU_CALIBRATION\020\016\022\021\n\rP"
  "ACKET_QUEUED\020\017\022\023\n\017GPU_TASK_INVOKE\020\020\022\023\n\017T"
  "PU_TASK_INVOKE\020\021\022\023\n\017CPU_TASK_INVOKE\020\022\022\034\n"
  "\030GPU_TASK_INVOKE_ADVANCED\020\023\022\031\n\025TPU_TASK_"
  "INVOKE_ASYNC\020\024\"\247\001\n\014GraphProfile\022*\n\013graph"
  "_trace\030\001 \003(\0132\025.mediapipe.GraphTrace\0229\n\023c"
  "alculator_profiles\030\002 \003(\0132\034.mediapipe.Cal"
  "culatorProfile\0220\n\006config\030\003 \001(\0132 .mediapi"
  "pe.CalculatorGraphConfigB4\n\032com.google.m"
  "ediapipe.protoB\026CalculatorProfileProto"
  ;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_mediapipe_2fframework_2fcalculator_5fprofile_2eproto_deps[1] = {
  &::descriptor_table_mediapipe_2fframework_2fcalculator_2eproto,
};
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_mediapipe_2fframework_2fcalculator_5fprofile_2eproto_once;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_mediapipe_2fframework_2fcalculator_5fprofile_2eproto = {
  false, false, 1838, descriptor_table_protodef_mediapipe_2fframework_2fcalculator_5fprofile_2eproto, "mediapipe/framework/calculator_profile.proto", 
  &descriptor_table_mediapipe_2fframework_2fcalculator_5fprofile_2eproto_once, descriptor_table_mediapipe_2fframework_2fcalculator_5fprofile_2eproto_deps, 1, 7,
  schemas, file_default_instances, TableStruct_mediapipe_2fframework_2fcalculator_5fprofile_2eproto::offsets,
  file_level_metadata_mediapipe_2fframework_2fcalculator_5fprofile_2eproto, file_level_enum_descriptors_mediapipe_2fframework_2fcalculator_5fprofile_2eproto, file_level_service_descriptors_mediapipe_2fframework_2fcalculator_5fprofile_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_mediapipe_2fframework_2fcalculator_5fprofile_2eproto_getter() {
  return &descriptor_table_mediapipe_2fframework_2fcalculator_5fprofile_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_mediapipe_2fframework_2fcalculator_5fprofile_2eproto(&descriptor_table_mediapipe_2fframework_2fcalculator_5fprofile_2eproto);
namespace mediapipe {
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* GraphTrace_EventType_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_mediapipe_2fframework_2fcalculator_5fprofile_2eproto);
  return file_level_enum_descriptors_mediapipe_2fframework_2fcalculator_5fprofile_2eproto[0];
}
bool GraphTrace_EventType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
    case 6:
    case 7:
    case 8:
    case 9:
    case 10:
    case 11:
    case 12:
    case 13:
    case 14:
    case 15:
    case 16:
    case 17:
    case 18:
    case 19:
    case 20:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr GraphTrace_EventType GraphTrace::UNKNOWN;
constexpr GraphTrace_EventType GraphTrace::OPEN;
constexpr GraphTrace_EventType GraphTrace::PROCESS;
constexpr GraphTrace_EventType GraphTrace::CLOSE;
constexpr GraphTrace_EventType GraphTrace::NOT_READY;
constexpr GraphTrace_EventType GraphTrace::READY_FOR_PROCESS;
constexpr GraphTrace_EventType GraphTrace::READY_FOR_CLOSE;
constexpr GraphTrace_EventType GraphTrace::THROTTLED;
constexpr GraphTrace_EventType GraphTrace::UNTHROTTLED;
constexpr GraphTrace_EventType GraphTrace::CPU_TASK_USER;
constexpr GraphTrace_EventType GraphTrace::CPU_TASK_SYSTEM;
constexpr GraphTrace_EventType GraphTrace::GPU_TASK;
constexpr GraphTrace_EventType GraphTrace::DSP_TASK;
constexpr GraphTrace_EventType GraphTrace::TPU_TASK;
constexpr GraphTrace_EventType GraphTrace::GPU_CALIBRATION;
constexpr GraphTrace_EventType GraphTrace::PACKET_QUEUED;
constexpr GraphTrace_EventType GraphTrace::GPU_TASK_INVOKE;
constexpr GraphTrace_EventType GraphTrace::TPU_TASK_INVOKE;
constexpr GraphTrace_EventType GraphTrace::CPU_TASK_INVOKE;
constexpr GraphTrace_EventType GraphTrace::GPU_TASK_INVOKE_ADVANCED;
constexpr GraphTrace_EventType GraphTrace::TPU_TASK_INVOKE_ASYNC;
constexpr GraphTrace_EventType GraphTrace::EventType_MIN;
constexpr GraphTrace_EventType GraphTrace::EventType_MAX;
constexpr int GraphTrace::EventType_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))

// ===================================================================

class TimeHistogram::_Internal {
 public:
  using HasBits = decltype(std::declval<TimeHistogram>()._has_bits_);
  static void set_has_total(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_interval_size_usec(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_num_intervals(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
};

TimeHistogram::TimeHistogram(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  count_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:mediapipe.TimeHistogram)
}
TimeHistogram::TimeHistogram(const TimeHistogram& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      count_(from.count_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&total_, &from.total_,
    static_cast<size_t>(reinterpret_cast<char*>(&num_intervals_) -
    reinterpret_cast<char*>(&total_)) + sizeof(num_intervals_));
  // @@protoc_insertion_point(copy_constructor:mediapipe.TimeHistogram)
}

inline void TimeHistogram::SharedCtor() {
total_ = int64_t{0};
interval_size_usec_ = int64_t{1000000};
num_intervals_ = int64_t{1};
}

TimeHistogram::~TimeHistogram() {
  // @@protoc_insertion_point(destructor:mediapipe.TimeHistogram)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void TimeHistogram::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void TimeHistogram::ArenaDtor(void* object) {
  TimeHistogram* _this = reinterpret_cast< TimeHistogram* >(object);
  (void)_this;
}
void TimeHistogram::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void TimeHistogram::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void TimeHistogram::Clear() {
// @@protoc_insertion_point(message_clear_start:mediapipe.TimeHistogram)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  count_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    total_ = int64_t{0};
    interval_size_usec_ = int64_t{1000000};
    num_intervals_ = int64_t{1};
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* TimeHistogram::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int64 total = 1 [default = 0];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_total(&has_bits);
          total_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int64 interval_size_usec = 2 [default = 1000000];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_interval_size_usec(&has_bits);
          interval_size_usec_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int64 num_intervals = 3 [default = 1];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_num_intervals(&has_bits);
          num_intervals_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated int64 count = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_count(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<32>(ptr));
        } else if (static_cast<uint8_t>(tag) == 34) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_count(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* TimeHistogram::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:mediapipe.TimeHistogram)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int64 total = 1 [default = 0];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_total(), target);
  }

  // optional int64 interval_size_usec = 2 [default = 1000000];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_interval_size_usec(), target);
  }

  // optional int64 num_intervals = 3 [default = 1];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->_internal_num_intervals(), target);
  }

  // repeated int64 count = 4;
  for (int i = 0, n = this->_internal_count_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(4, this->_internal_count(i), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:mediapipe.TimeHistogram)
  return target;
}

size_t TimeHistogram::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:mediapipe.TimeHistogram)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated int64 count = 4;
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      Int64Size(this->count_);
    total_size += 1 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_count_size());
    total_size += data_size;
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    // optional int64 total = 1 [default = 0];
    if (cached_has_bits & 0x00000001u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_total());
    }

    // optional int64 interval_size_usec = 2 [default = 1000000];
    if (cached_has_bits & 0x00000002u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_interval_size_usec());
    }

    // optional int64 num_intervals = 3 [default = 1];
    if (cached_has_bits & 0x00000004u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_num_intervals());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TimeHistogram::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    TimeHistogram::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TimeHistogram::GetClassData() const { return &_class_data_; }

void TimeHistogram::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<TimeHistogram *>(to)->MergeFrom(
      static_cast<const TimeHistogram &>(from));
}


void TimeHistogram::MergeFrom(const TimeHistogram& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:mediapipe.TimeHistogram)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  count_.MergeFrom(from.count_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      total_ = from.total_;
    }
    if (cached_has_bits & 0x00000002u) {
      interval_size_usec_ = from.interval_size_usec_;
    }
    if (cached_has_bits & 0x00000004u) {
      num_intervals_ = from.num_intervals_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void TimeHistogram::CopyFrom(const TimeHistogram& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:mediapipe.TimeHistogram)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TimeHistogram::IsInitialized() const {
  return true;
}

void TimeHistogram::InternalSwap(TimeHistogram* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  count_.InternalSwap(&other->count_);
  swap(total_, other->total_);
  swap(interval_size_usec_, other->interval_size_usec_);
  swap(num_intervals_, other->num_intervals_);
}

::PROTOBUF_NAMESPACE_ID::Metadata TimeHistogram::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_mediapipe_2fframework_2fcalculator_5fprofile_2eproto_getter, &descriptor_table_mediapipe_2fframework_2fcalculator_5fprofile_2eproto_once,
      file_level_metadata_mediapipe_2fframework_2fcalculator_5fprofile_2eproto[0]);
}

// ===================================================================

class StreamProfile::_Internal {
 public:
  using HasBits = decltype(std::declval<StreamProfile>()._has_bits_);
  static void set_has_name(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_back_edge(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static const ::mediapipe::TimeHistogram& latency(const StreamProfile* msg);
  static void set_has_latency(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

const ::mediapipe::TimeHistogram&
StreamProfile::_Internal::latency(const StreamProfile* msg) {
  return *msg->latency_;
}
StreamProfile::StreamProfile(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:mediapipe.StreamProfile)
}
StreamProfile::StreamProfile(const StreamProfile& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_name()) {
    name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(), 
      GetArenaForAllocation());
  }
  if (from._internal_has_latency()) {
    latency_ = new ::mediapipe::TimeHistogram(*from.latency_);
  } else {
    latency_ = nullptr;
  }
  back_edge_ = from.back_edge_;
  // @@protoc_insertion_point(copy_constructor:mediapipe.StreamProfile)
}

inline void StreamProfile::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&latency_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&back_edge_) -
    reinterpret_cast<char*>(&latency_)) + sizeof(back_edge_));
}

StreamProfile::~StreamProfile() {
  // @@protoc_insertion_point(destructor:mediapipe.StreamProfile)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void StreamProfile::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete latency_;
}

void StreamProfile::ArenaDtor(void* object) {
  StreamProfile* _this = reinterpret_cast< StreamProfile* >(object);
  (void)_this;
}
void StreamProfile::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void StreamProfile::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void StreamProfile::Clear() {
// @@protoc_insertion_point(message_clear_start:mediapipe.StreamProfile)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      name_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(latency_ != nullptr);
      latency_->Clear();
    }
  }
  back_edge_ = false;
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* StreamProfile::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional string name = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_name();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "mediapipe.StreamProfile.name");
          #endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool back_edge = 2 [default = false];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_back_edge(&has_bits);
          back_edge_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .mediapipe.TimeHistogram latency = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_latency(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* StreamProfile::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:mediapipe.StreamProfile)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional string name = 1;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "mediapipe.StreamProfile.name");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_name(), target);
  }

  // optional bool back_edge = 2 [default = false];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_back_edge(), target);
  }

  // optional .mediapipe.TimeHistogram latency = 3;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        3, _Internal::latency(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:mediapipe.StreamProfile)
  return target;
}

size_t StreamProfile::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:mediapipe.StreamProfile)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    // optional string name = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_name());
    }

    // optional .mediapipe.TimeHistogram latency = 3;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *latency_);
    }

    // optional bool back_edge = 2 [default = false];
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 + 1;
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData StreamProfile::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    StreamProfile::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*StreamProfile::GetClassData() const { return &_class_data_; }

void StreamProfile::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<StreamProfile *>(to)->MergeFrom(
      static_cast<const StreamProfile &>(from));
}


void StreamProfile::MergeFrom(const StreamProfile& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:mediapipe.StreamProfile)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_name(from._internal_name());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_mutable_latency()->::mediapipe::TimeHistogram::MergeFrom(from._internal_latency());
    }
    if (cached_has_bits & 0x00000004u) {
      back_edge_ = from.back_edge_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void StreamProfile::CopyFrom(const StreamProfile& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:mediapipe.StreamProfile)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool StreamProfile::IsInitialized() const {
  return true;
}

void StreamProfile::InternalSwap(StreamProfile* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &name_, lhs_arena,
      &other->name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(StreamProfile, back_edge_)
      + sizeof(StreamProfile::back_edge_)
      - PROTOBUF_FIELD_OFFSET(StreamProfile, latency_)>(
          reinterpret_cast<char*>(&latency_),
          reinterpret_cast<char*>(&other->latency_));
}

::PROTOBUF_NAMESPACE_ID::Metadata StreamProfile::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_mediapipe_2fframework_2fcalculator_5fprofile_2eproto_getter, &descriptor_table_mediapipe_2fframework_2fcalculator_5fprofile_2eproto_once,
      file_level_metadata_mediapipe_2fframework_2fcalculator_5fprofile_2eproto[1]);
}

// ===================================================================

class CalculatorProfile::_Internal {
 public:
  using HasBits = decltype(std::declval<CalculatorProfile>()._has_bits_);
  static void set_has_name(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_open_runtime(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_close_runtime(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static const ::mediapipe::TimeHistogram& process_runtime(const CalculatorProfile* msg);
  static void set_has_process_runtime(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static const ::mediapipe::TimeHistogram& process_input_latency(const CalculatorProfile* msg);
  static void set_has_process_input_latency(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static const ::mediapipe::TimeHistogram& process_output_latency(const CalculatorProfile* msg);
  static void set_has_process_output_latency(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
};

const ::mediapipe::TimeHistogram&
CalculatorProfile::_Internal::process_runtime(const CalculatorProfile* msg) {
  return *msg->process_runtime_;
}
const ::mediapipe::TimeHistogram&
CalculatorProfile::_Internal::process_input_latency(const CalculatorProfile* msg) {
  return *msg->process_input_latency_;
}
const ::mediapipe::TimeHistogram&
CalculatorProfile::_Internal::process_output_latency(const CalculatorProfile* msg) {
  return *msg->process_output_latency_;
}
CalculatorProfile::CalculatorProfile(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  input_stream_profiles_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:mediapipe.CalculatorProfile)
}
CalculatorProfile::CalculatorProfile(const CalculatorProfile& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      input_stream_profiles_(from.input_stream_profiles_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_name()) {
    name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(), 
      GetArenaForAllocation());
  }
  if (from._internal_has_process_runtime()) {
    process_runtime_ = new ::mediapipe::TimeHistogram(*from.process_runtime_);
  } else {
    process_runtime_ = nullptr;
  }
  if (from._internal_has_process_input_latency()) {
    process_input_latency_ = new ::mediapipe::TimeHistogram(*from.process_input_latency_);
  } else {
    process_input_latency_ = nullptr;
  }
  if (from._internal_has_process_output_latency()) {
    process_output_latency_ = new ::mediapipe::TimeHistogram(*from.process_output_latency_);
  } else {
    process_output_latency_ = nullptr;
  }
  ::memcpy(&open_runtime_, &from.open_runtime_,
    static_cast<size_t>(reinterpret_cast<char*>(&close_runtime_) -
    reinterpret_cast<char*>(&open_runtime_)) + sizeof(close_runtime_));
  // @@protoc_insertion_point(copy_constructor:mediapipe.CalculatorProfile)
}

inline void CalculatorProfile::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&process_runtime_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&close_runtime_) -
    reinterpret_cast<char*>(&process_runtime_)) + sizeof(close_runtime_));
}

CalculatorProfile::~CalculatorProfile() {
  // @@protoc_insertion_point(destructor:mediapipe.CalculatorProfile)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void CalculatorProfile::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete process_runtime_;
  if (this != internal_default_instance()) delete process_input_latency_;
  if (this != internal_default_instance()) delete process_output_latency_;
}

void CalculatorProfile::ArenaDtor(void* object) {
  CalculatorProfile* _this = reinterpret_cast< CalculatorProfile* >(object);
  (void)_this;
}
void CalculatorProfile::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void CalculatorProfile::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void CalculatorProfile::Clear() {
// @@protoc_insertion_point(message_clear_start:mediapipe.CalculatorProfile)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  input_stream_profiles_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      name_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(process_runtime_ != nullptr);
      process_runtime_->Clear();
    }
    if (cached_has_bits & 0x00000004u) {
      GOOGLE_DCHECK(process_input_latency_ != nullptr);
      process_input_latency_->Clear();
    }
    if (cached_has_bits & 0x00000008u) {
      GOOGLE_DCHECK(process_output_latency_ != nullptr);
      process_output_latency_->Clear();
    }
  }
  if (cached_has_bits & 0x00000030u) {
    ::memset(&open_runtime_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&close_runtime_) -
        reinterpret_cast<char*>(&open_runtime_)) + sizeof(close_runtime_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* CalculatorProfile::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional string name = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_name();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "mediapipe.CalculatorProfile.name");
          #endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int64 open_runtime = 2 [default = 0];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_open_runtime(&has_bits);
          open_runtime_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int64 close_runtime = 3 [default = 0];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_close_runtime(&has_bits);
          close_runtime_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .mediapipe.TimeHistogram process_runtime = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_process_runtime(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .mediapipe.TimeHistogram process_input_latency = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_process_input_latency(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .mediapipe.TimeHistogram process_output_latency = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_process_output_latency(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .mediapipe.StreamProfile input_stream_profiles = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_input_stream_profiles(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<58>(ptr));
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* CalculatorProfile::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:mediapipe.CalculatorProfile)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional string name = 1;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "mediapipe.CalculatorProfile.name");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_name(), target);
  }

  // optional int64 open_runtime = 2 [default = 0];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_open_runtime(), target);
  }

  // optional int64 close_runtime = 3 [default = 0];
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->_internal_close_runtime(), target);
  }

  // optional .mediapipe.TimeHistogram process_runtime = 4;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        4, _Internal::process_runtime(this), target, stream);
  }

  // optional .mediapipe.TimeHistogram process_input_latency = 5;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        5, _Internal::process_input_latency(this), target, stream);
  }

  // optional .mediapipe.TimeHistogram process_output_latency = 6;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        6, _Internal::process_output_latency(this), target, stream);
  }

  // repeated .mediapipe.StreamProfile input_stream_profiles = 7;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_input_stream_profiles_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(7, this->_internal_input_stream_profiles(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:mediapipe.CalculatorProfile)
  return target;
}

size_t CalculatorProfile::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:mediapipe.CalculatorProfile)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .mediapipe.StreamProfile input_stream_profiles = 7;
  total_size += 1UL * this->_internal_input_stream_profiles_size();
  for (const auto& msg : this->input_stream_profiles_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    // optional string name = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_name());
    }

    // optional .mediapipe.TimeHistogram process_runtime = 4;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *process_runtime_);
    }

    // optional .mediapipe.TimeHistogram process_input_latency = 5;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *process_input_latency_);
    }

    // optional .mediapipe.TimeHistogram process_output_latency = 6;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *process_output_latency_);
    }

    // optional int64 open_runtime = 2 [default = 0];
    if (cached_has_bits & 0x00000010u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_open_runtime());
    }

    // optional int64 close_runtime = 3 [default = 0];
    if (cached_has_bits & 0x00000020u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_close_runtime());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData CalculatorProfile::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    CalculatorProfile::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*CalculatorProfile::GetClassData() const { return &_class_data_; }

void CalculatorProfile::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<CalculatorProfile *>(to)->MergeFrom(
      static_cast<const CalculatorProfile &>(from));
}


void CalculatorProfile::MergeFrom(const CalculatorProfile& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:mediapipe.CalculatorProfile)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  input_stream_profiles_.MergeFrom(from.input_stream_profiles_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_name(from._internal_name());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_mutable_process_runtime()->::mediapipe::TimeHistogram::MergeFrom(from._internal_process_runtime());
    }
    if (cached_has_bits & 0x00000004u) {
      _internal_mutable_process_input_latency()->::mediapipe::TimeHistogram::MergeFrom(from._internal_process_input_latency());
    }
    if (cached_has_bits & 0x00000008u) {
      _internal_mutable_process_output_latency()->::mediapipe::TimeHistogram::MergeFrom(from._internal_process_output_latency());
    }
    if (cached_has_bits & 0x00000010u) {
      open_runtime_ = from.open_runtime_;
    }
    if (cached_has_bits & 0x00000020u) {
      close_runtime_ = from.close_runtime_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void CalculatorProfile::CopyFrom(const CalculatorProfile& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:mediapipe.CalculatorProfile)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool CalculatorProfile::IsInitialized() const {
  return true;
}

void CalculatorProfile::InternalSwap(CalculatorProfile* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  input_stream_profiles_.InternalSwap(&other->input_stream_profiles_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &name_, lhs_arena,
      &other->name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(CalculatorProfile, close_runtime_)
      + sizeof(CalculatorProfile::close_runtime_)
      - PROTOBUF_FIELD_OFFSET(CalculatorProfile, process_runtime_)>(
          reinterpret_cast<char*>(&process_runtime_),
          reinterpret_cast<char*>(&other->process_runtime_));
}

::PROTOBUF_NAMESPACE_ID::Metadata CalculatorProfile::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_mediapipe_2fframework_2fcalculator_5fprofile_2eproto_getter, &descriptor_table_mediapipe_2fframework_2fcalculator_5fprofile_2eproto_once,
      file_level_metadata_mediapipe_2fframework_2fcalculator_5fprofile_2eproto[2]);
}

// ===================================================================

class GraphTrace_StreamTrace::_Internal {
 public:
  using HasBits = decltype(std::declval<GraphTrace_StreamTrace>()._has_bits_);
  static void set_has_start_time(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_finish_time(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_packet_timestamp(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_stream_id(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_packet_id(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_event_data(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
};

GraphTrace_StreamTrace::GraphTrace_StreamTrace(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:mediapipe.GraphTrace.StreamTrace)
}
GraphTrace_StreamTrace::GraphTrace_StreamTrace(const GraphTrace_StreamTrace& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&start_time_, &from.start_time_,
    static_cast<size_t>(reinterpret_cast<char*>(&stream_id_) -
    reinterpret_cast<char*>(&start_time_)) + sizeof(stream_id_));
  // @@protoc_insertion_point(copy_constructor:mediapipe.GraphTrace.StreamTrace)
}

inline void GraphTrace_StreamTrace::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&start_time_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&stream_id_) -
    reinterpret_cast<char*>(&start_time_)) + sizeof(stream_id_));
}

GraphTrace_StreamTrace::~GraphTrace_StreamTrace() {
  // @@protoc_insertion_point(destructor:mediapipe.GraphTrace.StreamTrace)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void GraphTrace_StreamTrace::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void GraphTrace_StreamTrace::ArenaDtor(void* object) {
  GraphTrace_StreamTrace* _this = reinterpret_cast< GraphTrace_StreamTrace* >(object);
  (void)_this;
}
void GraphTrace_StreamTrace::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void GraphTrace_StreamTrace::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void GraphTrace_StreamTrace::Clear() {
// @@protoc_insertion_point(message_clear_start:mediapipe.GraphTrace.StreamTrace)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    ::memset(&start_time_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&stream_id_) -
        reinterpret_cast<char*>(&start_time_)) + sizeof(stream_id_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* GraphTrace_StreamTrace::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int64 start_time = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_start_time(&has_bits);
          start_time_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int64 finish_time = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_finish_time(&has_bits);
          finish_time_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int64 packet_timestamp = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_packet_timestamp(&has_bits);
          packet_timestamp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 stream_id = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_stream_id(&has_bits);
          stream_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int64 packet_id = 5 [deprecated = true];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_packet_id(&has_bits);
          packet_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int64 event_data = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
          _Internal::set_has_event_data(&has_bits);
          event_data_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* GraphTrace_StreamTrace::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:mediapipe.GraphTrace.StreamTrace)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int64 start_time = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_start_time(), target);
  }

  // optional int64 finish_time = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_finish_time(), target);
  }

  // optional int64 packet_timestamp = 3;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->_internal_packet_timestamp(), target);
  }

  // optional int32 stream_id = 4;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_stream_id(), target);
  }

  // optional int64 packet_id = 5 [deprecated = true];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(5, this->_internal_packet_id(), target);
  }

  // optional int64 event_data = 6;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(6, this->_internal_event_data(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:mediapipe.GraphTrace.StreamTrace)
  return target;
}

size_t GraphTrace_StreamTrace::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:mediapipe.GraphTrace.StreamTrace)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    // optional int64 start_time = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_start_time());
    }

    // optional int64 finish_time = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_finish_time());
    }

    // optional int64 packet_timestamp = 3;
    if (cached_has_bits & 0x00000004u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_packet_timestamp());
    }

    // optional int64 packet_id = 5 [deprecated = true];
    if (cached_has_bits & 0x00000008u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_packet_id());
    }

    // optional int64 event_data = 6;
    if (cached_has_bits & 0x00000010u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_event_data());
    }

    // optional int32 stream_id = 4;
    if (cached_has_bits & 0x00000020u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_stream_id());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GraphTrace_StreamTrace::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    GraphTrace_StreamTrace::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GraphTrace_StreamTrace::GetClassData() const { return &_class_data_; }

void GraphTrace_StreamTrace::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<GraphTrace_StreamTrace *>(to)->MergeFrom(
      static_cast<const GraphTrace_StreamTrace &>(from));
}


void GraphTrace_StreamTrace::MergeFrom(const GraphTrace_StreamTrace& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:mediapipe.GraphTrace.StreamTrace)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    if (cached_has_bits & 0x00000001u) {
      start_time_ = from.start_time_;
    }
    if (cached_has_bits & 0x00000002u) {
      finish_time_ = from.finish_time_;
    }
    if (cached_has_bits & 0x00000004u) {
      packet_timestamp_ = from.packet_timestamp_;
    }
    if (cached_has_bits & 0x00000008u) {
      packet_id_ = from.packet_id_;
    }
    if (cached_has_bits & 0x00000010u) {
      event_data_ = from.event_data_;
    }
    if (cached_has_bits & 0x00000020u) {
      stream_id_ = from.stream_id_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void GraphTrace_StreamTrace::CopyFrom(const GraphTrace_StreamTrace& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:mediapipe.GraphTrace.StreamTrace)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GraphTrace_StreamTrace::IsInitialized() const {
  return true;
}

void GraphTrace_StreamTrace::InternalSwap(GraphTrace_StreamTrace* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(GraphTrace_StreamTrace, stream_id_)
      + sizeof(GraphTrace_StreamTrace::stream_id_)
      - PROTOBUF_FIELD_OFFSET(GraphTrace_StreamTrace, start_time_)>(
          reinterpret_cast<char*>(&start_time_),
          reinterpret_cast<char*>(&other->start_time_));
}

::PROTOBUF_NAMESPACE_ID::Metadata GraphTrace_StreamTrace::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_mediapipe_2fframework_2fcalculator_5fprofile_2eproto_getter, &descriptor_table_mediapipe_2fframework_2fcalculator_5fprofile_2eproto_once,
      file_level_metadata_mediapipe_2fframework_2fcalculator_5fprofile_2eproto[3]);
}

// ===================================================================

class GraphTrace_CalculatorTrace::_Internal {
 public:
  using HasBits = decltype(std::declval<GraphTrace_CalculatorTrace>()._has_bits_);
  static void set_has_node_id(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_input_timestamp(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_event_type(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_start_time(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_finish_time(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_thread_id(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
};

GraphTrace_CalculatorTrace::GraphTrace_CalculatorTrace(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  input_trace_(arena),
  output_trace_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:mediapipe.GraphTrace.CalculatorTrace)
}
GraphTrace_CalculatorTrace::GraphTrace_CalculatorTrace(const GraphTrace_CalculatorTrace& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      input_trace_(from.input_trace_),
      output_trace_(from.output_trace_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&input_timestamp_, &from.input_timestamp_,
    static_cast<size_t>(reinterpret_cast<char*>(&thread_id_) -
    reinterpret_cast<char*>(&input_timestamp_)) + sizeof(thread_id_));
  // @@protoc_insertion_point(copy_constructor:mediapipe.GraphTrace.CalculatorTrace)
}

inline void GraphTrace_CalculatorTrace::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&input_timestamp_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&thread_id_) -
    reinterpret_cast<char*>(&input_timestamp_)) + sizeof(thread_id_));
}

GraphTrace_CalculatorTrace::~GraphTrace_CalculatorTrace() {
  // @@protoc_insertion_point(destructor:mediapipe.GraphTrace.CalculatorTrace)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void GraphTrace_CalculatorTrace::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void GraphTrace_CalculatorTrace::ArenaDtor(void* object) {
  GraphTrace_CalculatorTrace* _this = reinterpret_cast< GraphTrace_CalculatorTrace* >(object);
  (void)_this;
}
void GraphTrace_CalculatorTrace::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void GraphTrace_CalculatorTrace::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void GraphTrace_CalculatorTrace::Clear() {
// @@protoc_insertion_point(message_clear_start:mediapipe.GraphTrace.CalculatorTrace)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  input_trace_.Clear();
  output_trace_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    ::memset(&input_timestamp_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&thread_id_) -
        reinterpret_cast<char*>(&input_timestamp_)) + sizeof(thread_id_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* GraphTrace_CalculatorTrace::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int32 node_id = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_node_id(&has_bits);
          node_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int64 input_timestamp = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_input_timestamp(&has_bits);
          input_timestamp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .mediapipe.GraphTrace.EventType event_type = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::mediapipe::GraphTrace_EventType_IsValid(val))) {
            _internal_set_event_type(static_cast<::mediapipe::GraphTrace_EventType>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(3, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional int64 start_time = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_start_time(&has_bits);
          start_time_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int64 finish_time = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_finish_time(&has_bits);
          finish_time_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .mediapipe.GraphTrace.StreamTrace input_trace = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_input_trace(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated .mediapipe.GraphTrace.StreamTrace output_trace = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_output_trace(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<58>(ptr));
        } else
          goto handle_unusual;
        continue;
      // optional int32 thread_id = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
          _Internal::set_has_thread_id(&has_bits);
          thread_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* GraphTrace_CalculatorTrace::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:mediapipe.GraphTrace.CalculatorTrace)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 node_id = 1;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_node_id(), target);
  }

  // optional int64 input_timestamp = 2;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_input_timestamp(), target);
  }

  // optional .mediapipe.GraphTrace.EventType event_type = 3;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      3, this->_internal_event_type(), target);
  }

  // optional int64 start_time = 4;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(4, this->_internal_start_time(), target);
  }

  // optional int64 finish_time = 5;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(5, this->_internal_finish_time(), target);
  }

  // repeated .mediapipe.GraphTrace.StreamTrace input_trace = 6;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_input_trace_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(6, this->_internal_input_trace(i), target, stream);
  }

  // repeated .mediapipe.GraphTrace.StreamTrace output_trace = 7;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_output_trace_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(7, this->_internal_output_trace(i), target, stream);
  }

  // optional int32 thread_id = 8;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(8, this->_internal_thread_id(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:mediapipe.GraphTrace.CalculatorTrace)
  return target;
}

size_t GraphTrace_CalculatorTrace::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:mediapipe.GraphTrace.CalculatorTrace)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .mediapipe.GraphTrace.StreamTrace input_trace = 6;
  total_size += 1UL * this->_internal_input_trace_size();
  for (const auto& msg : this->input_trace_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .mediapipe.GraphTrace.StreamTrace output_trace = 7;
  total_size += 1UL * this->_internal_output_trace_size();
  for (const auto& msg : this->output_trace_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    // optional int64 input_timestamp = 2;
    if (cached_has_bits & 0x00000001u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_input_timestamp());
    }

    // optional int32 node_id = 1;
    if (cached_has_bits & 0x00000002u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_node_id());
    }

    // optional .mediapipe.GraphTrace.EventType event_type = 3;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_event_type());
    }

    // optional int64 start_time = 4;
    if (cached_has_bits & 0x00000008u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_start_time());
    }

    // optional int64 finish_time = 5;
    if (cached_has_bits & 0x00000010u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_finish_time());
    }

    // optional int32 thread_id = 8;
    if (cached_has_bits & 0x00000020u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_thread_id());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GraphTrace_CalculatorTrace::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    GraphTrace_CalculatorTrace::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GraphTrace_CalculatorTrace::GetClassData() const { return &_class_data_; }

void GraphTrace_CalculatorTrace::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<GraphTrace_CalculatorTrace *>(to)->MergeFrom(
      static_cast<const GraphTrace_CalculatorTrace &>(from));
}


void GraphTrace_CalculatorTrace::MergeFrom(const GraphTrace_CalculatorTrace& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:mediapipe.GraphTrace.CalculatorTrace)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  input_trace_.MergeFrom(from.input_trace_);
  output_trace_.MergeFrom(from.output_trace_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    if (cached_has_bits & 0x00000001u) {
      input_timestamp_ = from.input_timestamp_;
    }
    if (cached_has_bits & 0x00000002u) {
      node_id_ = from.node_id_;
    }
    if (cached_has_bits & 0x00000004u) {
      event_type_ = from.event_type_;
    }
    if (cached_has_bits & 0x00000008u) {
      start_time_ = from.start_time_;
    }
    if (cached_has_bits & 0x00000010u) {
      finish_time_ = from.finish_time_;
    }
    if (cached_has_bits & 0x00000020u) {
      thread_id_ = from.thread_id_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void GraphTrace_CalculatorTrace::CopyFrom(const GraphTrace_CalculatorTrace& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:mediapipe.GraphTrace.CalculatorTrace)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GraphTrace_CalculatorTrace::IsInitialized() const {
  return true;
}

void GraphTrace_CalculatorTrace::InternalSwap(GraphTrace_CalculatorTrace* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  input_trace_.InternalSwap(&other->input_trace_);
  output_trace_.InternalSwap(&other->output_trace_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(GraphTrace_CalculatorTrace, thread_id_)
      + sizeof(GraphTrace_CalculatorTrace::thread_id_)
      - PROTOBUF_FIELD_OFFSET(GraphTrace_CalculatorTrace, input_timestamp_)>(
          reinterpret_cast<char*>(&input_timestamp_),
          reinterpret_cast<char*>(&other->input_timestamp_));
}

::PROTOBUF_NAMESPACE_ID::Metadata GraphTrace_CalculatorTrace::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_mediapipe_2fframework_2fcalculator_5fprofile_2eproto_getter, &descriptor_table_mediapipe_2fframework_2fcalculator_5fprofile_2eproto_once,
      file_level_metadata_mediapipe_2fframework_2fcalculator_5fprofile_2eproto[4]);
}

// ===================================================================

class GraphTrace::_Internal {
 public:
  using HasBits = decltype(std::declval<GraphTrace>()._has_bits_);
  static void set_has_base_time(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_base_timestamp(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

GraphTrace::GraphTrace(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  calculator_name_(arena),
  stream_name_(arena),
  calculator_trace_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:mediapipe.GraphTrace)
}
GraphTrace::GraphTrace(const GraphTrace& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      calculator_name_(from.calculator_name_),
      stream_name_(from.stream_name_),
      calculator_trace_(from.calculator_trace_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&base_time_, &from.base_time_,
    static_cast<size_t>(reinterpret_cast<char*>(&base_timestamp_) -
    reinterpret_cast<char*>(&base_time_)) + sizeof(base_timestamp_));
  // @@protoc_insertion_point(copy_constructor:mediapipe.GraphTrace)
}

inline void GraphTrace::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&base_time_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&base_timestamp_) -
    reinterpret_cast<char*>(&base_time_)) + sizeof(base_timestamp_));
}

GraphTrace::~GraphTrace() {
  // @@protoc_insertion_point(destructor:mediapipe.GraphTrace)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void GraphTrace::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void GraphTrace::ArenaDtor(void* object) {
  GraphTrace* _this = reinterpret_cast< GraphTrace* >(object);
  (void)_this;
}
void GraphTrace::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void GraphTrace::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void GraphTrace::Clear() {
// @@protoc_insertion_point(message_clear_start:mediapipe.GraphTrace)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  calculator_name_.Clear();
  stream_name_.Clear();
  calculator_trace_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    ::memset(&base_time_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&base_timestamp_) -
        reinterpret_cast<char*>(&base_time_)) + sizeof(base_timestamp_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* GraphTrace::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int64 base_time = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_base_time(&has_bits);
          base_time_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int64 base_timestamp = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_base_timestamp(&has_bits);
          base_timestamp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated string calculator_name = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_calculator_name();
            ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
            #ifndef NDEBUG
            ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "mediapipe.GraphTrace.calculator_name");
            #endif  // !NDEBUG
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated string stream_name = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_stream_name();
            ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
            #ifndef NDEBUG
            ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "mediapipe.GraphTrace.stream_name");
            #endif  // !NDEBUG
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated .mediapipe.GraphTrace.CalculatorTrace calculator_trace = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_calculator_trace(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* GraphTrace::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:mediapipe.GraphTrace)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int64 base_time = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_base_time(), target);
  }

  // optional int64 base_timestamp = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_base_timestamp(), target);
  }

  // repeated string calculator_name = 3;
  for (int i = 0, n = this->_internal_calculator_name_size(); i < n; i++) {
    const auto& s = this->_internal_calculator_name(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      s.data(), static_cast<int>(s.length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "mediapipe.GraphTrace.calculator_name");
    target = stream->WriteString(3, s, target);
  }

  // repeated string stream_name = 4;
  for (int i = 0, n = this->_internal_stream_name_size(); i < n; i++) {
    const auto& s = this->_internal_stream_name(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      s.data(), static_cast<int>(s.length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "mediapipe.GraphTrace.stream_name");
    target = stream->WriteString(4, s, target);
  }

  // repeated .mediapipe.GraphTrace.CalculatorTrace calculator_trace = 5;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_calculator_trace_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(5, this->_internal_calculator_trace(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:mediapipe.GraphTrace)
  return target;
}

size_t GraphTrace::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:mediapipe.GraphTrace)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated string calculator_name = 3;
  total_size += 1 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(calculator_name_.size());
  for (int i = 0, n = calculator_name_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      calculator_name_.Get(i));
  }

  // repeated string stream_name = 4;
  total_size += 1 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(stream_name_.size());
  for (int i = 0, n = stream_name_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      stream_name_.Get(i));
  }

  // repeated .mediapipe.GraphTrace.CalculatorTrace calculator_trace = 5;
  total_size += 1UL * this->_internal_calculator_trace_size();
  for (const auto& msg : this->calculator_trace_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional int64 base_time = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_base_time());
    }

    // optional int64 base_timestamp = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_base_timestamp());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GraphTrace::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    GraphTrace::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GraphTrace::GetClassData() const { return &_class_data_; }

void GraphTrace::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<GraphTrace *>(to)->MergeFrom(
      static_cast<const GraphTrace &>(from));
}


void GraphTrace::MergeFrom(const GraphTrace& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:mediapipe.GraphTrace)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  calculator_name_.MergeFrom(from.calculator_name_);
  stream_name_.MergeFrom(from.stream_name_);
  calculator_trace_.MergeFrom(from.calculator_trace_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      base_time_ = from.base_time_;
    }
    if (cached_has_bits & 0x00000002u) {
      base_timestamp_ = from.base_timestamp_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void GraphTrace::CopyFrom(const GraphTrace& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:mediapipe.GraphTrace)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GraphTrace::IsInitialized() const {
  return true;
}

void GraphTrace::InternalSwap(GraphTrace* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  calculator_name_.InternalSwap(&other->calculator_name_);
  stream_name_.InternalSwap(&other->stream_name_);
  calculator_trace_.InternalSwap(&other->calculator_trace_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(GraphTrace, base_timestamp_)
      + sizeof(GraphTrace::base_timestamp_)
      - PROTOBUF_FIELD_OFFSET(GraphTrace, base_time_)>(
          reinterpret_cast<char*>(&base_time_),
          reinterpret_cast<char*>(&other->base_time_));
}

::PROTOBUF_NAMESPACE_ID::Metadata GraphTrace::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_mediapipe_2fframework_2fcalculator_5fprofile_2eproto_getter, &descriptor_table_mediapipe_2fframework_2fcalculator_5fprofile_2eproto_once,
      file_level_metadata_mediapipe_2fframework_2fcalculator_5fprofile_2eproto[5]);
}

// ===================================================================

class GraphProfile::_Internal {
 public:
  using HasBits = decltype(std::declval<GraphProfile>()._has_bits_);
  static const ::mediapipe::CalculatorGraphConfig& config(const GraphProfile* msg);
  static void set_has_config(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

const ::mediapipe::CalculatorGraphConfig&
GraphProfile::_Internal::config(const GraphProfile* msg) {
  return *msg->config_;
}
void GraphProfile::clear_config() {
  if (config_ != nullptr) config_->Clear();
  _has_bits_[0] &= ~0x00000001u;
}
GraphProfile::GraphProfile(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  graph_trace_(arena),
  calculator_profiles_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:mediapipe.GraphProfile)
}
GraphProfile::GraphProfile(const GraphProfile& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      graph_trace_(from.graph_trace_),
      calculator_profiles_(from.calculator_profiles_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_config()) {
    config_ = new ::mediapipe::CalculatorGraphConfig(*from.config_);
  } else {
    config_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:mediapipe.GraphProfile)
}

inline void GraphProfile::SharedCtor() {
config_ = nullptr;
}

GraphProfile::~GraphProfile() {
  // @@protoc_insertion_point(destructor:mediapipe.GraphProfile)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void GraphProfile::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete config_;
}

void GraphProfile::ArenaDtor(void* object) {
  GraphProfile* _this = reinterpret_cast< GraphProfile* >(object);
  (void)_this;
}
void GraphProfile::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void GraphProfile::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void GraphProfile::Clear() {
// @@protoc_insertion_point(message_clear_start:mediapipe.GraphProfile)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  graph_trace_.Clear();
  calculator_profiles_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    GOOGLE_DCHECK(config_ != nullptr);
    config_->Clear();
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* GraphProfile::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // repeated .mediapipe.GraphTrace graph_trace = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_graph_trace(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated .mediapipe.CalculatorProfile calculator_profiles = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_calculator_profiles(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
        } else
          goto handle_unusual;
        continue;
      // optional .mediapipe.CalculatorGraphConfig config = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_config(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* GraphProfile::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:mediapipe.GraphProfile)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .mediapipe.GraphTrace graph_trace = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_graph_trace_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, this->_internal_graph_trace(i), target, stream);
  }

  // repeated .mediapipe.CalculatorProfile calculator_profiles = 2;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_calculator_profiles_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, this->_internal_calculator_profiles(i), target, stream);
  }

  cached_has_bits = _has_bits_[0];
  // optional .mediapipe.CalculatorGraphConfig config = 3;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        3, _Internal::config(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:mediapipe.GraphProfile)
  return target;
}

size_t GraphProfile::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:mediapipe.GraphProfile)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .mediapipe.GraphTrace graph_trace = 1;
  total_size += 1UL * this->_internal_graph_trace_size();
  for (const auto& msg : this->graph_trace_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .mediapipe.CalculatorProfile calculator_profiles = 2;
  total_size += 1UL * this->_internal_calculator_profiles_size();
  for (const auto& msg : this->calculator_profiles_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // optional .mediapipe.CalculatorGraphConfig config = 3;
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *config_);
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GraphProfile::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    GraphProfile::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GraphProfile::GetClassData() const { return &_class_data_; }

void GraphProfile::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<GraphProfile *>(to)->MergeFrom(
      static_cast<const GraphProfile &>(from));
}


void GraphProfile::MergeFrom(const GraphProfile& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:mediapipe.GraphProfile)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  graph_trace_.MergeFrom(from.graph_trace_);
  calculator_profiles_.MergeFrom(from.calculator_profiles_);
  if (from._internal_has_config()) {
    _internal_mutable_config()->::mediapipe::CalculatorGraphConfig::MergeFrom(from._internal_config());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void GraphProfile::CopyFrom(const GraphProfile& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:mediapipe.GraphProfile)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GraphProfile::IsInitialized() const {
  if (_internal_has_config()) {
    if (!config_->IsInitialized()) return false;
  }
  return true;
}

void GraphProfile::InternalSwap(GraphProfile* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  graph_trace_.InternalSwap(&other->graph_trace_);
  calculator_profiles_.InternalSwap(&other->calculator_profiles_);
  swap(config_, other->config_);
}

::PROTOBUF_NAMESPACE_ID::Metadata GraphProfile::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_mediapipe_2fframework_2fcalculator_5fprofile_2eproto_getter, &descriptor_table_mediapipe_2fframework_2fcalculator_5fprofile_2eproto_once,
      file_level_metadata_mediapipe_2fframework_2fcalculator_5fprofile_2eproto[6]);
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace mediapipe
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::mediapipe::TimeHistogram* Arena::CreateMaybeMessage< ::mediapipe::TimeHistogram >(Arena* arena) {
  return Arena::CreateMessageInternal< ::mediapipe::TimeHistogram >(arena);
}
template<> PROTOBUF_NOINLINE ::mediapipe::StreamProfile* Arena::CreateMaybeMessage< ::mediapipe::StreamProfile >(Arena* arena) {
  return Arena::CreateMessageInternal< ::mediapipe::StreamProfile >(arena);
}
template<> PROTOBUF_NOINLINE ::mediapipe::CalculatorProfile* Arena::CreateMaybeMessage< ::mediapipe::CalculatorProfile >(Arena* arena) {
  return Arena::CreateMessageInternal< ::mediapipe::CalculatorProfile >(arena);
}
template<> PROTOBUF_NOINLINE ::mediapipe::GraphTrace_StreamTrace* Arena::CreateMaybeMessage< ::mediapipe::GraphTrace_StreamTrace >(Arena* arena) {
  return Arena::CreateMessageInternal< ::mediapipe::GraphTrace_StreamTrace >(arena);
}
template<> PROTOBUF_NOINLINE ::mediapipe::GraphTrace_CalculatorTrace* Arena::CreateMaybeMessage< ::mediapipe::GraphTrace_CalculatorTrace >(Arena* arena) {
  return Arena::CreateMessageInternal< ::mediapipe::GraphTrace_CalculatorTrace >(arena);
}
template<> PROTOBUF_NOINLINE ::mediapipe::GraphTrace* Arena::CreateMaybeMessage< ::mediapipe::GraphTrace >(Arena* arena) {
  return Arena::CreateMessageInternal< ::mediapipe::GraphTrace >(arena);
}
template<> PROTOBUF_NOINLINE ::mediapipe::GraphProfile* Arena::CreateMaybeMessage< ::mediapipe::GraphProfile >(Arena* arena) {
  return Arena::CreateMessageInternal< ::mediapipe::GraphProfile >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>