Created
April 13, 2016 15:05
-
-
Save bduggan/87517a3f3b45da2755c889039a3db92d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bduggan: wrk -t 5 http://localhost:3333 | |
Running 10s test @ http://localhost:3333 | |
5 threads and 10 connections | |
Thread Stats Avg Stdev Max +/- Stdev | |
Latency 136.11ms 248.76ms 1.30s 85.47% | |
Req/Sec 92.86 40.93 217.00 69.28% | |
3128 requests in 10.09s, 253.54KB read | |
Requests/sec: 309.93 | |
Transfer/sec: 25.12KB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6; | |
my $response = q:to/HERE/.encode("UTF-8"); | |
HTTP/1.1 200 OK | |
Content-Length: 6 | |
Connection: close | |
Content-Type:text/plain | |
hello | |
HERE | |
my $loop = | |
start { | |
react { | |
whenever IO::Socket::Async.listen('localhost',3333) -> $conn { | |
my $req_str; | |
whenever $conn.Supply(:bin) -> $buf { | |
$conn.write($response); | |
$conn.close; | |
} | |
} | |
} | |
} | |
await $loop; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment