Totodore / socketioxide

A socket.io server implementation in Rust that integrates with the Tower ecosystem and the Tokio stack.
https://docs.rs/socketioxide
MIT License
1.13k stars 49 forks source link

feat: remove config from socket #331

Closed Totodore closed 1 month ago

Totodore commented 1 month ago

Motivation

Now that we can access the socketio client from any socket with PR #327. We can remove the config field in the socket struct as we can access it directly from the socketio client. We can also remove the Arc on the SocketIoConfig as it is stored only in the Client now.

github-actions[bot] commented 1 month ago

🐰Bencher

ReportFri, June 7, 2024 at 07:58:01 UTC
ProjectSocketioxide
Branchfeat-remove-config-from-socket
Testbedubuntu-latest

⚠️ WARNING: The following Measure does not have a Threshold. Without a Threshold, no Alerts will ever be generated!

  • Latency (latency)

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds CLI flag.

Click to view all benchmark results
BenchmarkLatencyLatency Results
nanoseconds (ns)
engineio_packet/decode/Decode packet binary b64➖ (view plot)88.03
engineio_packet/decode/Decode packet message➖ (view plot)39.01
engineio_packet/decode/Decode packet noop➖ (view plot)34.73
engineio_packet/decode/Decode packet ping/pong➖ (view plot)30.82
engineio_packet/decode/Decode packet ping/pong upgrade➖ (view plot)34.83
engineio_packet/encode/Encode packet binary b64➖ (view plot)61.58
engineio_packet/encode/Encode packet message➖ (view plot)38.49
engineio_packet/encode/Encode packet noop➖ (view plot)37.66
engineio_packet/encode/Encode packet open➖ (view plot)284.39
engineio_packet/encode/Encode packet ping/pong➖ (view plot)36.90
engineio_packet/encode/Encode packet ping/pong upgrade➖ (view plot)36.78
extensions/concurrent_get➖ (view plot)6.91
extensions/concurrent_get_inserts➖ (view plot)15.31
extensions/concurrent_inserts➖ (view plot)21.36
socketio_packet/decode/Decode packet ack on /➖ (view plot)264.19
socketio_packet/decode/Decode packet ack on /custom_nsp➖ (view plot)281.45
socketio_packet/decode/Decode packet binary ack (b64) on /➖ (view plot)477.41
socketio_packet/decode/Decode packet binary ack (b64) on /custom_nsp➖ (view plot)510.87
socketio_packet/decode/Decode packet binary event (b64) on /➖ (view plot)565.36
socketio_packet/decode/Decode packet binary event (b64) on /custom_nsp➖ (view plot)610.65
socketio_packet/decode/Decode packet connect on /➖ (view plot)62.39
socketio_packet/decode/Decode packet connect on /custom_nsp➖ (view plot)79.71
socketio_packet/decode/Decode packet event on /➖ (view plot)341.52
socketio_packet/decode/Decode packet event on /custom_nsp➖ (view plot)359.66
socketio_packet/decode/Decode packet event with ack on /➖ (view plot)343.83
socketio_packet/decode/Decode packet event with ack on /custom_nsp➖ (view plot)359.73
socketio_packet/encode/Encode packet ack on /➖ (view plot)120.84
socketio_packet/encode/Encode packet ack on /custom_nsp➖ (view plot)125.38
socketio_packet/encode/Encode packet binary ack (b64) on /➖ (view plot)309.95
socketio_packet/encode/Encode packet binary ack (b64) on /custom_nsp➖ (view plot)317.68
socketio_packet/encode/Encode packet binary event (b64) on /➖ (view plot)390.79
socketio_packet/encode/Encode packet binary event (b64) on /custom_nsp➖ (view plot)420.51
socketio_packet/encode/Encode packet connect on /➖ (view plot)56.05
socketio_packet/encode/Encode packet connect on /custom_nsp➖ (view plot)57.99
socketio_packet/encode/Encode packet event on /➖ (view plot)124.88
socketio_packet/encode/Encode packet event on /custom_nsp➖ (view plot)129.85
socketio_packet/encode/Encode packet event with ack on /➖ (view plot)125.09
socketio_packet/encode/Encode packet event with ack on /custom_nsp➖ (view plot)129.25

Bencher - Continuous Benchmarking
View Public Perf Page
Docs | Repo | Chat | Help