mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2025-12-22 22:20:02 +00:00
feat: add cpu_usage_millicores and memory_usage_bytes in information_schema.cluster_info table. (#7051)
* refactor: add `hostname` in cluster_info table Signed-off-by: zyy17 <zyylsxm@gmail.com> * chore: update information schema result Signed-off-by: zyy17 <zyylsxm@gmail.com> * feat: enable zstd for bulk memtable encoded parts (#7045) feat: enable zstd in bulk memtable Signed-off-by: evenyag <realevenyag@gmail.com> * refactor: add `get_total_cpu_millicores()` / `get_total_cpu_cores()` / `get_total_memory_bytes()` / `get_total_memory_readable()` in common-stat Signed-off-by: zyy17 <zyylsxm@gmail.com> * feat: add `cpu_usage_millicores` and `memory_usage_bytes` in `information_schema.cluster_info` table Signed-off-by: zyy17 <zyylsxm@gmail.com> * fix: compile warning and integration test failed Signed-off-by: zyy17 <zyylsxm@gmail.com> * fix: integration test failed Signed-off-by: zyy17 <zyylsxm@gmail.com> * refactor: add `ResourceStat` Signed-off-by: zyy17 <zyylsxm@gmail.com> * refactor: apply code review comments Signed-off-by: zyy17 <zyylsxm@gmail.com> * chore: update greptime-proto Signed-off-by: zyy17 <zyylsxm@gmail.com> --------- Signed-off-by: zyy17 <zyylsxm@gmail.com> Signed-off-by: evenyag <realevenyag@gmail.com> Co-authored-by: Yingwen <realevenyag@gmail.com>
This commit is contained in:
@@ -35,6 +35,7 @@ common-procedure.workspace = true
|
||||
common-query.workspace = true
|
||||
common-recordbatch.workspace = true
|
||||
common-runtime.workspace = true
|
||||
common-stat.workspace = true
|
||||
common-telemetry.workspace = true
|
||||
common-test-util.workspace = true
|
||||
common-time.workspace = true
|
||||
|
||||
@@ -44,6 +44,7 @@ use common_meta::kv_backend::memory::MemoryKvBackend;
|
||||
use common_meta::peer::Peer;
|
||||
use common_runtime::Builder as RuntimeBuilder;
|
||||
use common_runtime::runtime::BuilderBuild;
|
||||
use common_stat::ResourceStatImpl;
|
||||
use common_test_util::temp_dir::create_temp_dir;
|
||||
use common_wal::config::{DatanodeWalConfig, MetasrvWalConfig};
|
||||
use datanode::config::DatanodeOptions;
|
||||
@@ -411,11 +412,15 @@ impl GreptimeDbClusterBuilder {
|
||||
|
||||
let fe_opts = self.build_frontend_options();
|
||||
|
||||
let mut resource_stat = ResourceStatImpl::default();
|
||||
resource_stat.start_collect_cpu_usage();
|
||||
|
||||
let heartbeat_task = HeartbeatTask::new(
|
||||
&fe_opts,
|
||||
meta_client.clone(),
|
||||
HeartbeatOptions::default(),
|
||||
Arc::new(handlers_executor),
|
||||
Arc::new(resource_stat),
|
||||
);
|
||||
|
||||
let instance = FrontendBuilder::new(
|
||||
|
||||
Reference in New Issue
Block a user