Access Log Profiler
alp is Access Log Profiler
You can pick your download here, and install it as follows:
sudo install /usr/local/bin/alpInstall alp with Homebrew
brew install alpInstall alp with asdf and asdf-alp
asdf plugin-add alp https://github.com/asdf-community/asdf-alp.git
asdf install alp
asdf global alp See: The difference between v0.4.0 and v1.0.0
…timemethoduristatusapptimereqtime--xxx-label option can you change the name to any label…LogFormat "time:%t\tforwardedfor:%{X-Forwarded-For}i\thost:%h\treq:%r\tstatus:%>s\tmethod:%m\turi:%U%q\tsize:%B\treferer:%{Referer}i\tua:%{User-Agent}i\treqtime_microsec:%D\tapptime:%D\tcache:%{X-Cache}o\truntime:%{X-Runtime}o\tvhost:%{Host}i" ltsv…access-log:
format: "time:%t\thost:%h\tua:\"%{User-agent}i\"\tstatus:%s\treq:%r\turi:%U\tapptime:%{duration}x\tsize:%b\tmethod:%m"timemethoduristatusresponse_timerequest_time--xxx-key option can you change the name to any key…LogFormat "{\"time\":\"%t\",\"forwardedfor\":\"%{X-Forwarded-For}i\",\"host\":\"%h\",\"req\":\"%r\",\"status\":%>s,\"method\":\"%m\",\"uri\":\"%U%q\",\"body_bytes\":%B,\"referer\":\"%{Referer}i\",\"ua\":\"%{User-Agent}i\",\"reqtime_microsec\":%D,\"response_time\":%D,\"cache\":\"%{X-Cache}o\",\"runtime\":\"%{X-Runtime}o\",\"vhost\":\"%{Host}i\"}" json…access-log:
escape: json
format: '{"time":"%t","host":"%h","ua":"%{User-agent}i","status":%s,"req":"%r","uri":"%U","response_time":%{duration}x,"body_bytes":%b,"method":"%m"}'timemethoduristatusresponse_timerequest_time--xxx-subexp option can you change the name to any named capture groups…LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\" %D" combined_plus log_format combined_plus '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" $upstream_response_time $request_time';access-log:
format: "%h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\" %{duration}x"--pcap-server-ip option127.0.0.1 and ::1 will be the defaults in environments where permissions to retrieve network interface information are restricted.--pcap-server-port option--pos. (not yet supported)…+ means an increasing number of requests and body size, and response time is slower- means a decreasing number of requests and body size, and response time is faster…See: Usage samples
-c, --config--file=FILE -d, --dump=DUMP-l, --load=LOAD-d, --dump option--sort and --reverse options for the same profile results--sort=countmax, min, sum, avgmax-body, min-body, sum-body, avg-body p90, p95, p99, stddevurimethodcountcountp90, p95, and p99 are modified by the values specified in --percentiles-r, --reverse-q, --query-string--qs-ignore-values-q, --query-string--decode-uri--format=table--noheaders--show-footers--limit=5000--location="Local"-o, --output="all"count,1xx, 2xx, 3xx, 4xx, 5xx, method, uri, min, max, sum, avg, p90, p95, p99, stddev, min_body, max_body, sum_body, avg_bodyp90, p95, and p99 are modified by the values specified in --percentilesall-m, --matching-groups=PATTERN,...-f, --filters=FILTERS--pos=POSITION_FILE--nosave-pos--pos is profiled, but the number of bytes reads is not stored--percentiles90,95,99Consider the following cases like /diary/entry/1234 and /diary/entry/5678.
If you simply profile URIs with different parameters on the same route, they will be profiled by parameter, but you may want to profile them by the route.
……In such a case, there is an option -m, --matching-groups=PATTERN,....
You can also specify multiple items separated by commas.
It is a function to include or exclude targets according to the conditions.
Filter on the following variables:.
UriMethodTimeResponseTimeBodyBytesStatusThe following operators are available:.
+, -, *, /, %, **(pow) ==, !=, ``, =not, !and, &&or, ||matchesUri matches "PATTERN"not(Uri matches "PATTERN")containsUri contains "STRING"not(Uri contains "STRING")startsWithUri startsWith "PREFIX"not(Uri startsWith "PREFIX")endsWithUri endsWith "SUFFIX"not(Uri endsWith "SUFFIX")inMethod in ["GET", "POST"]Method not in ["GET", "POST"]See: https://github.com/antonmedv/expr/blob/master/docs/Language-Definition.md
TimeAgo(duration)durationns, us or µs, ms, s, m, hTime >= TimeAgo("5m")BetweenTime(val, start, end)BETWEEN, returns start <= val && val <= endBetweenTime(Time, "2019-08-06T00:00:00", "2019-08-06T00:05:00")See: Usage samples
Donations are welcome as always!
:heart: Sponsor
No open issues yet, or sync has not completed.