Comments (1)
At this point I think we are testing different things. So I change warp codebase to match Rocket.
modified warp/src/main.rs
@@ -2,8 +2,8 @@ use warp::Filter;
#[tokio::main]
async fn main() {
- // GET /hello/warp => 200 OK with body "Hello, warp!"
- let hello = warp::path!("hello" / String).map(|name| format!("Hello, {}!", name));
+ // GET / => 200 OK with body "Hello, wolrd!"
+ let hello = warp::any().map(|| "Hello, world!");
- warp::serve(hello).run(([127, 0, 0, 1], 3030)).await;
+ warp::serve(hello).run(([127, 0, 0, 1], 8000)).await;
}
The result is:
Running 8s test @ http://127.0.0.1:8000
4 threads and 200 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 780.43us 0.99ms 15.08ms 93.28%
Req/Sec 73.99k 7.81k 98.49k 69.69%
Latency Distribution
50% 505.00us
75% 821.00us
90% 1.37ms
99% 5.50ms
2361359 requests in 8.08s, 292.76MB read
Requests/sec: 292284.41
Transfer/sec: 36.24MB
❯ wrk --latency -t4 -c200 -d8s http://127.0.0.1:8000
Running 8s test @ http://127.0.0.1:8000
4 threads and 200 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 0.87ms 1.08ms 17.02ms 93.52%
Req/Sec 66.45k 7.54k 91.47k 71.16%
Latency Distribution
50% 574.00us
75% 0.92ms
90% 1.50ms
99% 6.12ms
2114053 requests in 8.08s, 262.10MB read
Requests/sec: 261637.18
Transfer/sec: 32.44MB
❯ wrk --latency -t4 -c200 -d8s http://127.0.0.1:8000
Running 8s test @ http://127.0.0.1:8000
4 threads and 200 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 0.94ms 1.15ms 19.01ms 93.58%
Req/Sec 60.90k 7.59k 80.80k 76.88%
Latency Distribution
50% 630.00us
75% 1.01ms
90% 1.61ms
99% 6.33ms
1942062 requests in 8.08s, 240.77MB read
Requests/sec: 240399.79
Transfer/sec: 29.80MB
from rust-web-frameworks-benchmark.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust-web-frameworks-benchmark.