Skip to content

examples: add https_speedtest example - #6134

Draft
kdm9 wants to merge 3 commits into
esp-rs:mainfrom
gekkonid:https_speedtest
Draft

examples: add https_speedtest example#6134
kdm9 wants to merge 3 commits into
esp-rs:mainfrom
gekkonid:https_speedtest

Conversation

@kdm9

@kdm9 kdm9 commented Aug 15, 2026

Copy link
Copy Markdown

Submission Checklist 📝

  • I have updated existing examples or added new ones (if applicable).
  • I have used cargo xtask fmt-packages command to ensure that all changed code is formatted correctly.
  • I have added changelog entries and/or migration guide notes in the sections below, or I will ask a maintainer to add the skip-changelog or manual-changelog label as appropriate.
  • My changes are in accordance to the esp-rs developer guidelines

Extra:

Pull Request Details 📖

An example that loops a 4M upload/download cycle against a local server, for testing HTTP(S) throughput. It uses httpbin-go as the local server, talking over the LAN only to avoid internet speed from affecting results. I personally get about 3Mbit up/down with TLS and about 12Mbit with plain http.

This currently uses e-tls not mbedtls-rs, because the transfer rate is (unexpectedly) 100x slower with mbedtls. I plan to add a cargo feature to swtich between these to make that easier to check, once I've established that it's not just me misusing mbedtls. Mea culpa, mbedtls enabled again

It also currently only builds for S3, because that's all I have. I can't see why similarly shaped devices wouldn't work but will let someone who has access to them test & enable this on those devices so I don't break HIL tests/ci/whatever.

For disclosure: I used an LLM to rip the guts of this out of our firmware and make it talk to httpbin, so there could still a bit of LLM waffle and verbosity I missed while reviewing the code

kdm9 added 3 commits August 15, 2026 11:01
An example that loops a 4M upload/download cycle against a local server,
for testing HTTP(S) throughput.  Uses httpbin-go as the local server.
@kdm9

kdm9 commented Aug 15, 2026

Copy link
Copy Markdown
Author

Forgot to mention: this won't build until the version of the digest crates in mbedtls-rs is bumped to 0.11, as the traits are incompatible between esp-hal main & the released mbedtls-rs. I quickly this locally and used a crates.io patch, but did not want to commit that hack here since I assume someone will bump mbedtls-rs soon (I'll make an issue)

@kdm9
kdm9 marked this pull request as draft August 16, 2026 00:31
@MabezDev

Copy link
Copy Markdown
Member

Thank you for the pull request! I think it might be better to amend or supplement our current QA test speed benchmark, see https://github.com/esp-rs/esp-hal/blob/main/qa-test/src/bin/embassy_wifi_bench.rs. We already have a host side for testing purposes: https://github.com/esp-rs/esp-hal/tree/main/extras/bench-server.

@kdm9

kdm9 commented Aug 17, 2026

Copy link
Copy Markdown
Author

Ah I had totally missed that example existed, sorry! So, add TLS to embassy_wifi_bench & the corresponding server? Or, should we use the httpbin-go still, to avoid implementing that wheel? Do these qa tests generally only run on *nix, or should these be cross platform?

@bugadani

Copy link
Copy Markdown
Contributor

I would like to keep running the bench server on windows, please.

@MabezDev

Copy link
Copy Markdown
Member

Ah I had totally missed that example existed, sorry! So, add TLS to embassy_wifi_bench & the corresponding server? Or, should we use the httpbin-go still, to avoid implementing that wheel? Do these qa tests generally only run on *nix, or should these be cross platform?

They need to be cross platform, I suggest a new qa test targeting the same bench server (different port ofc, bench server will need some updates here).

@bugadani

Copy link
Copy Markdown
Contributor

We've restored digest 0.10 compatibility (in addition to 0.11) so mbedtls-rs should be a viable target again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants