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

Add topN subcommand #84

Merged
merged 1 commit into from
Sep 30, 2023
Merged

Add topN subcommand #84

merged 1 commit into from
Sep 30, 2023

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
1 check passed
@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