lib/benchmark-context.js
function (benchmark, simultaneousRequests, done) {
	var pageName,
		engineName;

	this.benchmark = benchmark;
	this.simultaneousRequests = simultaneousRequests;
	this.done = done;

	if (typeof simultaneousRequests !== "number") {
		throw new Error("simultaneousRequests must be an integer; " + (typeof simultaneousRequests) + " passed");
	}
	if (simultaneousRequests < 1) {
		throw new Error("simultaneousRequests must be at least 1; " + simultaneousRequests + " passed");
	}

	this.responseTimes = {};
	for (pageName in this.benchmark.pages) {
		this.responseTimes[pageName] = {};
		for (engineName in this.benchmark.engines) {
			this.responseTimes[pageName][engineName] = [];
		}
	}

	this.totals = {};
}
function (benchmark, simultaneousRequests, done) {
	var pageName,
		engineName;

	this.benchmark = benchmark;
	this.simultaneousRequests = simultaneousRequests;
	this.done = done;

	if (typeof simultaneousRequests !== "number") {
		throw new Error("simultaneousRequests must be an integer; " + (typeof simultaneousRequests) + " passed");
	}
	if (simultaneousRequests < 1) {
		throw new Error("simultaneousRequests must be at least 1; " + simultaneousRequests + " passed");
	}

	this.responseTimes = {};
	for (pageName in this.benchmark.pages) {
		this.responseTimes[pageName] = {};
		for (engineName in this.benchmark.engines) {
			this.responseTimes[pageName][engineName] = [];
		}
	}

	this.totals = {};
}
function ( benchmark , simultaneousRequests , done ) { var pageName , engineName ; this . benchmark = benchmark ; this . simultaneousRequests = simultaneousRequests ; this . done = done ; if ( typeof simultaneousRequests !== "number" ) { throw new Error ( "simultaneousRequests must be an integer; " + ( typeof simultaneousRequests ) + " passed" ) ; } if ( simultaneousRequests < 1 ) { throw new Error ( "simultaneousRequests must be at least 1; " + simultaneousRequests + " passed" ) ; } this . responseTimes = { } ; for ( pageName in this . benchmark . pages ) { this . responseTimes [ pageName ] = { } ; for ( engineName in this . benchmark . engines ) { this . responseTimes [ pageName ] [ engineName ] = [ ] ; } } this . totals = { } ; }
Instances of BenchmarkContext are one-time only
Instances of BenchmarkContext are one - time only