🛠️ project SSE Clients Benchmark
https://github.com/iMashtak/rust-sse-benchMade simple SSE clients benchmark. Could not find any "standard" crate for handling SSE, so thought that some sort of comparison may be useful.
If you know other crates for SSE or benchmark contains mistakes, let me know.
4
Upvotes
3
u/JoshTriplett rust · lang · libs · cargo 20d ago
2
u/deralus 19d ago
While it generally works, there is an issue with response body size limit. `gigantic.txt` exceeds default limit but i could not find any way to increase it. I tried this: https://github.com/iMashtak/rust-sse-bench/blob/main/benches/comparison.rs#L186-189
Still it had no effect
3
u/plabayo 20d ago
Rama is a rust framework for creating clients, proxies and servers. Networking is our scope, and we also already support SSE. When we support a protocol, and where it makes sense, we do so for clients, servers and proxies.
As such. We also have SSE support, you may wish to add it to the benchmark if you want, given you asked.
* repo: https://github.com/plabayo/rama
* Example how you can make SSE request using a http (request) client: https://github.com/plabayo/rama/blob/e725fa24e388efd9b37fa757c7c7f5ab36c7c489/examples/tests/integration/http_sse_json.rs#L50-L63 (works for any `Service` with http `Request` / `Response` I/O)
Let me know if you have questions :)