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

Would love a swarm_complete event #26

Closed
nstielau opened this issue Apr 20, 2012 · 2 comments
Closed

Would love a swarm_complete event #26

nstielau opened this issue Apr 20, 2012 · 2 comments

Comments

@nstielau
Copy link

Hey,

What I really want is to output a JSON representation of the swarm (and nothing else) to STDOUT upon completion. It doesn't seem like the hooks support this at present. Perhaps a swarm_complete hook could accomplish this.

Thanks! Great stuff!

@Jahaja
Copy link
Member

Jahaja commented Apr 24, 2012

Hi nstielau,
Not sure I follow, how would this swarm representation look like?

@nstielau
Copy link
Author

Hey,

I want the stats info as JSON. So this final output

INFO:locust.core:All locusts dead

 Name                                                          # reqs      # fails     Avg     Min     Max  |  Median   req/s
--------------------------------------------------------------------------------------------------------------------------------------------
 /news                                                              2     0(0.00%)      45      44      46  |      44    0.00
 /tour                                                              3     0(0.00%)     626      42    1411  |     430    0.10
--------------------------------------------------------------------------------------------------------------------------------------------
 Total                                                              5     0(0.00%)                                       0.10

Percentage of the requests completed within given times
 Name                                                           # reqs    50%    66%    75%    80%    90%    95%    98%    99%   100%
--------------------------------------------------------------------------------------------------------------------------------------------
 /news                                                               2     45     45     45     45     45     45     45     45     46
 /tour                                                               3    430    740    915   1012   1206   1302   1361   1380   1400
--------------------------------------------------------------------------------------------------------------------------------------------
 Total                                                               5     46    291    430    624   1012   1205   1322   1361   1400

could look something like (ignore the numbers, just the basic idea)

{
  "paths": {
    "/tour": {
      "num_requests": 2,
      "num_fails": 0,
      "avg": 45,
      "min": 44,
      "max": 46,
      "median": 44,
      "rps": 0.00,
      "50_percent_duration": 45,
      "66_percent_duration": 45,
      "75_percent_duration": 45,
      "90_percent_duration": 45,
      "95_percent_duration": 45,
      "98_percent_duration": 45,
      "99_percent_duration": 45,
      "100_percent_duration": 45
    },
    "/news": {
      "num_requests": 3,
      "num_fails": 0,
      "avg": 45,
      "min": 42,
      "max": 626,
      "median": 44,
      "rps": 0.10,
      "50_percent_duration": 145,
      "66_percent_duration": 145,
      "75_percent_duration": 145,
      "90_percent_duration": 145,
      "95_percent_duration": 145,
      "98_percent_duration": 145,
      "99_percent_duration": 145,
      "100_percent_duration": 45
    }
  }
}

pancaprima pushed a commit to pancaprima/locust that referenced this issue Nov 21, 2017
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

No branches or pull requests

2 participants