-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add script to plot neqo's MOZ_LOG output from the congestion controller #1536
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1536 +/- ##
==========================================
- Coverage 92.84% 92.83% -0.01%
==========================================
Files 120 120
Lines 36770 36686 -84
==========================================
- Hits 34140 34059 -81
+ Misses 2630 2627 -3 ☔ View full report in Codecov by Sentry. |
I think that I'll let @KershawChang handle this one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we still need another graph to show the change of RTT.
performance-test/mozlog-neqo-cwnd.py
Outdated
# allow garbage data before timestamp | ||
timestamp = line.split(" UTC", 1)[0].split(' ') | ||
timestamp = timestamp[-2] + " " + timestamp[-1] | ||
return datetime.strptime(timestamp, "%Y-%m-%d %H:%M:%S.%f") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is script is for MOZ_LOG
, but can we also make this script works with RUST_LOG
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I use RUST_LOG I don't see a timestamp in the line. I do depend on timestamps generated by MOZ_LOG. Can you give an example line that you are using?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can get updated in a followup PR. I don't know right now how the log line would look like. I think this PR can get merged before fixing that.
performance-test/mozlog-neqo-cwnd.py
Outdated
# plot pn graph | ||
def graph_pn(ax, output_data): | ||
for event in ['packet_sent', 'packet_acked', 'packet_lost']: | ||
ax.scatter(output_data["ps"][event]["time"], output_data["ps"][event]["pn"], label=event, s=10, color=COLORS[event]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take a look at adding tooltips to points with that info. Seems reasonable 👍 and will add an RTT graph as discussed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interactive matplotlib is a bit too complex for the current graph. Using the rectangle tool is a workaround for now. I'll put this as out of scope for this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get one warning from pylance. You should also consider running this though black to apply consistent formatting.
@mb could we please get the comments addressed so this can be merged? |
25db97b
to
e7f9a93
Compare
Done. Formatted with black. I think current unaddressed review comments are better addressed in a follow up PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you move this to the test
directory, and update the README
there? Having test
and performance-test
seems redundant.
This script can visualize MOZ_LOGs * 'HTTP/3 upload speed' in `about:logging` * log modules: `timestamp,neqo_transport::*:3` Using the directory `performance-test` from mozilla#1529 Moving the script from https://github.com/mb/scripts/blob/5a72b00cda615a9ea940f0f93efeacb422807ec0/visualize/mozlog-neqo-cwnd.py Example output: https://bugzilla.mozilla.org/show_bug.cgi?id=1852924#c36
Done. I simply mentioned it in the README with an example on how to call it. Is there something else you would like in the README? |
This script can visualize MOZ_LOGs
about:logging
timestamp,neqo_transport::*:3
Using the directory
performance-test
from #1529Moving the script from https://github.com/mb/scripts/blob/5a72b00cda615a9ea940f0f93efeacb422807ec0/visualize/mozlog-neqo-cwnd.py
Example output: https://bugzilla.mozilla.org/show_bug.cgi?id=1852924#c36