function createBenchmark( len, shape, xtype, order, dims ) {
	var x;

	x = discreteUniform( len, -10, 10 );
	x = new ndarray( xtype, x, shape, shape2strides( shape, order ), 0, order );

	return benchmark;

	/**
	* Benchmark function.
	*
	* @private
	* @param {Benchmark} b - benchmark instance
	*/
	function benchmark( b ) {
		var out;
		var i;

		b.tic();
		for ( i = 0; i < b.iterations; i++ ) {
			out = countFalsy( x, {
				'dims': dims
			});
			if ( typeof out !== 'object' ) {
				b.fail( 'should return an ndarray' );
			}
		}
		b.toc();
		if ( !isndarrayLike( out ) ) {
			b.fail( 'should return an ndarray' );
		}
		b.pass( 'benchmark finished' );
		b.end();
	}
}
Creates a benchmark function.

@private
@param {PositiveInteger} len - ndarray length
@param {NonNegativeIntegerArray} shape - ndarray shape
@param {string} xtype - ndarray data type
@param {string} order - memory layout
@param {NonNegativeIntegerArray} dims - list of dimensions to reduce
@returns {Function} benchmark function