Skip to content

Instantly share code, notes, and snippets.

@jhthorsen
Last active February 19, 2016 11:44
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 jhthorsen/9744e3dec887e89f50be to your computer and use it in GitHub Desktop.
Save jhthorsen/9744e3dec887e89f50be to your computer and use it in GitHub Desktop.
NYTProf for Mojolicious
#!/bin/sh
# nytprofmojo.sh <time> <port>
# nytprofmojo.sh 10s 8080
MOJO_PORT=${2:-3456}
perl -d:NYTProf -Ilib examples/hello.pl daemon -l http://*:$MOJO_PORT -m production 2>stderr.log &
MOJO_PID=$!
sleep 1
wrk -c 100 -d ${1:-10} http://localhost:$MOJO_PORT
kill $MOJO_PID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment