Skip to content

Instantly share code, notes, and snippets.

@xxuejie
Last active November 11, 2015 07:28
Show Gist options
  • Save xxuejie/ab6ec03a17d14b942e77 to your computer and use it in GitHub Desktop.
Save xxuejie/ab6ec03a17d14b942e77 to your computer and use it in GitHub Desktop.
$ # testing syro
$ wrk -t12 -c400 -d30s http://127.0.0.1:9292/foo/bar
Running 30s test @ http://127.0.0.1:9292/foo/bar
12 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 186.63ms 75.95ms 712.69ms 71.36%
Req/Sec 58.40 66.78 280.00 79.20%
16025 requests in 30.09s, 2.81MB read
Socket errors: connect 0, read 310, write 0, timeout 0
Requests/sec: 532.63
Transfer/sec: 95.71KB
$ # testing kemal
$ wrk -t12 -c400 -d30s http://127.0.0.1:3000/foo/bar
Running 30s test @ http://127.0.0.1:3000/foo/bar
12 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 15.37ms 2.05ms 44.65ms 84.56%
Req/Sec 2.13k 191.52 4.98k 83.25%
764741 requests in 30.08s, 72.20MB read
Socket errors: connect 0, read 222, write 0, timeout 0
Requests/sec: 25424.94
Transfer/sec: 2.40MB
$ # syro again
$ wrk -t12 -c400 -d30s http://127.0.0.1:9292/admin
Running 30s test @ http://127.0.0.1:9292/admin
12 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 189.23ms 121.90ms 1.97s 87.29%
Req/Sec 53.05 55.98 400.00 85.25%
15980 requests in 30.10s, 2.79MB read
Socket errors: connect 0, read 513, write 0, timeout 0
Requests/sec: 530.84
Transfer/sec: 94.87KB
$ # kemal again
$ wrk -t12 -c400 -d30s http://127.0.0.1:3000/admin
Running 30s test @ http://127.0.0.1:3000/admin
12 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 18.21ms 9.56ms 162.06ms 95.01%
Req/Sec 1.90k 329.47 3.42k 79.34%
682250 requests in 30.08s, 63.76MB read
Socket errors: connect 0, read 92, write 0, timeout 0
Requests/sec: 22681.34
Transfer/sec: 2.12MB
require "kemal"
get "/foo/bar" do
"hello world"
end
get "/admin" do
"for admins"
end
# Started with a plain rackup
require "syro"
Admin = Syro.new {
get {
res.write("for admins")
}
}
App = Syro.new {
on("foo/bar") {
get {
res.write("hello world")
}
}
on("admin") {
run(Admin)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment