pepe-http 0.58.1 → 0.59.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +111 -0
- package/completions/_pepe +1 -0
- package/completions/_pepe.ps1 +1 -0
- package/completions/pepe.bash +5 -1
- package/completions/pepe.fish +1 -0
- package/man/pepe-logs.1 +4 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,117 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
|
+
## [0.59.0](https://github.com/omarmhaimdat/pepe/compare/v0.58.2...v0.59.0) - 2026-11-27
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- *(logs)* --serve, the logs screen as a live web page ([#249](https://github.com/omarmhaimdat/pepe/pull/249))
|
|
14
|
+
|
|
15
|
+
`pepe logs --serve [ADDR]` serves the logs screen in a browser, live, in
|
|
16
|
+
the front page's look.
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pepe logs /var/log/nginx/access.log /var/log/nginx/error.log --serve # 127.0.0.1:7880
|
|
20
|
+
pepe logs /var/log/nginx/access.log --serve 0.0.0.0:7880 --fail-if '5xx > 2%' # from elsewhere
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**The page**
|
|
24
|
+
- The server in a word (`nginx is busy`) as the front page's selected
|
|
25
|
+
word, gold when degraded and red when failing, with Pepe's face for it,
|
|
26
|
+
plus a sentence: the rate, against a usual minute, 5xx and p99.
|
|
27
|
+
- The screen's cards (now, a usual minute, the busiest, failing now,
|
|
28
|
+
request time, in all), with sparklines.
|
|
29
|
+
- The findings and each `--fail-if`, held or crossed. A finding about a
|
|
30
|
+
path holds the page to it.
|
|
31
|
+
- The same five tabs and keys (`1`–`5`, `/`, `esc`):
|
|
32
|
+
- **Dashboard:** requests a second over 5 minutes, status codes, busiest
|
|
33
|
+
paths, the error log.
|
|
34
|
+
- **Traffic:** by minute, hour or day; a held path's minutes and codes.
|
|
35
|
+
- **Paths:** every path, sortable and filterable.
|
|
36
|
+
- **Errors:** what the error log says, and which paths answer 5xx.
|
|
37
|
+
- **Log:** the lines, filtered by 4xx, 5xx, the error log or words.
|
|
38
|
+
- Light and dark, the front page's tokens, Geist. No script from
|
|
39
|
+
anywhere else, and text is never set as markup.
|
|
40
|
+
|
|
41
|
+
**Running it**
|
|
42
|
+
- At a terminal the screen runs as well and the page is opened in the
|
|
43
|
+
browser.
|
|
44
|
+
- Without a terminal (a service, a container) the logs are followed
|
|
45
|
+
until stopped, then the report is printed.
|
|
46
|
+
- The link carries a token after `#`, made at start, and every API call
|
|
47
|
+
needs it, since logs hold addresses and paths. Off loopback, pepe says
|
|
48
|
+
the page can be reached from other machines.
|
|
49
|
+
|
|
50
|
+
**Cost** (`bench/logs-serve.sh`, M4 Pro, release build)
|
|
51
|
+
|
|
52
|
+
| | req/s | CPU | a page gets |
|
|
53
|
+
| --- | ---: | ---: | ---: |
|
|
54
|
+
| nobody looking | 400 | 1.0 ms/s | |
|
|
55
|
+
| one page | 400 | 1.7 ms/s | 2.0 KB/s |
|
|
56
|
+
| ten pages | 400 | 1.7 ms/s | 2.0 KB/s each |
|
|
57
|
+
| one, on the log tab | 400 | 2.0 ms/s | 7.3 KB/s |
|
|
58
|
+
| nobody looking | 4,000 | 3.0 ms/s | |
|
|
59
|
+
| ten pages | 4,000 | 4.7 ms/s | 1.6 KB/s each |
|
|
60
|
+
|
|
61
|
+
- **Nobody looking:** no tick runs at all.
|
|
62
|
+
- **While someone looks:** one tick a second takes what the page shows
|
|
63
|
+
and sends only the parts that changed, about 860 bytes in a steady
|
|
64
|
+
second. The 30 s averages above reach 2 KB/s because they include
|
|
65
|
+
outages.
|
|
66
|
+
- **Ten pages cost what one does:** the step is written once, and the
|
|
67
|
+
same bytes go to every page that is up to date. A page that fell behind
|
|
68
|
+
gets what it missed, so nothing queues.
|
|
69
|
+
- **Paths, slots, causes and a held path:** built when asked, at most
|
|
70
|
+
once a tick however many pages ask.
|
|
71
|
+
- **Log lines:** read from the reader only while a page shows the Log
|
|
72
|
+
tab, filtered on the server, and gzip'd: 36 KB/s as plain JSON, 7 KB/s
|
|
73
|
+
as sent.
|
|
74
|
+
|
|
75
|
+
**The verdict, every second.** Most of the tick was
|
|
76
|
+
`logs_verdict::findings`, which the terminal screen also runs every
|
|
77
|
+
second. On a three-day log (1.96M lines, 41,656 clients), the tick's
|
|
78
|
+
time under the lock went from 7.45 ms to 3.24 ms (median of nine):
|
|
79
|
+
- A path's minutes are now `Counts`, without the 176 latency buckets a
|
|
80
|
+
`Row` carries.
|
|
81
|
+
- `path_rows` and `path_counts` read the minute keys without copying
|
|
82
|
+
every minute's `Slot`.
|
|
83
|
+
- `Top::top` finds the n-th largest count before gathering names.
|
|
84
|
+
|
|
85
|
+
The JSON report is the same to the byte before and after, on the log cut
|
|
86
|
+
at four points. Two of those points are inside the outage, where the
|
|
87
|
+
per-path 5xx findings fire.
|
|
88
|
+
|
|
89
|
+
**Checked**
|
|
90
|
+
- `cargo test` passes: 465.
|
|
91
|
+
- `cargo +1.98 clippy --all-targets -D warnings` and `cargo fmt --check`
|
|
92
|
+
are clean.
|
|
93
|
+
- Driven in a browser against a live generated log: every tab, the 5xx
|
|
94
|
+
filter, and an outage appearing as a finding live.
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
### Fixed
|
|
99
|
+
|
|
100
|
+
- *(release)* keep Dependabot's upstream changelogs out of the release notes ([#254](https://github.com/omarmhaimdat/pepe/pull/254))
|
|
101
|
+
|
|
102
|
+
The v0.58.2 release failed to publish to Docker, Homebrew, PyPI and npm:
|
|
103
|
+
https://github.com/omarmhaimdat/pepe/actions/runs/45973091177
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
## [0.58.2](https://github.com/omarmhaimdat/pepe/compare/v0.58.1...v0.58.2) - 2026-11-27
|
|
107
|
+
|
|
108
|
+
### Fixed
|
|
109
|
+
|
|
110
|
+
- *(deps)* bump the cargo-minor-patch group across 1 directory with 8 updates ([#252](https://github.com/omarmhaimdat/pepe/pull/252))
|
|
111
|
+
|
|
112
|
+
clap 4.6.9, webpki-roots 1.0.12, hyper 1.13.0, bytes 1.12.2, toml 1.2.2,
|
|
113
|
+
flate2 1.1.11, clap_complete 4.6.12, clap_mangen 0.3.4.
|
|
114
|
+
|
|
115
|
+
### Other
|
|
116
|
+
|
|
117
|
+
- bump cachix/install-nix-action from 31 to 32 in the github-actions group across 1 directory ([#248](https://github.com/omarmhaimdat/pepe/pull/248))
|
|
118
|
+
- *(nix)* update flake.lock ([#244](https://github.com/omarmhaimdat/pepe/pull/244))
|
|
119
|
+
|
|
9
120
|
## [0.58.1](https://github.com/omarmhaimdat/pepe/compare/v0.58.0...v0.58.1) - 2026-11-27
|
|
10
121
|
|
|
11
122
|
### Fixed
|
package/completions/_pepe
CHANGED
|
@@ -596,6 +596,7 @@ _arguments "${_arguments_options[@]}" : \
|
|
|
596
596
|
'*--status=[Count only the requests that answered these\: 404, 5xx, 4xx,503; repeat for more. Error log lines are still counted]:CODES:_default' \
|
|
597
597
|
'*--host=[Count only the requests to these hosts (the log'\''s \$host)\: shop.test exactly, .example.com for it and every host under it; repeat for more]:HOST:_default' \
|
|
598
598
|
'--until=[Leave out what is newer than this, e.g. 1h for up to an hour ago; with --since, a stretch in the past. A log read up to a time in the past isn'\''t followed]:TIME:_default' \
|
|
599
|
+
'--serve=[Serve the screen as a web page, live, at ADDR (127.0.0.1\:7880 when none is given)\: the link printed carries the token that opens it. Without a terminal the logs are followed until stopped]::ADDR:_default' \
|
|
599
600
|
'-n+[Number of requests to perform]:NUMBER:_default' \
|
|
600
601
|
'--number=[Number of requests to perform]:NUMBER:_default' \
|
|
601
602
|
'-z+[Duration of the test, e.g. 10s, 3m, 2h (mutually exclusive with -n)]:DURATION:_default' \
|
package/completions/_pepe.ps1
CHANGED
|
@@ -592,6 +592,7 @@ Register-ArgumentCompleter -Native -CommandName 'pepe' -ScriptBlock {
|
|
|
592
592
|
[CompletionResult]::new('--status', '--status', [CompletionResultType]::ParameterName, 'Count only the requests that answered these: 404, 5xx, 4xx,503; repeat for more. Error log lines are still counted')
|
|
593
593
|
[CompletionResult]::new('--host', '--host', [CompletionResultType]::ParameterName, 'Count only the requests to these hosts (the log''s $host): shop.test exactly, .example.com for it and every host under it; repeat for more')
|
|
594
594
|
[CompletionResult]::new('--until', '--until', [CompletionResultType]::ParameterName, 'Leave out what is newer than this, e.g. 1h for up to an hour ago; with --since, a stretch in the past. A log read up to a time in the past isn''t followed')
|
|
595
|
+
[CompletionResult]::new('--serve', '--serve', [CompletionResultType]::ParameterName, 'Serve the screen as a web page, live, at ADDR (127.0.0.1:7880 when none is given): the link printed carries the token that opens it. Without a terminal the logs are followed until stopped')
|
|
595
596
|
[CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Number of requests to perform')
|
|
596
597
|
[CompletionResult]::new('--number', '--number', [CompletionResultType]::ParameterName, 'Number of requests to perform')
|
|
597
598
|
[CompletionResult]::new('-z', '-z', [CompletionResultType]::ParameterName, 'Duration of the test, e.g. 10s, 3m, 2h (mutually exclusive with -n)')
|
package/completions/pepe.bash
CHANGED
|
@@ -1798,7 +1798,7 @@ _pepe() {
|
|
|
1798
1798
|
return 0
|
|
1799
1799
|
;;
|
|
1800
1800
|
pepe__subcmd__logs)
|
|
1801
|
-
opts="-h -n -z -m -H -t -d -p -k -i -c -u --format --window --since --all --exact-paths --rows --path --status --host --until --help --number --duration --method --headers --timeout --warmup --threads --rate --body --proxy --insecure --disable-compression --disable-keepalive --disable-redirects --json --trace-header --vars --webhook --webhook-on --slack --export --snapshot --events --histogram --allow-host --max-requests --max-rate --max-concurrency --dry-run --fail-if --metrics --setup --config --write-config --load --keep --record --concurrency --user-agent"
|
|
1801
|
+
opts="-h -n -z -m -H -t -d -p -k -i -c -u --format --window --since --all --exact-paths --rows --path --status --host --until --serve --help --number --duration --method --headers --timeout --warmup --threads --rate --body --proxy --insecure --disable-compression --disable-keepalive --disable-redirects --json --trace-header --vars --webhook --webhook-on --slack --export --snapshot --events --histogram --allow-host --max-requests --max-rate --max-concurrency --dry-run --fail-if --metrics --setup --config --write-config --load --keep --record --concurrency --user-agent"
|
|
1802
1802
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
|
|
1803
1803
|
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
|
1804
1804
|
return 0
|
|
@@ -1836,6 +1836,10 @@ _pepe() {
|
|
|
1836
1836
|
COMPREPLY=($(compgen -f "${cur}"))
|
|
1837
1837
|
return 0
|
|
1838
1838
|
;;
|
|
1839
|
+
--serve)
|
|
1840
|
+
COMPREPLY=($(compgen -f "${cur}"))
|
|
1841
|
+
return 0
|
|
1842
|
+
;;
|
|
1839
1843
|
--number)
|
|
1840
1844
|
COMPREPLY=($(compgen -f "${cur}"))
|
|
1841
1845
|
return 0
|
package/completions/pepe.fish
CHANGED
|
@@ -459,6 +459,7 @@ complete -c pepe -n "__fish_pepe_using_subcommand logs" -l path -d 'Count only t
|
|
|
459
459
|
complete -c pepe -n "__fish_pepe_using_subcommand logs" -l status -d 'Count only the requests that answered these: 404, 5xx, 4xx,503; repeat for more. Error log lines are still counted' -r
|
|
460
460
|
complete -c pepe -n "__fish_pepe_using_subcommand logs" -l host -d 'Count only the requests to these hosts (the log\'s $host): shop.test exactly, .example.com for it and every host under it; repeat for more' -r
|
|
461
461
|
complete -c pepe -n "__fish_pepe_using_subcommand logs" -l until -d 'Leave out what is newer than this, e.g. 1h for up to an hour ago; with --since, a stretch in the past. A log read up to a time in the past isn\'t followed' -r
|
|
462
|
+
complete -c pepe -n "__fish_pepe_using_subcommand logs" -l serve -d 'Serve the screen as a web page, live, at ADDR (127.0.0.1:7880 when none is given): the link printed carries the token that opens it. Without a terminal the logs are followed until stopped' -r
|
|
462
463
|
complete -c pepe -n "__fish_pepe_using_subcommand logs" -s n -l number -d 'Number of requests to perform' -r
|
|
463
464
|
complete -c pepe -n "__fish_pepe_using_subcommand logs" -s z -l duration -d 'Duration of the test, e.g. 10s, 3m, 2h (mutually exclusive with -n)' -r
|
|
464
465
|
complete -c pepe -n "__fish_pepe_using_subcommand logs" -s m -l method -d 'HTTP method, e.g. GET, POST, PUT, DELETE' -r
|
package/man/pepe-logs.1
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
.SH NAME
|
|
5
5
|
pepe\-logs \- Read nginx logs: requests per second now, against each minute, hour and day
|
|
6
6
|
.SH SYNOPSIS
|
|
7
|
-
\fBpepe logs\fR [\fB\-\-format\fR] [\fB\-\-window\fR] [\fB\-\-since\fR] [\fB\-\-all\fR] [\fB\-\-exact\-paths\fR] [\fB\-\-rows\fR] [\fB\-\-path\fR] [\fB\-\-status\fR] [\fB\-\-host\fR] [\fB\-\-until\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIFILES\fR]
|
|
7
|
+
\fBpepe logs\fR [\fB\-\-format\fR] [\fB\-\-window\fR] [\fB\-\-since\fR] [\fB\-\-all\fR] [\fB\-\-exact\-paths\fR] [\fB\-\-rows\fR] [\fB\-\-path\fR] [\fB\-\-status\fR] [\fB\-\-host\fR] [\fB\-\-until\fR] [\fB\-\-serve\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIFILES\fR]
|
|
8
8
|
.SH DESCRIPTION
|
|
9
9
|
Read nginx logs: requests per second now, against each minute, hour and day
|
|
10
10
|
.SH OPTIONS
|
|
@@ -39,6 +39,9 @@ Count only the requests to these hosts (the log\*(Aqs $host): shop.test exactly,
|
|
|
39
39
|
\fB\-\-until\fR \fI<TIME>\fR
|
|
40
40
|
Leave out what is newer than this, e.g. 1h for up to an hour ago; with \-\-since, a stretch in the past. A log read up to a time in the past isn\*(Aqt followed
|
|
41
41
|
.TP
|
|
42
|
+
\fB\-\-serve\fR [\fI<ADDR>\fR]
|
|
43
|
+
Serve the screen as a web page, live, at ADDR (127.0.0.1:7880 when none is given): the link printed carries the token that opens it. Without a terminal the logs are followed until stopped
|
|
44
|
+
.TP
|
|
42
45
|
\fB\-h\fR, \fB\-\-help\fR
|
|
43
46
|
Print help
|
|
44
47
|
.TP
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"hasInstallScript": true,
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"name": "pepe-http",
|
|
22
|
-
"version": "0.
|
|
22
|
+
"version": "0.59.0"
|
|
23
23
|
},
|
|
24
24
|
"node_modules/detect-libc": {
|
|
25
25
|
"engines": {
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
"requires": true,
|
|
51
|
-
"version": "0.
|
|
51
|
+
"version": "0.59.0"
|
|
52
52
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"artifactDownloadUrls": [
|
|
3
|
-
"https://github.com/omarmhaimdat/pepe/releases/download/v0.
|
|
3
|
+
"https://github.com/omarmhaimdat/pepe/releases/download/v0.59.0"
|
|
4
4
|
],
|
|
5
5
|
"author": "Omar MHAIMDAT",
|
|
6
6
|
"bin": {
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"zipExt": ".tar.xz"
|
|
120
120
|
}
|
|
121
121
|
},
|
|
122
|
-
"version": "0.
|
|
122
|
+
"version": "0.59.0",
|
|
123
123
|
"volta": {
|
|
124
124
|
"node": "18.14.1",
|
|
125
125
|
"npm": "9.5.0"
|