Type Definition swanling::metrics::SwanlingRequestMetrics[][src]

type SwanlingRequestMetrics = HashMap<String, SwanlingRequestMetricAggregate>;
Expand description

All requests made during a load test.

Swanling optionally tracks metrics about requests made during a load test. The metrics can be disabled with the --no-metrics run-time option, or with SwanlingDefault::NoMetrics.

Aggregated requests (SwanlingRequestMetricAggregate) are stored in a HashMap with they key method request-name, for example GET /.

Example

When viewed with std::fmt::Display, SwanlingRequestMetrics are displayed in a table:

=== PER REQUEST METRICS ===
------------------------------------------------------------------------------
Name                     |        # reqs |        # fails |    req/s |  fail/s
------------------------------------------------------------------------------
GET (Anon) front page    |           438 |         0 (0%) |    43.80 |    0.00
GET (Anon) node page     |           296 |         0 (0%) |    29.60 |    0.00
GET (Anon) user page     |            90 |         0 (0%) |     9.00 |    0.00
GET (Auth) comment form  |            19 |         0 (0%) |     1.90 |    0.00
GET (Auth) front page    |           108 |         0 (0%) |    10.80 |    0.00
GET (Auth) node page     |            74 |         0 (0%) |     7.40 |    0.00
GET (Auth) user page     |            19 |         0 (0%) |     1.90 |    0.00
GET static asset         |         3,288 |         0 (0%) |   328.80 |    0.00
POST (Auth) comment form |            20 |         0 (0%) |     2.00 |    0.00
-------------------------+---------------+----------------+----------+--------
Aggregated               |         4,352 |         0 (0%) |   435.20 |    0.00
------------------------------------------------------------------------------
Name                     |    Avg (ms) |        Min |        Max |      Median
------------------------------------------------------------------------------
GET (Anon) front page    |       14.22 |          2 |         211 |         14
GET (Anon) node page     |       53.26 |          3 |          96 |         53
GET (Anon) user page     |       32.97 |         17 |         221 |         30
GET (Auth) comment form  |       54.32 |         36 |          88 |         50
GET (Auth) front page    |       39.02 |         25 |         232 |         38
GET (Auth) node page     |       52.08 |         36 |          81 |         51
GET (Auth) user page     |       31.21 |         25 |          40 |         31
GET static asset         |       11.55 |          3 |         217 |          8
POST (Auth) comment form |       54.30 |         41 |          73 |         52
-------------------------+-------------+------------+-------------+-----------
Aggregated               |       16.94 |          2 |         232 |         10
------------------------------------------------------------------------------
Slowest page load within specified percentile of requests (in ms):
------------------------------------------------------------------------------
Name                     |    50% |    75% |    98% |    99% |  99.9% | 99.99%
------------------------------------------------------------------------------
GET (Anon) front page    |     14 |     18 |     30 |     43 |    210 |    210
GET (Anon) node page     |     53 |     62 |     78 |     86 |     96 |     96
GET (Anon) user page     |     30 |     33 |     43 |     53 |    220 |    220
GET (Auth) comment form  |     50 |     65 |     88 |     88 |     88 |     88
GET (Auth) front page    |     38 |     43 |     58 |     59 |    230 |    230
GET (Auth) node page     |     51 |     58 |     72 |     72 |     81 |     81
GET (Auth) user page     |     31 |     33 |     40 |     40 |     40 |     40
GET static asset         |      8 |     16 |     30 |     36 |    210 |    210
POST (Auth) comment form |     52 |     59 |     73 |     73 |     73 |     73
-------------------------+--------+--------+--------+--------+--------+-------
Aggregated               |     10 |     20 |     64 |     71 |    210 |    230