Skip to content

Scripts for conveniently executing AcmeAir with Vagrantfile to set up machine

License

Notifications You must be signed in to change notification settings

alexwishart/acmeair-scripts

 
 

Repository files navigation

acmeair-scripts

Scripts for conveniently executing AcmeAir.

The default paths in these scripts and examples below assume you will be working in $HOME/acmeair. Adjust the values in the scripts to suit your environment.

Set up database

  • Get MongoDB v3, install locally.
  • Edit mongo_ramdisk.sh and adjust MONGO_ROOT to the location of your Mongo install.
  • Adjust (or remove) DB_AFFINITY as appropriate to suit your system.
  • Run mongo_ramdisk.sh start which will create a ramdisk and start MongoDB with a blank database on it. (Note, this requires sudo permissions for creating the ramdisk)

Other commands for mongo_ramdisk.sh: stop the database with stop, check if it's running with status, or get a MongoDB shell with shell.

Set up Node.js AcmeAir implementation

cd $HOME/acmeair
git clone https://github.com/acmeair/acmeair-nodejs.git

Edit acmeair-nodejs/settings.json and change:

  • mongoHost - hostname for your database server
  • useDevLogger - set to false to disable verbose logging of requests

Edit acmeair-nodejs/loader/loader-settings.json and change:

  • MAX_DAYS_TO_SCHEDULE_FLIGHTS to 30

This is required to populate the database with enough flight data for the JMeter driver, which will issue queries for flights up to 30 days from today.

Populate the database

Run loaddb-nodejs.sh, which will start the Node.js implementation, then access the http://localhost:9080/rest/api/loader/load URL to populate the database.

Resetting the database

Between runs, you can quickly reset the database back to a pristine state by running resetdb.sh, which will run mongo_ramdisk.sh stop, start and loaddb-nodejs.sh for you.

Set up the driver

git clone https://github.com/djones6/acmeair-driver.git (my fork parameterizes the values in the AcmeAir.jmx driver script)

Follow the JMeter installation instructions: https://github.com/djones6/acmeair-driver/blob/master/acmeair-jmeter/README.md

Ensure you customize the user.properties file (in particular, give CONTEXT_ROOT an empty value and adjust the THREADS, RAMPUP, DURATION, DELAY etc for your needs).

You can get more frequent command-line throughput summaries by reducing the value of summariser.interval (the minimum interval supported by JMeter is 6 seconds).

Measuring Node.js

runnode.sh (in one terminal) runclient.sh (in another terminal)

  • customize the runclient.sh script appropriately for your JMeter installation and the location of your properties files.

About

Scripts for conveniently executing AcmeAir with Vagrantfile to set up machine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%