Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Switch benches to usedivan#281

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
CosmicHorrorDev wants to merge9 commits intotiny-http:master
base:master
Choose a base branch
Loading
fromCosmicHorrorDev:divan

Conversation

CosmicHorrorDev
Copy link

@CosmicHorrorDevCosmicHorrorDev commentedApr 2, 2025
edited
Loading

Builds on top of#274 to get CI passing

TODO(cosmic): this PR bumps the MSRV up to 1.80 because the MSRV CI job is currently usingcargo test instead ofcargo check. Fix that at some point...


Switches from using the unstabletest feature to using thedivan crate to run the benchmarks. Thecriterion crate is another popular alternative, but I preferdivan because it's a lot lighter in general

I also took the liberty of expanding theparallel_requests benchmark to run over a variety of number of requests instead of just 1000

Current output

$cargo +nightly bench... elided output     Running benches/bench.rs (/home/wintermute/Programming/Repos/tiny-http/target/release/deps/bench-24b4c6b2c2a1c0fd)running 3 teststest curl_bench ... ignoredtest parallel_requests   ... bench:  25,626,822.00 ns/iter (+/- 2,548,371.96)test sequential_requests ... bench:      11,130.42 ns/iter (+/- 2,081.80)test result: ok. 0 passed; 0 failed; 1 ignored; 2 measured; 0 filtered out; finished in 8.04s

This PR

$cargo bench... elided output     Running benches/bench.rs (target/release/deps/bench-037f89c3c1b9dbe1)Timer precision: 13 nsbench                   fastest       │ slowest       │ median        │ mean          │ samples │ iters├─ parallel_requests                  │               │               │               │         ││  ├─ 10                197.9 µs      │ 643.7 µs      │ 230.1 µs      │ 235.3 µs      │ 8456    │ 8456│  │                    50.51 Kitem/s │ 15.53 Kitem/s │ 43.44 Kitem/s │ 42.48 Kitem/s │         ││  ├─ 100               2.046 ms      │ 24.69 ms      │ 2.3 ms        │ 2.361 ms      │ 847     │ 847│  │                    48.87 Kitem/s │ 4.048 Kitem/s │ 43.45 Kitem/s │ 42.34 Kitem/s │         ││  ╰─ 1000              23.56 ms      │ 64.15 ms      │ 24.89 ms      │ 25.62 ms      │ 100     │ 100│                       42.43 Kitem/s │ 15.58 Kitem/s │ 40.16 Kitem/s │ 39.02 Kitem/s │         │╰─ sequential_requests  9.823 µs      │ 472.1 ms      │ 10.8 µs       │ 55.34 µs      │ 38009   │ 38009

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@CosmicHorrorDev

[8]ページ先頭

©2009-2025 Movatter.jp