Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: #2955 Allow to exclude some statistics from aggregation #2956

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tyge68
Copy link
Contributor

@tyge68 tyge68 commented Oct 26, 2024

Here is a sample implementation allowing to set the --exclude-from-aggregation argument option.

locust --exclude-from-aggregation "CUSTOM"

Note:

  • it can be also set using environment variable LOCUST_EXCLUDE_FROM_AGGREGATION
  • it can be set via your init script under the environment.stats object property exclude_from_aggregation
Screenshot 2024-10-26 at 11 45 47

@tyge68 tyge68 force-pushed the issues/2955 branch 7 times, most recently from 4c04514 to faeef8e Compare October 26, 2024 11:38
@tyge68
Copy link
Contributor Author

tyge68 commented Oct 26, 2024

If anyone has ideas why Mypy step fails, the error seems unrelated to the change, at least the line for which the error is triggered wasn't updated by this PR at all.

@cyberw
Copy link
Collaborator

cyberw commented Oct 28, 2024

Does mypy (using 1.11.2) work for you locally?

@tyge68
Copy link
Contributor Author

tyge68 commented Oct 28, 2024

@cyberw no it seems to be the same issue, it's really not clear why this tool is failing especially as those lines are not touched by this PR

@cyberw
Copy link
Collaborator

cyberw commented Oct 29, 2024

Not sure what the typing issue is, but passing the whole environment into the RequestsStats constructor is awkward. Maybe just pass the exclude_from_aggregation regex?

@tyge68 tyge68 force-pushed the issues/2955 branch 12 times, most recently from aae127a to c7be3db Compare November 1, 2024 07:26
@tyge68
Copy link
Contributor Author

tyge68 commented Nov 1, 2024

@cyberw thanks for your feedback, I have updated it now and also changed to allow setting that via command arguments.
Still the same Mypy is happening which is really unclear. I am not too familiar with that tool and what is the purpose of it, why it fails etc... might be worth checking with Mypy experts.

@cyberw
Copy link
Collaborator

cyberw commented Nov 2, 2024

Can you try grabbing this change: 74d5de4

It seems to have been a "real" issue with the type hints in the code, but I still don't understand why your PR exposed it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants