myzhan / locust4j

Locust4j is a load generator for locust, written in Java.
MIT License
81 stars 30 forks source link

Add cpu usage stats to heartbeat messages #14

Closed aparmet-toast closed 4 years ago

aparmet-toast commented 4 years ago

Locust since 0.14.0 requires CPU usage to be reported by clients. Somehow this also prevented the master from properly recording heartbeats (although I'm not sure how, as that happens earlier in the control flow).

CPU usage extraction: https://github.com/locustio/locust/blob/93eec54bd53576304c925ceb8c1e8de5981d7b24/locust/runners.py#L462

Heartbeat reset: https://github.com/locustio/locust/blob/93eec54bd53576304c925ceb8c1e8de5981d7b24/locust/runners.py#L460

No matter, this should be included and also appears to fix the heartbeat issue.

codecov-io commented 4 years ago

Codecov Report

Merging #14 into master will increase coverage by 0.44%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #14      +/-   ##
=========================================
+ Coverage   78.25%   78.7%   +0.44%     
=========================================
  Files          19      19              
  Lines         860     864       +4     
  Branches       78      78              
=========================================
+ Hits          673     680       +7     
+ Misses        169     165       -4     
- Partials       18      19       +1
Impacted Files Coverage Δ
...ava/com/github/myzhan/locust4j/runtime/Runner.java 73.51% <100%> (+2.79%) :arrow_up:
...n/java/com/github/myzhan/locust4j/stats/Stats.java 94.48% <0%> (-0.79%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 03327e1...c7ca05c. Read the comment docs.