Last active
December 26, 2015 15:29
-
-
Save A/7172787 to your computer and use it in GitHub Desktop.
Почему стоит писать NODE_ENV=production
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
# create app | |
npm i -g express | |
express test | |
cd test | |
npm i | |
# test w/o NODE_ENV | |
node app.js > /dev/null & | |
pid=$! | |
ab -n 1000 -c 100 -k -q http://127.0.0.1:3000/ | grep "Requests per" | cut -d ' ' -f 7 | |
kill $pid | |
# I get 201.47 RPM | |
# test w/ NODE_ENV=production | |
NODE_ENV=production node app.js > /dev/null & | |
pid=$! | |
ab -n 1000 -c 100 -k -q http://127.0.0.1:3000/ | grep "Requests per" | cut -d ' ' -f 7 | |
kill $pid | |
# I get 1680.13 RPM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment