Skip to content

Commit da85d1e

Browse files
committed
feat: add benchmark
1 parent 70a8401 commit da85d1e

4 files changed

Lines changed: 39 additions & 2 deletions

File tree

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,21 @@
2121

2222
---
2323

24+
## 🔥 Benchmarking the Hello World
25+
26+
+---------------------------+------------------+------------------+---------------+
27+
| Framework 🦀 | Requests/sec | Avg Latency | Transfer/sec |
28+
+---------------------------+------------------+------------------+---------------+
29+
| Tako (not taco! 🌮) | ~148,800 | ~649 µs | ~12.6 MB/s |
30+
| Axum (the hype one 🌀) | ~153,500 | ~607 µs | ~19 MB/s |
31+
| Actix (speed demon 💥) | ~126,300 | ~860 µs | ~15.7 MB/s |
32+
+---------------------------+------------------+------------------+---------------+
33+
34+
✅ The benchmark ran successfully! 🎉
35+
👉 Command used: `wrk -t4 -c100 -d30s http://127.0.0.1:8080/`
36+
37+
---
38+
2439
## 📦 Installation
2540

2641
Add **Tako** to your `Cargo.toml`:

examples/hello-world/Cargo.lock

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/server.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ async fn run(listener: TcpListener, router: Router) -> Result<(), BoxError> {
6060

6161
loop {
6262
let (stream, addr) = listener.accept().await?;
63-
println!("Accepted connection from {}", addr);
6463
let io = hyper_util::rt::TokioIo::new(stream);
6564
let router = router.clone();
6665

src/server_tls.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ pub async fn run(
8787

8888
loop {
8989
let (stream, addr) = listener.accept().await?;
90-
println!("Accepted TLS connection from {addr}");
9190
let acceptor = acceptor.clone();
9291
let router = router.clone();
9392

0 commit comments

Comments
 (0)