'Measure CPU usage in Cypress/Javascript
I recently had an issue in my ReactJS web app that caused severe performance issues. Some component had a bug that caused it to frequently render and cause high CPU usage, over time leading to an unresponsive app. A way to objectively spot the issue was by recording performance in Chrome dev tools. This showed high amounts of time spent in rendering.
Apart from fixing this issue, I'm now looking into a way of detecting such issues by writing a test in Cypress that would detect performance issues like this.
Unfortunately, simply measuring page load times does not show a significant increase. Ideally, I would like to be able to measure CPU usage, or the amount of time the app spends in rendering.
Is there any way to do this in Cypress? Or some other test framework?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
