macmon icon indicating copy to clipboard operation
macmon copied to clipboard

add `cpu_usage` field

Open alkene5 opened this issue 10 months ago • 4 comments

alkene5 avatar Jun 02 '25 10:06 alkene5

Hi, @alkene0005. Where do you want to have this field?

vladkens avatar Jun 02 '25 20:06 vladkens

Hi, @alkene0005. Where do you want to have this field?你好,你想把这个字段放在哪里?

I don’t have much idea about the UI part. I hope the JSON returned by macmon pipe can provide what I need.

alkene5 avatar Jun 03 '25 06:06 alkene5

@alkene0005

macmon in pipe mode already returns ecpu_usage and pcpu_usage which is efficiency cores frequency (first array index = 535) and load (second array index = 0.0159), same for performance cores. Do you want to have unified field like cpu_usage from 0 to 1 with combined usage value from ecpu and pcpu? Do you need frequency too (like same with current ecpu_usage & pcpu_usage structure; but frequency in this case will be extremely approximated)?

[DeepSeek翻译] 管道模式下的 macmon 已经返回了 ecpu_usagepcpu_usage,其中能效核频率(数组第一个元素 = 535)和负载(数组第二个元素 = 0.0159),性能核同理。您是否想要一个统一的 cpu_usage 字段(范围 01),合并 ecpupcpu 的使用率值?您是否需要频率信息(保持现有的 ecpu_usagepcpu_usage 结构,但频率值会是极度近似值)?

vladkens avatar Jun 03 '25 11:06 vladkens

@alkene0005

macmon in pipe mode already returns ecpu_usage and pcpu_usage which is efficiency cores frequency (first array index = 535) and load (second array index = 0.0159), same for performance cores. Do you want to have unified field like cpu_usage from 0 to 1 with combined usage value from ecpu and pcpu? Do you need frequency too (like same with current ecpu_usage & pcpu_usage structure; but frequency in this case will be extremely approximated)?

[DeepSeek翻译] 管道模式下的 macmon 已经返回了 ecpu_usagepcpu_usage,其中能效核频率(数组第一个元素 = 535)和负载(数组第二个元素 = 0.0159),性能核同理。您是否想要一个统一的 cpu_usage 字段(范围 01),合并 ecpupcpu 的使用率值?您是否需要频率信息(保持现有的 ecpu_usagepcpu_usage 结构,但频率值会是极度近似值)?

Yes, I think it’s better to provide both. Many times, we might only need the overall CPU usage, which is very convenient.

alkene5 avatar Jun 03 '25 20:06 alkene5