Skip to content

Add topN subcommand#84

Merged
tkuchiki merged 1 commit intomainfrom
add-topN-subcommand
Sep 30, 2023
Merged

Add topN subcommand#84
tkuchiki merged 1 commit intomainfrom
add-topN-subcommand

Conversation

@tkuchiki
Copy link
Owner

SSIA

$ 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 |
+---+--------------------+--------+--------+---------------+------------+---------------------------+

@tkuchiki tkuchiki merged commit a3edaa0 into main Sep 30, 2023
@tkuchiki tkuchiki deleted the add-topN-subcommand branch September 30, 2023 11:02
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.

1 participant