tkuchiki / alp

Access Log Profiler
MIT License
670 stars 34 forks source link

Add test for flags #82

Closed tkuchiki closed 1 year ago

tkuchiki commented 1 year ago
percentiles:
  - 99
$ alp json --config /tmp/conf.yaml --file example/logs/json_access.log
+-------+-----+-----+-----+-----+-----+--------+-------------------+--------+--------+--------+--------+--------+--------+--------+--------+-----------+-----------+-----------+-----------+
| COUNT | 1XX | 2XX | 3XX | 4XX | 5XX | METHOD |        URI        |  MIN   |  MAX   |  SUM   |  AVG   |  P99   |  P95   |  P99   | STDDEV | MIN(BODY) | MAX(BODY) | SUM(BODY) | AVG(BODY) |
+-------+-----+-----+-----+-----+-----+--------+-------------------+--------+--------+--------+--------+--------+--------+--------+--------+-----------+-----------+-----------+-----------+
| 1     | 0   | 1   | 0   | 0   | 0   | POST   | /hoge/piyo        | 0.234  | 0.234  | 0.234  | 0.234  | 0.234  | 0.234  | 0.234  | 0.000  | 34.000    | 34.000    | 34.000    | 34.000    |
| 1     | 0   | 1   | 0   | 0   | 0   | GET    | /diary/entry/1234 | 0.135  | 0.135  | 0.135  | 0.135  | 0.135  | 0.135  | 0.135  | 0.000  | 15.000    | 15.000    | 15.000    | 15.000    |
| 1     | 0   | 1   | 0   | 0   | 0   | GET    | /diary/entry/5678 | 0.432  | 0.432  | 0.432  | 0.432  | 0.432  | 0.432  | 0.432  | 0.000  | 30.000    | 30.000    | 30.000    | 30.000    |
| 1     | 0   | 0   | 0   | 0   | 1   | GET    | /foo/bar/5xx      | 60.000 | 60.000 | 60.000 | 60.000 | 60.000 | 60.000 | 60.000 | 0.000  | 15.000    | 15.000    | 15.000    | 15.000    |
| 1     | 0   | 1   | 0   | 0   | 0   | GET    | /req              | 0.321  | 0.321  | 0.321  | 0.321  | 0.321  | 0.321  | 0.321  | 0.000  | 15.000    | 15.000    | 15.000    | 15.000    |
| 2     | 0   | 2   | 0   | 0   | 0   | GET    | /foo/bar          | 0.123  | 0.123  | 0.246  | 0.123  | 0.123  | 0.123  | 0.123  | 0.000  | 56.000    | 56.000    | 112.000   | 56.000    |
| 5     | 0   | 5   | 0   | 0   | 0   | POST   | /foo/bar          | 0.057  | 0.234  | 0.548  | 0.110  | 0.234  | 0.234  | 0.234  | 0.065  | 12.000    | 34.000    | 126.000   | 25.200    |
+-------+-----+-----+-----+-----+-----+--------+-------------------+--------+--------+--------+--------+--------+--------+--------+--------+-----------+-----------+-----------+-----------+