You can query the current CPU usage using either of the following methods:
In the code:
Use the hidebug.getCpuUsage API. The code snippet is as follows:
let cpuUsage: number = hidebug.getCpuUsage();
In the CLI:
hidumper --cpuusage <pid> hidumper --cpuusage
Reference