tools/snippets/benchmark/benchmark.length.js
function benchmark( b ) {
		var i;

		b.tic();
		for ( i = 0; i < b.iterations; i++ ) {
			// TODO: synchronous task
			if ( TODO/* TODO: condition */ ) {
				b.fail( 'something went wrong' );
			}
		}
		b.toc();
		if ( TODO/* TODO: condition */ ) {
			b.fail( 'something went wrong' );
		}
		b.pass( 'benchmark finished' );
		b.end();
	}
function benchmark( b ) {
		var i;

		b.tic();
		for ( i = 0; i < b.iterations; i++ ) {
			// TODO: synchronous task
			if ( TODO/* TODO: condition */ ) {
				b.fail( 'something went wrong' );
			}
		}
		b.toc();
		if ( TODO/* TODO: condition */ ) {
			b.fail( 'something went wrong' );
		}
		b.pass( 'benchmark finished' );
		b.end();
	}
function benchmark ( b ) { var i ; b . tic ( ) ; for ( i = 0 ; i < b . iterations ; i ++ ) { // TODO: synchronous task if ( TODO /* TODO: condition */ ) { b . fail ( 'something went wrong' ) ; } } b . toc ( ) ; if ( TODO /* TODO: condition */ ) { b . fail ( 'something went wrong' ) ; } b . pass ( 'benchmark finished' ) ; b . end ( ) ; }
Benchmark function.

@private
@param {Benchmark} b - benchmark instance
Benchmark function .