feat: add total_cpu_millicores/total_memory_bytes/cpu_usage_millicores/memory_usage_bytes (#287)

This commit is contained in:
zyy17
2025-10-23 10:56:23 +08:00
committed by GitHub
parent 72a0d22e0f
commit 14b9dc40bd
5 changed files with 984 additions and 303 deletions
+176 -69
View File
@@ -108,6 +108,10 @@ PROTOBUF_CONSTEXPR NodeInfo::NodeInfo(
, /*decltype(_impl_.hostname_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.start_time_ms_)*/uint64_t{0u}
, /*decltype(_impl_.memory_bytes_)*/uint64_t{0u}
, /*decltype(_impl_.total_cpu_millicores_)*/int64_t{0}
, /*decltype(_impl_.total_memory_bytes_)*/int64_t{0}
, /*decltype(_impl_.cpu_usage_millicores_)*/int64_t{0}
, /*decltype(_impl_.memory_usage_bytes_)*/int64_t{0}
, /*decltype(_impl_.cpus_)*/0u
, /*decltype(_impl_._cached_size_)*/{}} {}
struct NodeInfoDefaultTypeInternal {
@@ -377,6 +381,10 @@ const uint32_t TableStruct_greptime_2fv1_2fmeta_2fheartbeat_2eproto::offsets[] P
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::NodeInfo, _impl_.cpus_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::NodeInfo, _impl_.memory_bytes_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::NodeInfo, _impl_.hostname_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::NodeInfo, _impl_.total_cpu_millicores_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::NodeInfo, _impl_.total_memory_bytes_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::NodeInfo, _impl_.cpu_usage_millicores_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::NodeInfo, _impl_.memory_usage_bytes_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::RegionStat_ExtensionsEntry_DoNotUse, _has_bits_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::RegionStat_ExtensionsEntry_DoNotUse, _internal_metadata_),
~0u, // no _extensions_
@@ -512,19 +520,19 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode
{ 38, -1, -1, sizeof(::greptime::v1::meta::FrontendWorkloads)},
{ 45, -1, -1, sizeof(::greptime::v1::meta::FlownodeWorkloads)},
{ 52, -1, -1, sizeof(::greptime::v1::meta::NodeInfo)},
{ 64, 72, -1, sizeof(::greptime::v1::meta::RegionStat_ExtensionsEntry_DoNotUse)},
{ 74, -1, -1, sizeof(::greptime::v1::meta::RegionStat)},
{ 87, -1, -1, sizeof(::greptime::v1::meta::TopicStat)},
{ 97, 105, -1, sizeof(::greptime::v1::meta::FlowStat_FlowStatSizeEntry_DoNotUse)},
{ 107, 115, -1, sizeof(::greptime::v1::meta::FlowStat_FlowLastExecTimeMapEntry_DoNotUse)},
{ 117, -1, -1, sizeof(::greptime::v1::meta::FlowStat)},
{ 125, -1, -1, sizeof(::greptime::v1::meta::HeartbeatResponse)},
{ 134, 142, -1, sizeof(::greptime::v1::meta::GrantedRegion_ExtensionsEntry_DoNotUse)},
{ 144, -1, -1, sizeof(::greptime::v1::meta::GrantedRegion)},
{ 153, -1, -1, sizeof(::greptime::v1::meta::RegionLease)},
{ 163, -1, -1, sizeof(::greptime::v1::meta::AskLeaderRequest)},
{ 170, -1, -1, sizeof(::greptime::v1::meta::AskLeaderResponse)},
{ 178, -1, -1, sizeof(::greptime::v1::meta::MailboxMessage)},
{ 68, 76, -1, sizeof(::greptime::v1::meta::RegionStat_ExtensionsEntry_DoNotUse)},
{ 78, -1, -1, sizeof(::greptime::v1::meta::RegionStat)},
{ 91, -1, -1, sizeof(::greptime::v1::meta::TopicStat)},
{ 101, 109, -1, sizeof(::greptime::v1::meta::FlowStat_FlowStatSizeEntry_DoNotUse)},
{ 111, 119, -1, sizeof(::greptime::v1::meta::FlowStat_FlowLastExecTimeMapEntry_DoNotUse)},
{ 121, -1, -1, sizeof(::greptime::v1::meta::FlowStat)},
{ 129, -1, -1, sizeof(::greptime::v1::meta::HeartbeatResponse)},
{ 138, 146, -1, sizeof(::greptime::v1::meta::GrantedRegion_ExtensionsEntry_DoNotUse)},
{ 148, -1, -1, sizeof(::greptime::v1::meta::GrantedRegion)},
{ 157, -1, -1, sizeof(::greptime::v1::meta::RegionLease)},
{ 167, -1, -1, sizeof(::greptime::v1::meta::AskLeaderRequest)},
{ 174, -1, -1, sizeof(::greptime::v1::meta::AskLeaderResponse)},
{ 182, -1, -1, sizeof(::greptime::v1::meta::MailboxMessage)},
};
static const ::_pb::Message* const file_default_instances[] = {
@@ -574,62 +582,65 @@ const char descriptor_table_protodef_greptime_2fv1_2fmeta_2fheartbeat_2eproto[]
"8\001B\020\n\016node_workloads\"\"\n\021DatanodeWorkload"
"s\022\r\n\005types\030\001 \003(\005\"\"\n\021FrontendWorkloads\022\r\n"
"\005types\030\001 \003(\005\"\"\n\021FlownodeWorkloads\022\r\n\005typ"
"es\030\001 \003(\005\"|\n\010NodeInfo\022\017\n\007version\030\001 \001(\t\022\022\n"
"\ngit_commit\030\002 \001(\t\022\025\n\rstart_time_ms\030\003 \001(\004"
"\022\014\n\004cpus\030\004 \001(\r\022\024\n\014memory_bytes\030\005 \001(\004\022\020\n\010"
"hostname\030\006 \001(\t\"\207\002\n\nRegionStat\022\021\n\tregion_"
"id\030\001 \001(\004\022\014\n\004rcus\030\002 \001(\003\022\014\n\004wcus\030\003 \001(\003\022\031\n\021"
"approximate_bytes\030\004 \001(\003\022\016\n\006engine\030\006 \001(\t\022"
"*\n\004role\030\007 \001(\0162\034.greptime.v1.meta.RegionR"
"ole\022@\n\nextensions\030c \003(\0132,.greptime.v1.me"
"ta.RegionStat.ExtensionsEntry\0321\n\017Extensi"
"onsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\014:\0028\001"
"\"a\n\tTopicStat\022\022\n\ntopic_name\030\001 \001(\t\022\023\n\013rec"
"ord_size\030\002 \001(\004\022\022\n\nrecord_num\030\003 \001(\004\022\027\n\017la"
"test_entry_id\030\004 \001(\004\"\227\002\n\010FlowStat\022D\n\016flow"
"_stat_size\030\001 \003(\0132,.greptime.v1.meta.Flow"
"Stat.FlowStatSizeEntry\022T\n\027flow_last_exec"
"_time_map\030\002 \003(\01323.greptime.v1.meta.FlowS"
"tat.FlowLastExecTimeMapEntry\0323\n\021FlowStat"
"SizeEntry\022\013\n\003key\030\001 \001(\r\022\r\n\005value\030\002 \001(\004:\0028"
"\001\032:\n\030FlowLastExecTimeMapEntry\022\013\n\003key\030\001 \001"
"(\r\022\r\n\005value\030\002 \001(\003:\0028\001\"\265\001\n\021HeartbeatRespo"
"nse\0220\n\006header\030\001 \001(\0132 .greptime.v1.meta.R"
"esponseHeader\0229\n\017mailbox_message\030\002 \001(\0132 "
".greptime.v1.meta.MailboxMessage\0223\n\014regi"
"on_lease\030\003 \001(\0132\035.greptime.v1.meta.Region"
"Lease\"\306\001\n\rGrantedRegion\022\021\n\tregion_id\030\001 \001"
"(\004\022*\n\004role\030\002 \001(\0162\034.greptime.v1.meta.Regi"
"onRole\022C\n\nextensions\030c \003(\0132/.greptime.v1"
".meta.GrantedRegion.ExtensionsEntry\0321\n\017E"
"xtensionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001"
"(\014:\0028\001\"\222\001\n\013RegionLease\0220\n\007regions\030\001 \003(\0132"
"\037.greptime.v1.meta.GrantedRegion\022\034\n\024dura"
"tion_since_epoch\030\002 \001(\004\022\025\n\rlease_seconds\030"
"\003 \001(\004\022\034\n\024closeable_region_ids\030\004 \003(\004\"C\n\020A"
"skLeaderRequest\022/\n\006header\030\001 \001(\0132\037.grepti"
"me.v1.meta.RequestHeader\"m\n\021AskLeaderRes"
"ponse\0220\n\006header\030\001 \001(\0132 .greptime.v1.meta"
".ResponseHeader\022&\n\006leader\030\002 \001(\0132\026.grepti"
"me.v1.meta.Peer\"|\n\016MailboxMessage\022\n\n\002id\030"
"\001 \001(\004\022\017\n\007subject\030\002 \001(\t\022\014\n\004from\030\003 \001(\t\022\n\n\002"
"to\030\004 \001(\t\022\030\n\020timestamp_millis\030\005 \001(\003\022\016\n\004js"
"on\030\006 \001(\tH\000B\t\n\007payload*=\n\nRegionRole\022\n\n\006L"
"eader\020\000\022\014\n\010Follower\020\001\022\025\n\021DowngradingLead"
"er\020\0022\277\001\n\tHeartbeat\022Z\n\tHeartbeat\022\".grepti"
"me.v1.meta.HeartbeatRequest\032#.greptime.v"
"1.meta.HeartbeatResponse\"\000(\0010\001\022V\n\tAskLea"
"der\022\".greptime.v1.meta.AskLeaderRequest\032"
"#.greptime.v1.meta.AskLeaderResponse\"\000B<"
"Z:github.com/GreptimeTeam/greptime-proto"
"/go/greptime/v1/metab\006proto3"
"es\030\001 \003(\005\"\370\001\n\010NodeInfo\022\017\n\007version\030\001 \001(\t\022\022"
"\n\ngit_commit\030\002 \001(\t\022\025\n\rstart_time_ms\030\003 \001("
"\004\022\020\n\004cpus\030\004 \001(\rB\002\030\001\022\030\n\014memory_bytes\030\005 \001("
"\004B\002\030\001\022\020\n\010hostname\030\006 \001(\t\022\034\n\024total_cpu_mil"
"licores\030\007 \001(\003\022\032\n\022total_memory_bytes\030\010 \001("
"\003\022\034\n\024cpu_usage_millicores\030\t \001(\003\022\032\n\022memor"
"y_usage_bytes\030\n \001(\003\"\207\002\n\nRegionStat\022\021\n\tre"
"gion_id\030\001 \001(\004\022\014\n\004rcus\030\002 \001(\003\022\014\n\004wcus\030\003 \001("
"\003\022\031\n\021approximate_bytes\030\004 \001(\003\022\016\n\006engine\030\006"
" \001(\t\022*\n\004role\030\007 \001(\0162\034.greptime.v1.meta.Re"
"gionRole\022@\n\nextensions\030c \003(\0132,.greptime."
"v1.meta.RegionStat.ExtensionsEntry\0321\n\017Ex"
"tensionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001("
"\014:\0028\001\"a\n\tTopicStat\022\022\n\ntopic_name\030\001 \001(\t\022\023"
"\n\013record_size\030\002 \001(\004\022\022\n\nrecord_num\030\003 \001(\004\022"
"\027\n\017latest_entry_id\030\004 \001(\004\"\227\002\n\010FlowStat\022D\n"
"\016flow_stat_size\030\001 \003(\0132,.greptime.v1.meta"
".FlowStat.FlowStatSizeEntry\022T\n\027flow_last"
"_exec_time_map\030\002 \003(\01323.greptime.v1.meta."
"FlowStat.FlowLastExecTimeMapEntry\0323\n\021Flo"
"wStatSizeEntry\022\013\n\003key\030\001 \001(\r\022\r\n\005value\030\002 \001"
"(\004:\0028\001\032:\n\030FlowLastExecTimeMapEntry\022\013\n\003ke"
"y\030\001 \001(\r\022\r\n\005value\030\002 \001(\003:\0028\001\"\265\001\n\021Heartbeat"
"Response\0220\n\006header\030\001 \001(\0132 .greptime.v1.m"
"eta.ResponseHeader\0229\n\017mailbox_message\030\002 "
"\001(\0132 .greptime.v1.meta.MailboxMessage\0223\n"
"\014region_lease\030\003 \001(\0132\035.greptime.v1.meta.R"
"egionLease\"\306\001\n\rGrantedRegion\022\021\n\tregion_i"
"d\030\001 \001(\004\022*\n\004role\030\002 \001(\0162\034.greptime.v1.meta"
".RegionRole\022C\n\nextensions\030c \003(\0132/.grepti"
"me.v1.meta.GrantedRegion.ExtensionsEntry"
"\0321\n\017ExtensionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu"
"e\030\002 \001(\014:\0028\001\"\222\001\n\013RegionLease\0220\n\007regions\030\001"
" \003(\0132\037.greptime.v1.meta.GrantedRegion\022\034\n"
"\024duration_since_epoch\030\002 \001(\004\022\025\n\rlease_sec"
"onds\030\003 \001(\004\022\034\n\024closeable_region_ids\030\004 \003(\004"
"\"C\n\020AskLeaderRequest\022/\n\006header\030\001 \001(\0132\037.g"
"reptime.v1.meta.RequestHeader\"m\n\021AskLead"
"erResponse\0220\n\006header\030\001 \001(\0132 .greptime.v1"
".meta.ResponseHeader\022&\n\006leader\030\002 \001(\0132\026.g"
"reptime.v1.meta.Peer\"|\n\016MailboxMessage\022\n"
"\n\002id\030\001 \001(\004\022\017\n\007subject\030\002 \001(\t\022\014\n\004from\030\003 \001("
"\t\022\n\n\002to\030\004 \001(\t\022\030\n\020timestamp_millis\030\005 \001(\003\022"
"\016\n\004json\030\006 \001(\tH\000B\t\n\007payload*=\n\nRegionRole"
"\022\n\n\006Leader\020\000\022\014\n\010Follower\020\001\022\025\n\021Downgradin"
"gLeader\020\0022\277\001\n\tHeartbeat\022Z\n\tHeartbeat\022\".g"
"reptime.v1.meta.HeartbeatRequest\032#.grept"
"ime.v1.meta.HeartbeatResponse\"\000(\0010\001\022V\n\tA"
"skLeader\022\".greptime.v1.meta.AskLeaderReq"
"uest\032#.greptime.v1.meta.AskLeaderRespons"
"e\"\000B<Z:github.com/GreptimeTeam/greptime-"
"proto/go/greptime/v1/metab\006proto3"
;
static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_deps[1] = {
&::descriptor_table_greptime_2fv1_2fmeta_2fcommon_2eproto,
};
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto = {
false, false, 2908, descriptor_table_protodef_greptime_2fv1_2fmeta_2fheartbeat_2eproto,
false, false, 3033, descriptor_table_protodef_greptime_2fv1_2fmeta_2fheartbeat_2eproto,
"greptime/v1/meta/heartbeat.proto",
&descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_once, descriptor_table_greptime_2fv1_2fmeta_2fheartbeat_2eproto_deps, 1, 19,
schemas, file_default_instances, TableStruct_greptime_2fv1_2fmeta_2fheartbeat_2eproto::offsets,
@@ -2094,6 +2105,10 @@ NodeInfo::NodeInfo(const NodeInfo& from)
, decltype(_impl_.hostname_){}
, decltype(_impl_.start_time_ms_){}
, decltype(_impl_.memory_bytes_){}
, decltype(_impl_.total_cpu_millicores_){}
, decltype(_impl_.total_memory_bytes_){}
, decltype(_impl_.cpu_usage_millicores_){}
, decltype(_impl_.memory_usage_bytes_){}
, decltype(_impl_.cpus_){}
, /*decltype(_impl_._cached_size_)*/{}};
@@ -2138,6 +2153,10 @@ inline void NodeInfo::SharedCtor(
, decltype(_impl_.hostname_){}
, decltype(_impl_.start_time_ms_){uint64_t{0u}}
, decltype(_impl_.memory_bytes_){uint64_t{0u}}
, decltype(_impl_.total_cpu_millicores_){int64_t{0}}
, decltype(_impl_.total_memory_bytes_){int64_t{0}}
, decltype(_impl_.cpu_usage_millicores_){int64_t{0}}
, decltype(_impl_.memory_usage_bytes_){int64_t{0}}
, decltype(_impl_.cpus_){0u}
, /*decltype(_impl_._cached_size_)*/{}
};
@@ -2224,7 +2243,7 @@ const char* NodeInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx)
} else
goto handle_unusual;
continue;
// uint32 cpus = 4;
// uint32 cpus = 4 [deprecated = true];
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
_impl_.cpus_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
@@ -2232,7 +2251,7 @@ const char* NodeInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx)
} else
goto handle_unusual;
continue;
// uint64 memory_bytes = 5;
// uint64 memory_bytes = 5 [deprecated = true];
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
_impl_.memory_bytes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
@@ -2250,6 +2269,38 @@ const char* NodeInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx)
} else
goto handle_unusual;
continue;
// int64 total_cpu_millicores = 7;
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
_impl_.total_cpu_millicores_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// int64 total_memory_bytes = 8;
case 8:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
_impl_.total_memory_bytes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// int64 cpu_usage_millicores = 9;
case 9:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
_impl_.cpu_usage_millicores_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// int64 memory_usage_bytes = 10;
case 10:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
_impl_.memory_usage_bytes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
@@ -2305,13 +2356,13 @@ uint8_t* NodeInfo::_InternalSerialize(
target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_start_time_ms(), target);
}
// uint32 cpus = 4;
// uint32 cpus = 4 [deprecated = true];
if (this->_internal_cpus() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_cpus(), target);
}
// uint64 memory_bytes = 5;
// uint64 memory_bytes = 5 [deprecated = true];
if (this->_internal_memory_bytes() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteUInt64ToArray(5, this->_internal_memory_bytes(), target);
@@ -2327,6 +2378,30 @@ uint8_t* NodeInfo::_InternalSerialize(
6, this->_internal_hostname(), target);
}
// int64 total_cpu_millicores = 7;
if (this->_internal_total_cpu_millicores() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteInt64ToArray(7, this->_internal_total_cpu_millicores(), target);
}
// int64 total_memory_bytes = 8;
if (this->_internal_total_memory_bytes() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteInt64ToArray(8, this->_internal_total_memory_bytes(), target);
}
// int64 cpu_usage_millicores = 9;
if (this->_internal_cpu_usage_millicores() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteInt64ToArray(9, this->_internal_cpu_usage_millicores(), target);
}
// int64 memory_usage_bytes = 10;
if (this->_internal_memory_usage_bytes() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteInt64ToArray(10, this->_internal_memory_usage_bytes(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
@@ -2369,12 +2444,32 @@ size_t NodeInfo::ByteSizeLong() const {
total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_start_time_ms());
}
// uint64 memory_bytes = 5;
// uint64 memory_bytes = 5 [deprecated = true];
if (this->_internal_memory_bytes() != 0) {
total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_memory_bytes());
}
// uint32 cpus = 4;
// int64 total_cpu_millicores = 7;
if (this->_internal_total_cpu_millicores() != 0) {
total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_total_cpu_millicores());
}
// int64 total_memory_bytes = 8;
if (this->_internal_total_memory_bytes() != 0) {
total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_total_memory_bytes());
}
// int64 cpu_usage_millicores = 9;
if (this->_internal_cpu_usage_millicores() != 0) {
total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_cpu_usage_millicores());
}
// int64 memory_usage_bytes = 10;
if (this->_internal_memory_usage_bytes() != 0) {
total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_memory_usage_bytes());
}
// uint32 cpus = 4 [deprecated = true];
if (this->_internal_cpus() != 0) {
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_cpus());
}
@@ -2412,6 +2507,18 @@ void NodeInfo::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTO
if (from._internal_memory_bytes() != 0) {
_this->_internal_set_memory_bytes(from._internal_memory_bytes());
}
if (from._internal_total_cpu_millicores() != 0) {
_this->_internal_set_total_cpu_millicores(from._internal_total_cpu_millicores());
}
if (from._internal_total_memory_bytes() != 0) {
_this->_internal_set_total_memory_bytes(from._internal_total_memory_bytes());
}
if (from._internal_cpu_usage_millicores() != 0) {
_this->_internal_set_cpu_usage_millicores(from._internal_cpu_usage_millicores());
}
if (from._internal_memory_usage_bytes() != 0) {
_this->_internal_set_memory_usage_bytes(from._internal_memory_usage_bytes());
}
if (from._internal_cpus() != 0) {
_this->_internal_set_cpus(from._internal_cpus());
}
+134 -10
View File
@@ -1229,6 +1229,10 @@ class NodeInfo final :
kHostnameFieldNumber = 6,
kStartTimeMsFieldNumber = 3,
kMemoryBytesFieldNumber = 5,
kTotalCpuMillicoresFieldNumber = 7,
kTotalMemoryBytesFieldNumber = 8,
kCpuUsageMillicoresFieldNumber = 9,
kMemoryUsageBytesFieldNumber = 10,
kCpusFieldNumber = 4,
};
// string version = 1;
@@ -1282,19 +1286,55 @@ class NodeInfo final :
void _internal_set_start_time_ms(uint64_t value);
public:
// uint64 memory_bytes = 5;
void clear_memory_bytes();
uint64_t memory_bytes() const;
void set_memory_bytes(uint64_t value);
// uint64 memory_bytes = 5 [deprecated = true];
PROTOBUF_DEPRECATED void clear_memory_bytes();
PROTOBUF_DEPRECATED uint64_t memory_bytes() const;
PROTOBUF_DEPRECATED void set_memory_bytes(uint64_t value);
private:
uint64_t _internal_memory_bytes() const;
void _internal_set_memory_bytes(uint64_t value);
public:
// uint32 cpus = 4;
void clear_cpus();
uint32_t cpus() const;
void set_cpus(uint32_t value);
// int64 total_cpu_millicores = 7;
void clear_total_cpu_millicores();
int64_t total_cpu_millicores() const;
void set_total_cpu_millicores(int64_t value);
private:
int64_t _internal_total_cpu_millicores() const;
void _internal_set_total_cpu_millicores(int64_t value);
public:
// int64 total_memory_bytes = 8;
void clear_total_memory_bytes();
int64_t total_memory_bytes() const;
void set_total_memory_bytes(int64_t value);
private:
int64_t _internal_total_memory_bytes() const;
void _internal_set_total_memory_bytes(int64_t value);
public:
// int64 cpu_usage_millicores = 9;
void clear_cpu_usage_millicores();
int64_t cpu_usage_millicores() const;
void set_cpu_usage_millicores(int64_t value);
private:
int64_t _internal_cpu_usage_millicores() const;
void _internal_set_cpu_usage_millicores(int64_t value);
public:
// int64 memory_usage_bytes = 10;
void clear_memory_usage_bytes();
int64_t memory_usage_bytes() const;
void set_memory_usage_bytes(int64_t value);
private:
int64_t _internal_memory_usage_bytes() const;
void _internal_set_memory_usage_bytes(int64_t value);
public:
// uint32 cpus = 4 [deprecated = true];
PROTOBUF_DEPRECATED void clear_cpus();
PROTOBUF_DEPRECATED uint32_t cpus() const;
PROTOBUF_DEPRECATED void set_cpus(uint32_t value);
private:
uint32_t _internal_cpus() const;
void _internal_set_cpus(uint32_t value);
@@ -1313,6 +1353,10 @@ class NodeInfo final :
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr hostname_;
uint64_t start_time_ms_;
uint64_t memory_bytes_;
int64_t total_cpu_millicores_;
int64_t total_memory_bytes_;
int64_t cpu_usage_millicores_;
int64_t memory_usage_bytes_;
uint32_t cpus_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
};
@@ -4384,7 +4428,7 @@ inline void NodeInfo::set_start_time_ms(uint64_t value) {
// @@protoc_insertion_point(field_set:greptime.v1.meta.NodeInfo.start_time_ms)
}
// uint32 cpus = 4;
// uint32 cpus = 4 [deprecated = true];
inline void NodeInfo::clear_cpus() {
_impl_.cpus_ = 0u;
}
@@ -4404,7 +4448,7 @@ inline void NodeInfo::set_cpus(uint32_t value) {
// @@protoc_insertion_point(field_set:greptime.v1.meta.NodeInfo.cpus)
}
// uint64 memory_bytes = 5;
// uint64 memory_bytes = 5 [deprecated = true];
inline void NodeInfo::clear_memory_bytes() {
_impl_.memory_bytes_ = uint64_t{0u};
}
@@ -4474,6 +4518,86 @@ inline void NodeInfo::set_allocated_hostname(std::string* hostname) {
// @@protoc_insertion_point(field_set_allocated:greptime.v1.meta.NodeInfo.hostname)
}
// int64 total_cpu_millicores = 7;
inline void NodeInfo::clear_total_cpu_millicores() {
_impl_.total_cpu_millicores_ = int64_t{0};
}
inline int64_t NodeInfo::_internal_total_cpu_millicores() const {
return _impl_.total_cpu_millicores_;
}
inline int64_t NodeInfo::total_cpu_millicores() const {
// @@protoc_insertion_point(field_get:greptime.v1.meta.NodeInfo.total_cpu_millicores)
return _internal_total_cpu_millicores();
}
inline void NodeInfo::_internal_set_total_cpu_millicores(int64_t value) {
_impl_.total_cpu_millicores_ = value;
}
inline void NodeInfo::set_total_cpu_millicores(int64_t value) {
_internal_set_total_cpu_millicores(value);
// @@protoc_insertion_point(field_set:greptime.v1.meta.NodeInfo.total_cpu_millicores)
}
// int64 total_memory_bytes = 8;
inline void NodeInfo::clear_total_memory_bytes() {
_impl_.total_memory_bytes_ = int64_t{0};
}
inline int64_t NodeInfo::_internal_total_memory_bytes() const {
return _impl_.total_memory_bytes_;
}
inline int64_t NodeInfo::total_memory_bytes() const {
// @@protoc_insertion_point(field_get:greptime.v1.meta.NodeInfo.total_memory_bytes)
return _internal_total_memory_bytes();
}
inline void NodeInfo::_internal_set_total_memory_bytes(int64_t value) {
_impl_.total_memory_bytes_ = value;
}
inline void NodeInfo::set_total_memory_bytes(int64_t value) {
_internal_set_total_memory_bytes(value);
// @@protoc_insertion_point(field_set:greptime.v1.meta.NodeInfo.total_memory_bytes)
}
// int64 cpu_usage_millicores = 9;
inline void NodeInfo::clear_cpu_usage_millicores() {
_impl_.cpu_usage_millicores_ = int64_t{0};
}
inline int64_t NodeInfo::_internal_cpu_usage_millicores() const {
return _impl_.cpu_usage_millicores_;
}
inline int64_t NodeInfo::cpu_usage_millicores() const {
// @@protoc_insertion_point(field_get:greptime.v1.meta.NodeInfo.cpu_usage_millicores)
return _internal_cpu_usage_millicores();
}
inline void NodeInfo::_internal_set_cpu_usage_millicores(int64_t value) {
_impl_.cpu_usage_millicores_ = value;
}
inline void NodeInfo::set_cpu_usage_millicores(int64_t value) {
_internal_set_cpu_usage_millicores(value);
// @@protoc_insertion_point(field_set:greptime.v1.meta.NodeInfo.cpu_usage_millicores)
}
// int64 memory_usage_bytes = 10;
inline void NodeInfo::clear_memory_usage_bytes() {
_impl_.memory_usage_bytes_ = int64_t{0};
}
inline int64_t NodeInfo::_internal_memory_usage_bytes() const {
return _impl_.memory_usage_bytes_;
}
inline int64_t NodeInfo::memory_usage_bytes() const {
// @@protoc_insertion_point(field_get:greptime.v1.meta.NodeInfo.memory_usage_bytes)
return _internal_memory_usage_bytes();
}
inline void NodeInfo::_internal_set_memory_usage_bytes(int64_t value) {
_impl_.memory_usage_bytes_ = value;
}
inline void NodeInfo::set_memory_usage_bytes(int64_t value) {
_internal_set_memory_usage_bytes(value);
// @@protoc_insertion_point(field_set:greptime.v1.meta.NodeInfo.memory_usage_bytes)
}
// -------------------------------------------------------------------
// -------------------------------------------------------------------