cloudflare / cloudflare/xdpcap
clarify statistics output
- Dominant language
- Go
- Stars
- 786
- Forks
- 78
- PR merge metrics
- No merged PRs in 30d
Description
xdpcap currently creates the following output when capturing into a file:
```
aborted: 0/0 drop: 0/0 pass: 255/211 tx: 0/0 (received/matched packets)
Error: lost 10 packets
Error: lost 4 packets
```
First, it's not entirely clear to me what the distinction between received / matched is. Maybe it would be nicer if there was a separate "all" column that just counted the number of packets without filtering and just showing the number of matched packets per action:
```
aborted: 0 drop: 0 pass: 211 tx: 0 total: 255 (of which 211 matched)
```
Second, the message for lost packets can be a bit noisy. Maybe that become a column as well:
```
aborted: 0 drop: 0 pass: 211 tx: 0 lost: 14 total: 255 (of which 211 matched)
```
Another option would be to only print the number of lost packets when exiting via Ctrl-C, similar to tcpdump.
Contributor guide
Research direction
No file or test is named in the issue. Start by locating xdpcap's current capture statistics and lost-packet reporting, then determine which proposed output format the project should adopt. Done means the output clearly distinguishes total, matched, action counts, and packet loss, including the Ctrl-C behavior if that option is chosen.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100