Skip to content

Commit

Permalink
jsonrpsee wrapper crate: add feature async_wasm_client (#893)
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasad1 authored Oct 5, 2022
1 parent 8af992e commit a7108a7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion jsonrpsee/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ client-ws-transport = ["jsonrpsee-client-transport/ws", "jsonrpsee-client-transp
client-ws-transport-no-tls = ["jsonrpsee-client-transport/ws"]
client-web-transport = ["jsonrpsee-client-transport/web"]
async-client = ["jsonrpsee-core/async-client"]
async-wasm-client = ["jsonrpsee-core/async-wasm-client"]
http-client = ["jsonrpsee-http-client", "jsonrpsee-types", "jsonrpsee-core/client"]
wasm-client = ["jsonrpsee-wasm-client", "jsonrpsee-types", "jsonrpsee-core/client"]
ws-client = ["jsonrpsee-ws-client", "jsonrpsee-types", "jsonrpsee-core/client"]
macros = ["jsonrpsee-proc-macros", "jsonrpsee-types", "tracing"]

client = ["http-client", "ws-client", "wasm-client", "client-ws-transport", "client-web-transport", "async-client", "client-core"]
client = ["http-client", "ws-client", "wasm-client", "client-ws-transport", "client-web-transport", "async-client", "async-wasm-client", "client-core"]
client-core = ["jsonrpsee-core/client"]
server = ["jsonrpsee-server", "server-core", "jsonrpsee-types"]
server-core = ["jsonrpsee-core/server"]
Expand Down
11 changes: 9 additions & 2 deletions jsonrpsee/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ macro_rules! cfg_feature {
macro_rules! cfg_client {
($($item:item)*) => {
$(
#[cfg(any(feature = "jsonrpsee-http-client", feature = "jsonrpsee-wasm-client", feature = "jsonrpsee-ws-client", feature = "client", feature = "async-client", feature = "client-core"))]
#[cfg(any(
feature = "jsonrpsee-http-client", feature = "jsonrpsee-wasm-client", feature = "jsonrpsee-ws-client",
feature = "client", feature = "async-client", feature = "client-core", feature = "async-wasm-client"
))]
$item
)*
}
Expand Down Expand Up @@ -68,7 +71,11 @@ macro_rules! cfg_types {
macro_rules! cfg_client_or_server {
($($item:item)*) => {
$(
#[cfg(any(feature = "jsonrpsee-http-client", feature = "jsonrpsee-wasm-client", feature = "jsonrpsee-ws-client", feature = "client", feature = "async-client", feature = "client-core", feature = "server", feature = "server-core"))]
#[cfg(any(
feature = "jsonrpsee-http-client", feature = "jsonrpsee-wasm-client", feature = "jsonrpsee-ws-client",
feature = "client", feature = "async-client", feature = "async-wasm-client",
feature = "client-core", feature = "server", feature = "server-core"
))]
$item
)*
}
Expand Down

1 comment on commit a7108a7

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: a7108a7 Previous: c0f952d Ratio
sync/ws_concurrent_conn_calls/fast_call/8 2208638 ns/iter (± 39405) 1017186 ns/iter (± 24105) 2.17
sync/ws_concurrent_conn_calls/fast_call/16 4882269 ns/iter (± 85954) 1394819 ns/iter (± 39516) 3.50
sync/ws_concurrent_conn_calls/fast_call/32 9267057 ns/iter (± 292515) 2579154 ns/iter (± 102053) 3.59
sync/ws_concurrent_conn_calls/fast_call/64 15045209 ns/iter (± 299889) 4957402 ns/iter (± 418186) 3.03
sync/ws_concurrent_conn_subs/16 8318359 ns/iter (± 219159) 2427521 ns/iter (± 39865) 3.43
sync/ws_concurrent_conn_subs/32 11230043 ns/iter (± 333599) 4258802 ns/iter (± 81041) 2.64
sync/ws_concurrent_conn_subs/64 19743688 ns/iter (± 504276) 7610435 ns/iter (± 220533) 2.59
sync/ws_concurrent_conn_calls/fast_call/128 24160867 ns/iter (± 826935) 10145795 ns/iter (± 366340) 2.38
sync/ws_concurrent_conn_calls/fast_call/256 46168348 ns/iter (± 343299) 20272051 ns/iter (± 797429) 2.28
sync/ws_concurrent_conn_calls/fast_call/512 84421271 ns/iter (± 602137) 37001181 ns/iter (± 1819782) 2.28
sync/ws_concurrent_conn_calls/fast_call/1024 160829790 ns/iter (± 859067) 53245632 ns/iter (± 5378726) 3.02
sync/ws_concurrent_conn_subs/128 40034770 ns/iter (± 620270) 14545102 ns/iter (± 169731) 2.75
sync/ws_concurrent_conn_subs/256 80180511 ns/iter (± 453713) 27082763 ns/iter (± 341013) 2.96
sync/ws_concurrent_conn_subs/512 148217829 ns/iter (± 637084) 47003154 ns/iter (± 954290) 3.15
sync/ws_concurrent_conn_subs/1024 279106578 ns/iter (± 1106775) 78458255 ns/iter (± 853713) 3.56
async/ws_concurrent_conn_calls/fast_call/8 2252880 ns/iter (± 53137) 988396 ns/iter (± 27067) 2.28
async/ws_concurrent_conn_calls/fast_call/16 4877555 ns/iter (± 104652) 1270696 ns/iter (± 42728) 3.84
async/ws_concurrent_conn_calls/fast_call/32 9260326 ns/iter (± 244237) 2294141 ns/iter (± 77888) 4.04
async/ws_concurrent_conn_calls/fast_call/64 15019314 ns/iter (± 252725) 4246282 ns/iter (± 313881) 3.54
async/ws_concurrent_conn_subs/16 8331190 ns/iter (± 198554) 2430055 ns/iter (± 34991) 3.43
async/ws_concurrent_conn_subs/32 11236713 ns/iter (± 252522) 4250138 ns/iter (± 114929) 2.64
async/ws_concurrent_conn_subs/64 19706928 ns/iter (± 448924) 7610460 ns/iter (± 281737) 2.59
async/ws_concurrent_conn_calls/fast_call/128 23699702 ns/iter (± 869580) 9580678 ns/iter (± 507748) 2.47
async/ws_concurrent_conn_calls/fast_call/256 46165682 ns/iter (± 287210) 19369758 ns/iter (± 1057854) 2.38
async/ws_concurrent_conn_calls/fast_call/512 84392511 ns/iter (± 520604) 35032296 ns/iter (± 2945320) 2.41
async/ws_concurrent_conn_calls/fast_call/1024 160731700 ns/iter (± 795133) 50122496 ns/iter (± 4712926) 3.21
async/ws_concurrent_conn_subs/128 39995764 ns/iter (± 547849) 14600623 ns/iter (± 156846) 2.74
async/ws_concurrent_conn_subs/256 80127001 ns/iter (± 358870) 27244929 ns/iter (± 247808) 2.94
async/ws_concurrent_conn_subs/512 148327747 ns/iter (± 668387) 47923196 ns/iter (± 960675) 3.10
async/ws_concurrent_conn_subs/1024 279351186 ns/iter (± 980128) 78877023 ns/iter (± 834933) 3.54

This comment was automatically generated by workflow using github-action-benchmark.

CC: @niklasad1

Please sign in to comment.