Skip to content

Commit

Permalink
Merge pull request #1491 from max-rocket-internet/remove_loadgen
Browse files Browse the repository at this point in the history
Remove "Loadgen" from CPU warning log messages
  • Loading branch information
cyberw authored Jul 23, 2020
2 parents b18cf1e + ee909a5 commit 4eca0b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions locust/runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def user_count(self):
def cpu_log_warning(self):
"""Called at the end of the test to repeat the warning & return the status"""
if self.cpu_warning_emitted:
logger.warning("Loadgen CPU usage was too high at some point during the test! See https://docs.locust.io/en/stable/running-locust-distributed.html for how to distribute the load over multiple CPU cores or machines")
logger.warning("CPU usage was too high at some point during the test! See https://docs.locust.io/en/stable/running-locust-distributed.html for how to distribute the load over multiple CPU cores or machines")
return True
return False

Expand Down Expand Up @@ -213,7 +213,7 @@ def monitor_cpu(self):
while True:
self.current_cpu_usage = process.cpu_percent()
if self.current_cpu_usage > 90 and not self.cpu_warning_emitted:
logging.warning("Loadgen CPU usage above 90%! This may constrain your throughput and may even give inconsistent response time measurements! See https://docs.locust.io/en/stable/running-locust-distributed.html for how to distribute the load over multiple CPU cores or machines")
logging.warning("CPU usage above 90%! This may constrain your throughput and may even give inconsistent response time measurements! See https://docs.locust.io/en/stable/running-locust-distributed.html for how to distribute the load over multiple CPU cores or machines")
self.cpu_warning_emitted = True
gevent.sleep(CPU_MONITOR_INTERVAL)

Expand Down

0 comments on commit 4eca0b9

Please sign in to comment.