Skip to content

Instantly share code, notes, and snippets.

@jontaylor
Created September 24, 2014 15:33
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 jontaylor/1ee3ef043fc34aea8017 to your computer and use it in GitHub Desktop.
Save jontaylor/1ee3ef043fc34aea8017 to your computer and use it in GitHub Desktop.
package MyApp;
use Mojo::Base 'Mojolicious';
# This method will run once at server start
sub startup {
my $self = shift;
# Documentation browser under "/perldoc"
$self->plugin('PODRenderer');
# Router
my $r = $self->routes;
# Normal route to controller
$r->get('/')->to('example#welcome');
}
1;
@jontaylor
Copy link
Author

mojo generate app MyApp
cd my_app
hypnotoad script/my_app
ab -n20000 -c20 "http://127.0.0.1:8080/"

Stall occurs at 16000 requests processed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment