Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions hapiserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
const Hapi = require('hapi');

// Create a server with a host and port
const server = new Hapi.Server();
server.connection({
const server = new Hapi.Server({
host: 'localhost',
port: 8000
});
Expand Down
11 changes: 7 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apt-get install apache2-utils
apt-get install npm
apt-get install apache2-utils -y
apt-get install npm -y
npm install n -g
n latest
npm install hapi
Expand All @@ -11,9 +11,12 @@ npm install n
npm install total.js
npm install adonis-cli -g
adonis new yardstick
cd ./yardstick
npm install
cd ..
cp yardstick-changes/app/Http/kernel.js yardstick/app/Http/kernel.js
cp yardstick-changes/app/Http/routes.js yardstick/app/Http/routes.js
npm install sails -g
sails new test-project
sails new test-project --minimal
cp test-project-changes/api/controllers/ApiController.js test-project/api/controllers/ApiController.js
cp test-project-changes/config/routes.js test-project/config/routes.js
cp test-project-changes/config/routes.js test-project/config/routes.js
4 changes: 2 additions & 2 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ sleep 5

echo adonis.js >> results.txt ;
cd yardstick ;
npm start run & sleep 5 ;
npm run serve & sleep 5 ;
cd ..;
ab -k -n 50000 -c 100 -t 20 http://127.0.0.1:3333/ | grep "Requests per second:" >> results.txt ;
pkill -f server.js ;
sleep 5
sleep 5