Report memory usage and correct CPU percentage in heartbeat messages
I am picking up the work related to #165 an will be splitting it out into smaller more digestible PRs as requested.
The CPU percent change is to bring the stats in line with CPU utilization numbers as reported by tools like top. Usually CPU percentage isn't normalized by CPU count, but it is allowed to exceed 100% if it is loading across multiple cores.
The CPU percentage is intentionally normalized by CPU count, to match the behavior of locust. Do you think we need to change this?
I can switch it back. If locust normalizes it by default I think that is a mistake that can lead to confusion, but that confusion may be less than the confusion that comes from diverging from normal locust behavior.
In either case I didn't make any changes to the commits I cherry picked in from the previous PR so I'm not specifically attached to the design change as long as we get things reporting good enough numbers. I'll normalize the percentage by CPU count tomorrow when I get in to work.
Because locust can't make use of multiple cores with gevent, so the CPU percentage collected by locust won't go beyond 100% most of the time.
I have reverted the CPU usage change.