I work on an ESP32 board. Micropython is so cool as multi-thread is supported. But I wonder if there is a way to check the CPU load and the memory usage when I run my script.
Sorry if this question is too stupid...
Can I get current CPU load and memory usage
Re: Can I get current CPU load and memory usage
You can get all kinds of memory details with the gc module.
Getting the CPU Usage makes no sense because in the uc world a CPU is running "all the time" (this is also true for modern PCs, but the OS sometimes runs a code snippet called "idle loop" which lets the CPU spin without doing anything, that's how the sheduler knows if the CPU is running a program (running) or running the idle loop (doing nothing usefull and ready to do real world)).
Getting the CPU Usage makes no sense because in the uc world a CPU is running "all the time" (this is also true for modern PCs, but the OS sometimes runs a code snippet called "idle loop" which lets the CPU spin without doing anything, that's how the sheduler knows if the CPU is running a program (running) or running the idle loop (doing nothing usefull and ready to do real world)).