*: Replace custom cpu memory metrics with Prometheus crate metrics
The Prometheus Rust crate offers process related metrics with the `process` feature. This patch enables the feature on non-wasm platforms and registers the process metrics with the Substrate registry. In addition it removes the existing manually exposed cpu and memory metrics. The first block of metrics is replaced by the second block of metrics. ``` \# HELP substrate_cpu_usage_percentage Node CPU usage \# TYPE substrate_cpu_usage_percentage gauge substrate_cpu_usage_percentage 1.2066365480422974 \ # HELP substrate_memory_usage_bytes Node memory usage \ # TYPE substrate_memory_usage_bytes gauge substrate_memory_usage_bytes 86628 ``` ``` \# HELP substrate_process_cpu_seconds_total Total user and system CPU time spent in seconds. \# TYPE substrate_process_cpu_seconds_total counter substrate_process_cpu_seconds_total 1.05 \# HELP substrate_process_max_fds Maximum number of open file descriptors. \# TYPE substrate_process_max_fds gauge substrate_process_max_fds 1048576 \# HELP substrate_process_open_fds Number of open file descriptors. \# TYPE substrate_process_open_fds gauge substrate_process_open_fds 99 \# HELP substrate_process_resident_memory_bytes Resident memory size in bytes. \# TYPE substrate_process_resident_memory_bytes gauge substrate_process_resident_memory_bytes 104386560 \# HELP substrate_process_start_time_seconds Start time of the process since unix epoch in seconds. \# TYPE substrate_process_start_time_seconds gauge substrate_process_start_time_seconds 1584963169.7 \# HELP substrate_process_virtual_memory_bytes Virtual memory size in bytes. \# TYPE substrate_process_virtual_memory_bytes gauge substrate_process_virtual_memory_bytes 2903089152 ```
parent
feac1d9b
Please register or sign in to comment