-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Remove Confluence specific task ratio formatter #13
Comments
I agree. It could maybe reside in some contrib package. However, I do think it's better to have the print_task_ratio code in a separate module than in an inline function in main.py. |
I would say such code does not belong even in a contrib package. However outputting say JSON to do whatever might be more appropriate. Then you could write your 30 line Python script to transform that into whatever you please. Maybe there's a better place for it but the reason I inlined that function was that it was only used in one place. With such small resulting file, I felt it really didn't justify its own module. |
Yeah, I think you're right that the confluence stuff shouldn't be in the repo at all. I definitely think it should be in a separate module though. Namespacing is nice and the code has little to do with anything else in main.py. If not because of anything else, keeping the main module clean is an argument in itself. Also - like with your JSON idea - I'm pretty sure we'll want to add more stuff for inspecting the locust "run schedules" sooner or later. |
Of course, that is what namespaces are for. But when content is less than 20 lines long and only referenced in one place, a separate module is rarely justified. On a side note: if we should continue with the current naming scheme, I like the name "brain" for "run schedules" . |
IMHO, the purpose of a part of code is more important than the number of lines, when deciding if it should go into a separate module, even though I agree that size does matter :). I.e. I wouldn't like to merge our exception module into any of the other modules. Anyway, I liked your idea of outputting the task ratio in JSON format, and I've now implemented it. I put that code, together with the print_task_ratio into it's own module again. The commits are: bc2992b and 1ee00c8. I love the "brain" naming! |
The exception module has a place because it's used from many places. Maybe even for working around circular imports. Oh well, enough bikeshedding. |
Add event for allowing plugins to handle reconfiguration events trigg…
Prima bugfix timer doesn't work smoothly
Domain specific code for formatting the task ratio output for Confluence is a bit too specific to keep in Locust.
The text was updated successfully, but these errors were encountered: