How to use Spy in Component
Editor to share with you how to use Spy in Component, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Spy is used to monitor the use of CPU
You can see its help information by calling spyHelp () in Shell
There is no parameter assigned to spy (), so the default value is that data is collected 100 times per second and printed every 5 seconds. The "total" column explicitly shows the CPU usage since the call to spy (), and the "delta" column explicitly shows the data since the last print.
The command spyStop () is used to stop data collection / assist clock interruptions and print periodically.
You can also manually monitor CPU usage by calling spyClkStart () / spyReport () / spyClkStop (), which prints in the same format as spy (), except that each spyReport () prints data only once