CPU Pressure API is very easy to use it has only one public GetCPUPressure client action which return the CPU Pressure state, Possible values are nominal, fair, serious and critical.
here is the meaning of all possible pressure states -
⚪ "nominal": The conditions of the target device are at an acceptable level with no noticeable adverse effects on the user.
🟢 "fair": Target device pressure, temperature and/or energy usage are slightly elevated, potentially resulting in reduced battery-life, as well as fans (or systems with fans) becoming active and audible. Apart from that the target device is running flawlessly and can take on additional work.
🟡 "serious": Target device pressure, temperature and/or energy usage is consistently highly elevated. The system may be throttling as a countermeasure to reduce thermals.
🔴 "critical": The temperature of the target device or system is significantly elevated and it requires cooling down to avoid any potential issues.
CPU Pressure API is based on JavaScript Computer Pressure API, click on link to see Browser compatibility.