What have you found for these years?

2010-05-06

async thin (or em'ed rainbows)

async thin:
~> ab -n 100 -c 10 http://127.0.0.1:9292/
Concurrency Level: 10
Time taken for tests: 10.939 seconds
Complete requests: 100

use ContentType
run lambda{ |env|
Thread.new{
sleep(1)
env['async.callback'].call [200, {}, ["OK\n\n"]]
}
throw :async

# sleep(1)
# [200, {}, ["OK\n\n"]]
}

sync thin:
~> ab -n 100 -c 10 http://127.0.0.1:9292/
Concurrency Level: 10
Time taken for tests: 100.295 seconds
Complete requests: 100
use ContentType
run lambda{ |env|
# Thread.new{
# sleep(1)
# env['async.callback'].call [200, {}, ["OK\n\n"]]
# }
# throw :async

sleep(1)
[200, {}, ["OK\n\n"]]
}

0 retries:

Post a Comment

Note: Only a member of this blog may post a comment.



All texts are licensed under CC Attribution 3.0