Skip to content

Instantly share code, notes, and snippets.

@hassy
Last active January 9, 2016 13:16
Show Gist options
  • Save hassy/d5e3c9bb4ed151166abe to your computer and use it in GitHub Desktop.
Save hassy/d5e3c9bb4ed151166abe to your computer and use it in GitHub Desktop.
Example for using minigun-core
var minigun = require('minigun-core').runner;
var script = require('./my-test-script.json');
var ee = minigun(script);
ee.on('phaseStarted', function(spec) {}); // fired when a phase begins; spec is the phase definition (from the script)
ee.on('phaseCompleted', function(spec) {}); // fired when a phase completes; spec is as above
ee.on('stats', function(stats) {}); // fired every 10s; stats is a JSON object with stats for the previous 10s
ee.on('done', function(report) {}); // fired when the test completes, report is a JSON object with all stats
ee.run();
@hassy
Copy link
Author

hassy commented Jan 9, 2016

@mark-r-m if you have any more questions, feel free to ping me on https://gitter.im/shoreditch-ops/minigun

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