I'll be happy to answer your question.
Let me say first, just for clarity, the screenshots of CPU usage were just screenshots from the Activity Monitor app.
Secondly, let me say that normally any macro which contains a "Find Image action" will probably not work on anyone else's Mac, due to a variety of issues such as screen resolution. HOWEVER in this case the Find Image action is specifically designed to look for an image that is NOT on the screen, so that means I could upload a macro with Find Image and it will "work" because it is intended to fail to find anything.
Thirdly, if your goal is to see your Activity Monitor, like I had shown above, well that was all done manually. My macro did not have anything to do with setting up those windows. I did that all manually.
Nonetheless I can show you the macros that I was referring to.
FIRST:
This is a simple infinite loop macro that I used, which looks for an image of a tree on the screen, which it will never find. Note that the "CPU" option is turned off in this macro. You should use your own image of something that is not going to be on your screen. I used this approach to generate the heaviest load possible on the CPU, as you can see in my first Activity Monitor screenshot above.
SECOND:
This is a modified infinite loop macro that I used which is similar to the above, but takes advantage of KM v11's new feature to insert pauses in the loop so that the CPU becomes less stressed over time. I used this approach to generate the lighter load on my CPU, as you can see from my second Activity Monitor screenshot, above.
As you can see from my Activity Monitor screenshots above, using this flag caused a significant decrease in CPU usage. That's because the KM Engine inserts some pauses as time goes on. I don't have the details as to how long those pauses are.
THIRD:
Here's an example of the "hybrid" approach that I often use. In this case, I'm searching FOR a specific image. I want the search algorithm to do something whenever it finds the image. In this example, I produce a sound. And notice that this macro will check for the image approximately three times per second. (Because of the Pause 0.33 seconds action.) Also notice that I have set this macro to restart every second, but the extra copy will abort if a copy is already running because of the Semaphore action at the top.
Notice in this example that there is an infinite while loop, while at the same time there is a Pause statement inside the loop to reduce the load on the CPU. If the user should press a key to "cancel all KM macros", this macro will restart itself approximately one second later, but you don't have to auto-restart this macro if you won't want to.
This is the approach griffman was referring to when he said "I didn't consider an infinite loop and pause action - nice solution!"
Search for a Tree on the Screen every 0.33 seconds Macro (v11.0.1)
Search for a Tree on the Screen every 0.33 seconds.kmmacros (91 KB)
You could potentially run this action and it will beep when it finds a tree on the screen, but it will never find that tree on your screen, because you must replace that image with your own image due to screen resolution issues. You can replace the tree by an image of your own choosing, and then this macro will beep whenever your chosen image appears on your screen.