Skip to content

Releases: tkuchiki/alp

v1.0.21

02 Oct 15:20
971c46c
Compare
Choose a tag to compare

Add --format json option.

$ alp json --file example/logs/json_access.log --format json
[["count","1xx","2xx","3xx","4xx","5xx","method","uri","min","max","sum","avg","p90","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,34,34,34,34],[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,15,15,15,15],[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,30,30,30,30],[1,0,0,0,0,1,"GET","/foo/bar/5xx",60,60,60,60,60,60,60,0,15,15,15,15],[1,0,1,0,0,0,"GET","/req",0.321,0.321,0.321,0.321,0.321,0.321,0.321,0,15,15,15,15],[2,0,2,0,0,0,"GET","/foo/bar",0.123,0.123,0.246,0.123,0.123,0.123,0.123,0,56,56,112,56],[5,0,5,0,0,0,"POST","/foo/bar",0.057,0.234,0.548,0.11,0.234,0.234,0.234,0.065,12,34,126,25.2]]

$ alp json count --file example/logs/json_access.log --keys ua --format json
[["sum","ua"],[1,"UA4"],[3,"UA2"],[4,"UA1"],[4,"UA3"]]

$ alp json topN --file example/logs/json_access.log --format json
[["rank","uri","method","status","restime","bytes","time"],[1,"/foo/bar?token=xxx\u0026uuid=1234","POST",200,0.057,12,"2015-09-06T05:58:05+09:00"],[2,"/foo/bar?token=xxx\u0026uuid=1234","POST",200,0.057,12,"2015-09-06T05:58:05+09:00"],[3,"/foo/bar?token=yyy","POST",200,0.1,34,"2015-09-06T05:58:41+09:00"],[4,"/foo/bar?token=yyy","POST",200,0.1,34,"2015-09-06T05:58:41+09:00"],[5,"/foo/bar?token=zzz","GET",200,0.123,56,"2015-09-06T06:00:42+09:00"],[6,"/foo/bar?token=zzz","GET",200,0.123,56,"2015-09-06T06:00:42+09:00"],[7,"/diary/entry/1234","GET",200,0.135,15,"2015-09-06T06:00:43+09:00"],[8,"/foo/bar?token=yyy","POST",200,0.234,34,"2015-09-06T05:58:44+09:00"],[9,"/hoge/piyo?id=yyy","POST",200,0.234,34,"2015-09-06T05:58:44+09:00"],[10,"/req","GET",200,0.321,15,"2015-09-06T06:00:43+09:00"],[11,"/diary/entry/5678","GET",200,0.432,30,"2015-09-06T06:00:43+09:00"],[12,"/foo/bar/5xx","GET",504,60,15,"2015-09-06T06:00:43+09:00"]]

Changelog

  • 971c46c Merge pull request #86 from tkuchiki/add-output-json

v1.0.20

01 Oct 15:35
4e95db4
Compare
Choose a tag to compare

Move from alp count to alp (json|ltsv|regexp) count.

$ alp json count --file example/logs/json_access.log --keys ua
+-----+-----+
| SUM | UA  |
+-----+-----+
| 1   | UA4 |
| 3   | UA2 |
| 4   | UA1 |
| 4   | UA3 |
+-----+-----+

Changelog

  • 4e95db4 Merge pull request #85 from tkuchiki/fix-count-subcommand

v1.0.19

30 Sep 11:09
a3edaa0
Compare
Choose a tag to compare

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

v1.0.18

27 Sep 00:52
54f59cc
Compare
Choose a tag to compare
  • Add alp (json|ltsv|regexp|pcap) diff command
$ alp json diff <from> <to>
$ alp json diff --load <dumpfile> <to>

Changelog

  • 54f59cc Merge pull request #83 from tkuchiki/add-diff-subcommand

v1.0.17

24 Sep 14:47
b53cca7
Compare
Choose a tag to compare
  • [bugfix] Fix --config option incorrect overwrite behavior

v1.0.16 behavior as follows:

# config file
percentiles:
  - 99
$ alp json --config /tmp/config.yaml --file example/logs/json_access.log
+-------+-----+-----+--------+--------+--------+--------+-----------+-----------+-----------+-----------+
| COUNT | 1XX | ... |  P99   |  P95   |  P99   | STDDEV | MIN(BODY) | MAX(BODY) | SUM(BODY) | AVG(BODY) |
+-------+-----+-----+--------+--------+--------+--------+-----------+-----------+-----------+-----------+
| 1     | 0   | ... | 0.234  | 0.234  | 0.234  | 0.000  | 34.000    | 34.000    | 34.000    | 34.000    |
| 1     | 0   | ... | 0.135  | 0.135  | 0.135  | 0.000  | 15.000    | 15.000    | 15.000    | 15.000    |
| 1     | 0   | ... | 0.432  | 0.432  | 0.432  | 0.000  | 30.000    | 30.000    | 30.000    | 30.000    |
| 1     | 0   | ... | 60.000 | 60.000 | 60.000 | 0.000  | 15.000    | 15.000    | 15.000    | 15.000    |
| 1     | 0   | ... | 0.321  | 0.321  | 0.321  | 0.000  | 15.000    | 15.000    | 15.000    | 15.000    |
| 2     | 0   | ... | 0.123  | 0.123  | 0.123  | 0.000  | 56.000    | 56.000    | 112.000   | 56.000    |
| 5     | 0   | ... | 0.234  | 0.234  | 0.234  | 0.065  | 12.000    | 34.000    | 126.000   | 25.200    |
+-------+-----+-----+--------+--------+--------+--------+-----------+-----------+-----------+-----------+

Changelog

  • b53cca7 Merge pull request #82 from tkuchiki/add-test-for-flags

v1.0.16

02 Sep 14:42
673398a
Compare
Choose a tag to compare
  • [bugfix] Fixed the --config option not working
  • Update CI
  • Upgrade the Go version to 1.21

Changelog

  • 673398a Merge pull request #80 from tkuchiki/update-ci-and-upgrade-go-version
  • 4b0eab1 Merge pull request #79 from Saza-ku/fix/config

v1.0.15

24 Aug 08:08
3b24a87
Compare
Choose a tag to compare
  • [bugfix] Fixed broken --config option
  • [bugfix] Fixed the diff command not working.

Changelog

v1.0.14

24 Jul 13:45
2ba80ec
Compare
Choose a tag to compare
  • [bufgix] Fix --dump and --load not working
    • If you use v1.0.13, please upgrade to v1.0.14

Changelog

  • 2ba80ec Merge pull request #75 from tkuchiki/fix-dump-and-load-not-working

v1.0.13

22 Jul 08:39
9cef20e
Compare
Choose a tag to compare
{"time":"2015-09-06T05:58:05+09:00","method":"POST","uri":"/foo/bar?token=xxx&uuid=1234","status":200,"body_bytes":12,"response_time":0.057,"ua":"chrome","host":"192.168.1.100"}
{"time":"2015-09-06T05:58:41+09:00","method":"POST","uri":"/foo/bar?token=yyy","status":200,"body_bytes":34,"response_time":0.100,"ua":"chrome","host":"192.168.1.100"}
{"time":"2015-09-06T06:00:42+09:00","method":"GET","uri":"/foo/bar?token=zzz","status":200,"body_bytes":56,"response_time":0.123,"ua":"firefox","host":"192.168.1.100"}
{"time":"2015-09-06T05:58:44+09:00","method":"POST","uri":"/foo/bar?token=yyy","status":200,"body_bytes":34,"response_time":0.234,"ua":"firefox","host":"192.168.1.110"}
{"time":"2015-09-06T05:58:44+09:00","method":"POST","uri":"/hoge/piyo?id=yyy","status":200,"body_bytes":34,"response_time":0.234,"ua":"firefox","host":"192.168.1.111"}
{"time":"2015-09-06T05:58:05+09:00","method":"POST","uri":"/foo/bar?token=xxx&uuid=1234","status":200,"body_bytes":12,"response_time":0.057,"ua":"edge","host":"192.168.1.120"}
{"time":"2015-09-06T05:58:41+09:00","method":"POST","uri":"/foo/bar?token=yyy","status":200,"body_bytes":34,"response_time":0.100,"ua":"edge","host":"192.168.1.120"}
{"time":"2015-09-06T06:00:42+09:00","method":"GET","uri":"/foo/bar?token=zzz","status":200,"body_bytes":56,"response_time":0.123,"ua":"edge","host":"192.168.1.120"}
{"time":"2015-09-06T06:00:43+09:00","method":"GET","uri":"/diary/entry/1234","status":200,"body_bytes":15,"response_time":0.135,"ua":"chrome","host":"192.168.1.101"}
{"time":"2015-09-06T06:00:43+09:00","method":"GET","uri":"/diary/entry/5678","status":200,"body_bytes":30,"response_time":0.432,"ua":"chrome","host":"192.168.1.100"}
{"time":"2015-09-06T06:00:43+09:00","method":"GET","uri":"/foo/bar/5xx","status":504,"body_bytes":15,"response_time":60.000,"ua":"chrome","host":"192.168.1.101"}
$ cat access.log | alp count --keys ua,host
+-----+---------+---------------+
| SUM |   UA    |     HOST      |
+-----+---------+---------------+
| 1   | firefox | 192.168.1.100 |
| 1   | firefox | 192.168.1.110 |
| 1   | firefox | 192.168.1.111 |
| 2   | chrome  | 192.168.1.101 |
| 3   | chrome  | 192.168.1.100 |
| 3   | edge    | 192.168.1.120 |
+-----+---------+---------------+

$ cat access.log | alp count --keys ua,host -r

+-----+---------+---------------+
| SUM |   UA    |     HOST      |
+-----+---------+---------------+
| 3   | chrome  | 192.168.1.100 |
| 3   | edge    | 192.168.1.120 |
| 2   | chrome  | 192.168.1.101 |
| 1   | firefox | 192.168.1.100 |
| 1   | firefox | 192.168.1.110 |
| 1   | firefox | 192.168.1.111 |
+-----+---------+---------------+

Changelog

  • 9cef20e Merge pull request #73 from tkuchiki/add-count-subcommand
  • e52b64d Merge pull request #72 from tkuchiki/fix-gitignore
  • d1ba450 Merge pull request #71 from tkuchiki/migrate-to-cobra

v1.0.12

26 Jul 13:10
5ab7a93
Compare
Choose a tag to compare

Bug fix

  • Fix percentile calculation

Changelog

  • 5ab7a93 Merge pull request #67 from tkuchiki/fix-percentile