tcppktlat: Add histogram mode with per-PID grouping#5430
Open
ethercflow wants to merge 2 commits intoiovisor:masterfrom
Open
tcppktlat: Add histogram mode with per-PID grouping#5430ethercflow wants to merge 2 commits intoiovisor:masterfrom
ethercflow wants to merge 2 commits intoiovisor:masterfrom
Conversation
ekyooo
reviewed
Nov 28, 2025
Add -H option to display latency as histograms grouped by PID. Supports periodic printing with interval argument and works with existing filters like -p, -t, -l, -r. Signed-off-by: Wenbo Zhang <wenbo.zhang@iomesh.com>
Contributor
Author
|
@ekyooo addressed, thx! |
ekyooo
reviewed
Dec 14, 2025
33e5b5c to
6af8242
Compare
Signed-off-by: Wenbo Zhang <wenbo.zhang@iomesh.com>
Contributor
Author
|
@ekyooo Thank you so much for your suggestions —— they're all very constructive! The issues have been fixed; please kindly review again. |
Contributor
Author
|
Hi @ekyooo , PTAL thanks! |
ekyooo
reviewed
Feb 17, 2026
| if (start_time == 0) { | ||
| start_time = now; | ||
| } | ||
| str_timestamp("%Y-%m-%d %H:%M:%S", ts, sizeof(ts)); |
Collaborator
There was a problem hiding this comment.
When using -T with -H and an interval, timestamps are duplicated. Please check the interaction between -T and -H options.
$ sudo ./tcppktlat -H -T 3
[2025-12-23 16:35:41] (elapsed: 24 seconds)
16:35:41
pid = 117845 firefox
usecs : count distribution
0 -> 1 : 0 |
| start_time = now; | ||
| } | ||
| str_timestamp("%Y-%m-%d %H:%M:%S", ts, sizeof(ts)); | ||
| printf("[%s] (elapsed: %ld seconds)\n", ts, now - start_time); |
Collaborator
There was a problem hiding this comment.
At the first output with sudo ./tcppktlat -H 5 3, why does it show "elapsed: 0 seconds" when the output appears at the 5-second mark?
$ sudo ./tcppktlat -H 5 3
Summarize TCP packet latency as a histogram. Hit Ctrl-C to end.
[2025-12-23 16:37:22] (elapsed: 0 seconds)
|
|
||
| The -H option can also take an interval argument to print histograms periodically. | ||
|
|
||
| # tcppktlat -H 5 |
Collaborator
There was a problem hiding this comment.
Please ensure _example.txt output is consistent with the actual tool output changes. (ex. timestamp display).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add -H option to display latency as histograms grouped by PID. Supports periodic printing with interval argument and works with existing filters like -p, -t, -l, -r.