Skip to content

v1.0.19

Compare
Choose a tag to compare
@github-actions github-actions released this 30 Sep 11:09
· 6 commits to main since this release
a3edaa0

Add (json|ltsv|regexp|pcap) topN command

$ alp json topN --file example/logs/json_access.log -r
+----+------------------------------+--------+--------+---------------+------------+---------------------------+
|    |             URI              | METHOD | STATUS | RESPONSE TIME | BODY BYTES |           TIME            |
+----+------------------------------+--------+--------+---------------+------------+---------------------------+
| 1  | /foo/bar/5xx                 | GET    | 504    | 60.000        | 15.000     | 2015-09-06T06:00:43+09:00 |
| 2  | /diary/entry/5678            | GET    | 200    | 0.432         | 30.000     | 2015-09-06T06:00:43+09:00 |
| 3  | /req                         | GET    | 200    | 0.321         | 15.000     | 2015-09-06T06:00:43+09:00 |
| 4  | /foo/bar?token=yyy           | POST   | 200    | 0.234         | 34.000     | 2015-09-06T05:58:44+09:00 |
| 5  | /hoge/piyo?id=yyy            | POST   | 200    | 0.234         | 34.000     | 2015-09-06T05:58:44+09:00 |
| 6  | /diary/entry/1234            | GET    | 200    | 0.135         | 15.000     | 2015-09-06T06:00:43+09:00 |
| 7  | /foo/bar?token=zzz           | GET    | 200    | 0.123         | 56.000     | 2015-09-06T06:00:42+09:00 |
| 8  | /foo/bar?token=zzz           | GET    | 200    | 0.123         | 56.000     | 2015-09-06T06:00:42+09:00 |
| 9  | /foo/bar?token=yyy           | POST   | 200    | 0.100         | 34.000     | 2015-09-06T05:58:41+09:00 |
| 10 | /foo/bar?token=yyy           | POST   | 200    | 0.100         | 34.000     | 2015-09-06T05:58:41+09:00 |
| 11 | /foo/bar?token=xxx&uuid=1234 | POST   | 200    | 0.057         | 12.000     | 2015-09-06T05:58:05+09:00 |
| 12 | /foo/bar?token=xxx&uuid=1234 | POST   | 200    | 0.057         | 12.000     | 2015-09-06T05:58:05+09:00 |
+----+------------------------------+--------+--------+---------------+------------+---------------------------+

$ alp json topN 5 --file example/logs/json_access.log -r
+---+--------------------+--------+--------+---------------+------------+---------------------------+
|   |        URI         | METHOD | STATUS | RESPONSE TIME | BODY BYTES |           TIME            |
+---+--------------------+--------+--------+---------------+------------+---------------------------+
| 1 | /foo/bar/5xx       | GET    | 504    | 60.000        | 15.000     | 2015-09-06T06:00:43+09:00 |
| 2 | /diary/entry/5678  | GET    | 200    | 0.432         | 30.000     | 2015-09-06T06:00:43+09:00 |
| 3 | /req               | GET    | 200    | 0.321         | 15.000     | 2015-09-06T06:00:43+09:00 |
| 4 | /foo/bar?token=yyy | POST   | 200    | 0.234         | 34.000     | 2015-09-06T05:58:44+09:00 |
| 5 | /hoge/piyo?id=yyy  | POST   | 200    | 0.234         | 34.000     | 2015-09-06T05:58:44+09:00 |
+---+--------------------+--------+--------+---------------+------------+---------------------------+

Changelog

  • a3edaa0 Merge pull request #84 from tkuchiki/add-topN-subcommand