process resource monitoring tool
A process resource monitoring tool that can collect the memory, cpu and other resource usage of the specified process and draw a graph.
一个进程资源监视工具, 可以收集指定进程的内存, cpu等等资源的使用并且绘制成图表.
linux/windows/macos
depends on heim#platform-support
cargo +nightly build --releaseclairvoyance record helpRecord the specified process at a frequency of 600ms, and output the result to the result directory:
clairvoyance record -f 600ms -o result <pid> [<pid>]...ctrl+c stops you should notice a file result/<pid>-<time>.clairvoyance.
clairvoyance render helpRender the specified intermediate file into an icon, the targets include memory(-m), cpu(-c), io(-i), and output the image generated by rendering to the result/out directory.
clairvoyance render -o result/out -m -c -i result/<pid>-<time>.clairvoyanceUse the -j option to convert the intermediate file to json format, which you can then read and render yourself.
clairvoyance render -o result/out -j result/<pid>-<time>.clairvoyanceexample: result.json
the specific format can refer to: data.rs
This project relies on heim to collect process information on specific platforms.