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

Introduce **kwargs to request_success/failure parameter list #746

Merged
merged 1 commit into from
Apr 27, 2018

Conversation

karol-brejna-i
Copy link
Contributor

Fixes #745

@codecov
Copy link

codecov bot commented Mar 7, 2018

Codecov Report

Merging #746 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #746   +/-   ##
=======================================
  Coverage   65.93%   65.93%           
=======================================
  Files          14       14           
  Lines        1374     1374           
  Branches      214      214           
=======================================
  Hits          906      906           
  Misses        421      421           
  Partials       47       47
Impacted Files Coverage Δ
locust/stats.py 78.35% <100%> (ø) ⬆️

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 592532b...e91a710. Read the comment docs.

@ovanes
Copy link

ovanes commented Apr 25, 2018

Can you please explain how this code is supposed to work in distributed Locust scenario: Master + Multiple Slave. How the kwargs are transferred from a slave to the master node.

@karol-brejna-i
Copy link
Contributor Author

karol-brejna-i commented Apr 27, 2018

@ovanes Sorry for the late answer.

As described here: #745 - current implementation prevent users from introducing their own (additional) on_request_success/failure. This patch is simply about enabling users to do so, and do whatever they want in the additional handler.

Reporting to master is left to the default handlers.

In this case you have:

  • exact the same Locust mechanics for collecting the results,
  • ability for the users to capture/handle additional metadata.

I imagine the next step could be to pass the additional args further, but this is something that needs some thinking (locust stats module pluggability to include user's statistics, etc.). This PR doesn't solve all the problems but gives more flexibility to the users.

@heyman heyman merged commit cdf6aa8 into locustio:master Apr 27, 2018
@heyman
Copy link
Member

heyman commented Apr 27, 2018

Thanks for the PR! Sorry for the long wait before merging this.

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.

3 participants