The source code is the official ping/pong example from the tokio-tungstenite repository.
The results are obtained with heaptrack, a heap memory profiler and k6 a load tester.
- Calls to allocation functions: 341,152 (3,694/s)
- Temporary allocations: 60,021 (17.59%, 649/s)
- Peak heap memory usage: 106.1MB
- Peak RSS: 119.6MB
- Total runtime: 1min32s
- Calls to allocation functions: 324,172 (3,064/s)
- Temporary allocations: 68,341 (21.08%, 646/s)
- Peak heap memory usage: 908MB
- Peak RSS: 936MB
- Total runtime: 1min45s
- install k6
cd tokio-tungstenite-0-24 && cargo run -r -pk6 run k6-script.jscd tokio-tungstenite-0-25 && cargo run -r -pk6 run k6-script.js

