Skip to content

Commit

Permalink
additional logging
Browse files Browse the repository at this point in the history
  • Loading branch information
mgor committed Nov 13, 2024
1 parent 85d7925 commit 6ee67aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions grizzly/locust.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from collections import defaultdict
from contextlib import contextmanager, suppress
from dataclasses import dataclass
from datetime import datetime, timezone
from math import ceil, floor
from operator import attrgetter, itemgetter
from os import environ
Expand Down Expand Up @@ -1326,6 +1327,7 @@ def grizzly_print_stats(stats: lstats.RequestStats, *, current: bool = True, gri
("%-" + str(lstats.STATS_TYPE_WIDTH) + "s %-" + str(name_column_width) + "s %7s %12s |%7s %7s %7s%7s | %7s %11s")
% ("Type", "Name", "# reqs", "# fails", "Avg", "Min", "Max", "Med", "req/s", "failures/s")
)
stats_logger.info(datetime.now(timezone.utc).isoformat())
stats_logger.info(row)
separator = f'{"-" * lstats.STATS_TYPE_WIDTH}|{"-" * (name_column_width)}|{"-" * 7}|{"-" * 13}|{"-" * 7}|{"-" * 7}|{"-" * 7}|{"-" * 7}|{"-" * 8}|{"-" * 11}'
stats_logger.info(separator)
Expand Down
2 changes: 1 addition & 1 deletion grizzly/tasks/log_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ def __call__(self) -> grizzlytask:
@grizzlytask
def task(parent: GrizzlyScenario) -> Any:
message = parent.user.render(self.message)
parent.logger.info(message)
parent.user.logger.info(message)

return task

0 comments on commit 6ee67aa

Please sign in to comment.