Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Leptos #25

Closed
wants to merge 0 commits into from
Closed

add Leptos #25

wants to merge 0 commits into from

Conversation

gbj
Copy link

@gbj gbj commented Aug 31, 2024

I don't think it's necessarily a good idea to add other languages, but I had put together a local implementation for comparison and @DylanPiercey asked to take a look. I do see #23 adding Dioxus as well, so I thought I'd just open this. Feel free to close if you want to keep it JS-specific.

There's no difference in the HTML rendered for this example for our with-hydration vs no-hydration versions except for very small script tag, so I just did no-hydration for the sake of simplicity in building/running it.

If you have a Rust toolchain installed this is just cargo run --release. I have it running on nightly Rust, it should work with stable if you just remove the nightly feature in Cargo.toml.

local autocannon results:

Running 10s test @ http://localhost:3000
10 connections


┌─────────┬──────┬──────┬───────┬──────┬─────────┬─────────┬───────┐
│ Stat    │ 2.5% │ 50%  │ 97.5% │ 99%  │ Avg     │ Stdev   │ Max   │
├─────────┼──────┼──────┼───────┼──────┼─────────┼─────────┼───────┤
│ Latency │ 1 ms │ 1 ms │ 3 ms  │ 5 ms │ 1.49 ms │ 0.87 ms │ 26 ms │
└─────────┴──────┴──────┴───────┴──────┴─────────┴─────────┴───────┘
┌───────────┬────────┬────────┬────────┬────────┬─────────┬─────────┬────────┐
│ Stat      │ 1%     │ 2.5%   │ 50%    │ 97.5%  │ Avg     │ Stdev   │ Min    │
├───────────┼────────┼────────┼────────┼────────┼─────────┼─────────┼────────┤
│ Req/Sec   │ 4,923  │ 4,923  │ 5,083  │ 5,175  │ 5,086.8 │ 72.97   │ 4,920  │
├───────────┼────────┼────────┼────────┼────────┼─────────┼─────────┼────────┤
│ Bytes/Sec │ 748 MB │ 748 MB │ 772 MB │ 786 MB │ 773 MB  │ 11.1 MB │ 748 MB │
└───────────┴────────┴────────┴────────┴────────┴─────────┴─────────┴────────┘

Req/Bytes counts sampled once per second.
# of samples: 10

51k requests in 10.01s, 7.73 GB read

(For the truly curious, I have a local version with a non-allocating version for the style that went up to 6k rps, but I thought it was a bit cheesy. This is the idiomatic version.)

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.

1 participant