Skip to content

Instantly share code, notes, and snippets.

@bduggan
Created April 13, 2016 15:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bduggan/87517a3f3b45da2755c889039a3db92d to your computer and use it in GitHub Desktop.
Save bduggan/87517a3f3b45da2755c889039a3db92d to your computer and use it in GitHub Desktop.
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
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