-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
tools/test_serial.py: Add test for serial throughput. #15909
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #15909 +/- ##
=======================================
Coverage 98.39% 98.39%
=======================================
Files 171 171
Lines 22274 22274
=======================================
Hits 21916 21916
Misses 358 358 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Code size report: |
|
I've checked a few boards & ports with that test. Most work fine. SOme minor observations:
|
|
I've just tested on a esp32-S3 CDC with my shared/tinyusb migration PR: #15108 @robert-hh I've seen the same 0.09MBit/s DATA IN rates on renesas board, not sure why they're so low. I also get lock-ups with the black pill board. I suspect it might be due to the 25mhz crystal causing instability - that is said to be the reason the built in DFU struggles to connect to usb more often than not. On other stm32 boards though, I get much better speeds. WB55 for instance: However for this I needed to increase the delay before the initial drain as the soft reboot took a little longer to complete. rp2 (tinyusb) |
|
Ah... some of the slow data rates are caused by UART! |
Oh, yes, that's bitten me a few times. You need to disable UART if you want to test USB throughput. You could also use this tool to test UART reliability, if you connect up a USB-UART convertor. |
4e748c8 to
37e86d6
Compare
|
I just noted some very interesting results testing a PICO2 on the DATA IN test for #17960.
So I think we're inadvertantly (and probably uncontrollably) benchmarking a few things here:
Still seems like a good test, I think the thing to keep in mind is that it's only good for comparing between runs on the exact same hardware (even down to the port choice). 🤷 |
|
Interesting data! And interesting you got pretty much the same result as me for your laptop. For reference my laptop is an i7-8550U. Apart from performance, this test is also useful to test link reliability. If a port can pass this test then it's REPL is most likely quite stable. |
37e86d6 to
b5d249f
Compare
|
I've now updated this PR:
It's now ready to merge. Note: the script now depends on |
9831d13 to
076727a
Compare
This is a test script used to test USB CDC (or USB UART) serial reliability
and throughput.
Run against any MicroPython remote target with:
$ python serial_test.py -t <device>
Signed-off-by: Damien George <[email protected]>
076727a to
7ef47ef
Compare
Summary
This is a test script used to test USB CDC (or USB UART) serial reliability and throughput.
Testing
Run against any MicroPython board with: