Skip to content

Instantly share code, notes, and snippets.

View jsclayton's full-sized avatar

John Clayton jsclayton

View GitHub Profile
@jsclayton
jsclayton / load.js
Created March 11, 2012 05:18 — forked from mbrevoort/load.js
Simple ab style load generator
// requires request, measured, optimist and microtime npm modules
var util = require('util')
, request = require('request')
, microtime = require('microtime')
, measured = require('measured')
, collection = new measured.Collection('http')
, argv = require('optimist').usage('node load.js -c [concurrent] -n [total] url').argv;
var c = argv.c || 1
, n = argv.n || 1, uri = argv._[0]