You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
idoctnef 52b63ee33a nodejs with express server, leapmotion for movement control, and threejs for 3d render 8 years ago
..
README.md nodejs with express server, leapmotion for movement control, and threejs for 3d render 8 years ago

README.md

Benchmark.js v1.0.0

Benchmark

Benchmark.prototype

Benchmark.options

Benchmark.platform

Benchmark.support

Benchmark.prototype.error

Benchmark.prototype.stats

Benchmark.prototype.times

Benchmark.Deferred

Benchmark.Deferred.prototype

Benchmark.Event

Benchmark.Event.prototype

Benchmark.Event.prototype.currentTarget

Benchmark.Event.prototype.target

Benchmark.Suite

Benchmark.Suite.prototype

Benchmark.Suite.options

Benchmark

Benchmark(name, fn [, options={}])

#

The Benchmark constructor.

Arguments

  1. name (String): A name to identify the benchmark.
  2. fn (Function|String): The test to benchmark.
  3. [options={}] (Object): Options object.

Example

// basic usage (the `new` operator is optional)
var bench = new Benchmark(fn);

// or using a name first
var bench = new Benchmark('foo', fn);

// or with options
var bench = new Benchmark('foo', fn, {

  // displayed by Benchmark#toString if `name` is not available
  'id': 'xyz',

  // called when the benchmark starts running
  'onStart': onStart,

  // called after each run cycle
  'onCycle': onCycle,

  // called when aborted
  'onAbort': onAbort,

  // called when a test errors
  'onError': onError,

  // called when reset
  'onReset': onReset,

  // called when the benchmark completes running
  'onComplete': onComplete,

  // compiled/called before the test loop
  'setup': setup,

  // compiled/called after the test loop
  'teardown': teardown
});

// or name and options
var bench = new Benchmark('foo', {

  // a flag to indicate the benchmark is deferred
  'defer': true,

  // benchmark test function
  'fn': function(deferred) {
    // call resolve() when the deferred test is finished
    deferred.resolve();
  }
});

// or options only
var bench = new Benchmark({

  // benchmark name
  'name': 'foo',

  // benchmark test as a string
  'fn': '[1,2,3,4].sort()'
});

// a test's `this` binding is set to the benchmark instance
var bench = new Benchmark('foo', function() {
  'My name is '.concat(this.name); // My name is foo
});

Benchmark.version

#

(String): The semantic version number.


Benchmark.deepClone(value)

#

A deep clone utility.

Arguments

  1. value (Mixed): The value to clone.

Returns

(Mixed): The cloned value.


Benchmark.each(object, callback, thisArg)

#

An iteration utility for arrays and objects. Callbacks may terminate the loop by explicitly returning false.

Arguments

  1. object (Array|Object): The object to iterate over.
  2. callback (Function): The function called per iteration.
  3. thisArg (Mixed): The this binding for the callback.

Returns

(Array, Object): Returns the object iterated over.


Benchmark.extend(destination [, source={}])

#

Copies enumerable properties from the source(s) object to the destination object.

Arguments

  1. destination (Object): The destination object.
  2. [source={}] (Object): The source object.

Returns

(Object): The destination object.


Benchmark.filter(array, callback, thisArg)

#

A generic Array#filter like method.

Arguments

  1. array (Array): The array to iterate over.
  2. callback (Function|String): The function/alias called per iteration.
  3. thisArg (Mixed): The this binding for the callback.

Returns

(Array): A new array of values that passed callback filter.

Example

// get odd numbers
Benchmark.filter([1, 2, 3, 4, 5], function(n) {
  return n % 2;
}); // -> [1, 3, 5];

// get fastest benchmarks
Benchmark.filter(benches, 'fastest');

// get slowest benchmarks
Benchmark.filter(benches, 'slowest');

// get benchmarks that completed without erroring
Benchmark.filter(benches, 'successful');

Benchmark.forEach(array, callback, thisArg)

#

A generic Array#forEach like method. Callbacks may terminate the loop by explicitly returning false.

Arguments

  1. array (Array): The array to iterate over.
  2. callback (Function): The function called per iteration.
  3. thisArg (Mixed): The this binding for the callback.

Returns

(Array): Returns the array iterated over.


Benchmark.formatNumber(number)

#

Converts a number to a more readable comma-separated string representation.

Arguments

  1. number (Number): The number to convert.

Returns

(String): The more readable string representation.


Benchmark.forOwn(object, callback, thisArg)

#

Iterates over an object's own properties, executing the callback for each. Callbacks may terminate the loop by explicitly returning false.

Arguments

  1. object (Object): The object to iterate over.
  2. callback (Function): The function executed per own property.
  3. thisArg (Mixed): The this binding for the callback.

Returns

(Object): Returns the object iterated over.


Benchmark.hasKey(object, key)

#

Checks if an object has the specified key as a direct property.

Arguments

  1. object (Object): The object to check.
  2. key (String): The key to check for.

Returns

(Boolean): Returns true if key is a direct property, else false.


Benchmark.indexOf(array, value [, fromIndex=0])

#

A generic Array#indexOf like method.

Arguments

  1. array (Array): The array to iterate over.
  2. value (Mixed): The value to search for.
  3. [fromIndex=0] (Number): The index to start searching from.

Returns

(Number): The index of the matched value or -1.


Benchmark.interpolate(string, object)

#

Modify a string by replacing named tokens with matching object property values.

Arguments

  1. string (String): The string to modify.
  2. object (Object): The template object.

Returns

(String): The modified string.


Benchmark.invoke(benches, name [, arg1, arg2, ...])

#

Invokes a method on all items in an array.

Arguments

  1. benches (Array): Array of benchmarks to iterate over.
  2. name (String|Object): The name of the method to invoke OR options object.
  3. [arg1, arg2, ...] (Mixed): Arguments to invoke the method with.

Returns

(Array): A new array of values returned from each method invoked.

Example

// invoke `reset` on all benchmarks
Benchmark.invoke(benches, 'reset');

// invoke `emit` with arguments
Benchmark.invoke(benches, 'emit', 'complete', listener);

// invoke `run(true)`, treat benchmarks as a queue, and register invoke callbacks
Benchmark.invoke(benches, {

  // invoke the `run` method
  'name': 'run',

  // pass a single argument
  'args': true,

  // treat as queue, removing benchmarks from front of `benches` until empty
  'queued': true,

  // called before any benchmarks have been invoked.
  'onStart': onStart,

  // called between invoking benchmarks
  'onCycle': onCycle,

  // called after all benchmarks have been invoked.
  'onComplete': onComplete
});

Benchmark.join(object [, separator1=',', separator2=': '])

#

Creates a string of joined array values or object key-value pairs.

Arguments

  1. object (Array|Object): The object to operate on.
  2. [separator1=','] (String): The separator used between key-value pairs.
  3. [separator2=': '] (String): The separator used between keys and values.

Returns

(String): The joined result.


Benchmark.map(array, callback, thisArg)

#

A generic Array#map like method.

Arguments

  1. array (Array): The array to iterate over.
  2. callback (Function): The function called per iteration.
  3. thisArg (Mixed): The this binding for the callback.

Returns

(Array): A new array of values returned by the callback.


Benchmark.pluck(array, property)

#

Retrieves the value of a specified property from all items in an array.

Arguments

  1. array (Array): The array to iterate over.
  2. property (String): The property to pluck.

Returns

(Array): A new array of property values.


Benchmark.reduce(array, callback, accumulator)

#

A generic Array#reduce like method.

Arguments

  1. array (Array): The array to iterate over.
  2. callback (Function): The function called per iteration.
  3. accumulator (Mixed): Initial value of the accumulator.

Returns

(Mixed): The accumulator.


Benchmark.prototype

Benchmark.prototype.aborted

#

(Boolean): A flag to indicate if the benchmark is aborted.


Benchmark.prototype.compiled

#

(Function, String): The compiled test function.


Benchmark.prototype.count

#

(Number): The number of times a test was executed.


Benchmark.prototype.cycles

#

(Number): The number of cycles performed while benchmarking.


Benchmark.prototype.fn

#

(Function, String): The test to benchmark.


Benchmark.prototype.hz

#

(Number): The number of executions per second.


Benchmark.prototype.running

#

(Boolean): A flag to indicate if the benchmark is running.


Benchmark.prototype.setup

#

(Function, String): Compiled into the test and executed immediately before the test loop.

Example

// basic usage
var bench = Benchmark({
  'setup': function() {
    var c = this.count,
        element = document.getElementById('container');
    while (c--) {
      element.appendChild(document.createElement('div'));
    }
  },
  'fn': function() {
    element.removeChild(element.lastChild);
  }
});

// compiles to something like:
var c = this.count,
    element = document.getElementById('container');
while (c--) {
  element.appendChild(document.createElement('div'));
}
var start = new Date;
while (count--) {
  element.removeChild(element.lastChild);
}
var end = new Date - start;

// or using strings
var bench = Benchmark({
  'setup': '\
    var a = 0;\n\
    (function() {\n\
      (function() {\n\
        (function() {',
  'fn': 'a += 1;',
  'teardown': '\
         }())\n\
       }())\n\
     }())'
});

// compiles to something like:
var a = 0;
(function() {
  (function() {
    (function() {
      var start = new Date;
      while (count--) {
        a += 1;
      }
      var end = new Date - start;
    }())
  }())
}())

Benchmark.prototype.teardown

#

(Function, String): Compiled into the test and executed immediately after the test loop.


Benchmark.prototype.abort()

#

Aborts the benchmark without recording times.

Returns

(Object): The benchmark instance.


Benchmark.prototype.clone(options)

#

Creates a new benchmark using the same test and options.

Arguments

  1. options (Object): Options object to overwrite cloned options.

Returns

(Object): The new benchmark instance.

Example

var bizarro = bench.clone({
  'name': 'doppelganger'
});

Benchmark.prototype.compare(other)

#

Determines if a benchmark is faster than another.

Arguments

  1. other (Object): The benchmark to compare.

Returns

(Number): Returns -1 if slower, 1 if faster, and 0 if indeterminate.


Benchmark.Suite.prototype.emit(type)

#

Executes all registered listeners of the specified event type.

Arguments

  1. type (String|Object): The event type or object.

Returns

(Mixed): Returns the return value of the last listener executed.


Benchmark.Suite.prototype.listeners(type)

#

Returns an array of event listeners for a given type that can be manipulated to add or remove listeners.

Arguments

  1. type (String): The event type.

Returns

(Array): The listeners array.


Benchmark.Suite.prototype.off([type, listener])

#

Unregisters a listener for the specified event type(s), or unregisters all listeners for the specified event type(s), or unregisters all listeners for all event types.

Arguments

  1. [type] (String): The event type.
  2. [listener] (Function): The function to unregister.

Returns

(Object): The benchmark instance.

Example

// unregister a listener for an event type
bench.off('cycle', listener);

// unregister a listener for multiple event types
bench.off('start cycle', listener);

// unregister all listeners for an event type
bench.off('cycle');

// unregister all listeners for multiple event types
bench.off('start cycle complete');

// unregister all listeners for all event types
bench.off();

Benchmark.Suite.prototype.on(type, listener)

#

Registers a listener for the specified event type(s).

Arguments

  1. type (String): The event type.
  2. listener (Function): The function to register.

Returns

(Object): The benchmark instance.

Example

// register a listener for an event type
bench.on('cycle', listener);

// register a listener for multiple event types
bench.on('start cycle', listener);

Benchmark.prototype.reset()

#

Reset properties and abort if running.

Returns

(Object): The benchmark instance.


Benchmark.prototype.run([options={}])

#

Runs the benchmark.

Arguments

  1. [options={}] (Object): Options object.

Returns

(Object): The benchmark instance.

Example

// basic usage
bench.run();

// or with options
bench.run({ 'async': true });

Benchmark.prototype.toString()

#

Displays relevant benchmark information when coerced to a string.

Returns

(String): A string representation of the benchmark instance.


Benchmark.options

Benchmark.options

#

(Object): The default options copied by benchmark instances.


Benchmark.options.async

#

(Boolean): A flag to indicate that benchmark cycles will execute asynchronously by default.


Benchmark.options.defer

#

(Boolean): A flag to indicate that the benchmark clock is deferred.


Benchmark.options.delay

#

(Number): The delay between test cycles (secs).


Benchmark.options.id

#

(String): Displayed by Benchmark#toString when a name is not available (auto-generated if absent).


Benchmark.options.initCount

#

(Number): The default number of times to execute a test on a benchmark's first cycle.


Benchmark.options.maxTime

#

(Number): The maximum time a benchmark is allowed to run before finishing (secs). Note: Cycle delays aren't counted toward the maximum time.


Benchmark.options.minSamples

#

(Number): The minimum sample size required to perform statistical analysis.


Benchmark.options.minTime

#

(Number): The time needed to reduce the percent uncertainty of measurement to 1% (secs).


Benchmark.options.name

#

(String): The name of the benchmark.


Benchmark.options.onAbort

#

An event listener called when the benchmark is aborted.


Benchmark.options.onComplete

#

An event listener called when the benchmark completes running.


Benchmark.options.onCycle

#

An event listener called after each run cycle.


Benchmark.options.onError

#

An event listener called when a test errors.


Benchmark.options.onReset

#

An event listener called when the benchmark is reset.


Benchmark.options.onStart

#

An event listener called when the benchmark starts running.


Benchmark.platform

Benchmark.platform

#

(Object): Platform object with properties describing things like browser name, version, and operating system.


Benchmark.platform.description

#

(String): The platform description.


Benchmark.platform.layout

#

(String, Null): The name of the browser layout engine.


Benchmark.platform.manufacturer

#

(String, Null): The name of the product's manufacturer.


Benchmark.platform.name

#

(String, Null): The name of the browser/environment.


Benchmark.platform.os

#

(String, Null): The name of the operating system.


Benchmark.platform.prerelease

#

(String, Null): The alpha/beta release indicator.


Benchmark.platform.product

#

(String, Null): The name of the product hosting the browser.


Benchmark.platform.version

#

(String, Null): The browser/environment version.


Benchmark.platform.toString()

#

Return platform description when the platform object is coerced to a string.

Returns

(String): The platform description.


Benchmark.support

Benchmark.support

#

(Object): An object used to flag environments/features.


Benchmark.support.air

#

(Boolean): Detect Adobe AIR.


Benchmark.support.argumentsClass

#

(Boolean): Detect if arguments objects have the correct internal Class value.


Benchmark.support.browser

#

(Boolean): Detect if in a browser environment.


Benchmark.support.charByIndex

#

(Boolean): Detect if strings support accessing characters by index.


Benchmark.support.charByOwnIndex

#

(Boolean): Detect if strings have indexes as own properties.


Benchmark.support.decompilation

#

(Boolean): Detect if functions support decompilation.


Benchmark.support.descriptors

#

(Boolean): Detect ES5+ property descriptor API.


Benchmark.support.getAllKeys

#

(Boolean): Detect ES5+ Object.getOwnPropertyNames().


Benchmark.support.iteratesOwnFirst

#

(Boolean): Detect if own properties are iterated before inherited properties (all but IE < 9).


Benchmark.support.java

#

(Boolean): Detect if Java is enabled/exposed.


Benchmark.support.nodeClass

#

(Boolean): Detect if a node's Class is resolvable (all but IE < 9) and that the JS engine errors when attempting to coerce an object to a string without a toString property value of typeof "function".


Benchmark.support.timeout

#

(Boolean): Detect if the Timers API exists.


Benchmark.prototype.error

Benchmark.prototype.error

#

(Object): The error object if the test failed.


Benchmark.prototype.stats

Benchmark.prototype.stats

#

(Object): An object of stats including mean, margin or error, and standard deviation.


Benchmark.prototype.stats.deviation

#

(Number): The sample standard deviation.


Benchmark.prototype.stats.mean

#

(Number): The sample arithmetic mean.


Benchmark.prototype.stats.moe

#

(Number): The margin of error.


Benchmark.prototype.stats.rme

#

(Number): The relative margin of error (expressed as a percentage of the mean).


Benchmark.prototype.stats.sample

#

(Array): The array of sampled periods.


Benchmark.prototype.stats.sem

#

(Number): The standard error of the mean.


Benchmark.prototype.stats.variance

#

(Number): The sample variance.


Benchmark.prototype.times

Benchmark.prototype.times

#

(Object): An object of timing data including cycle, elapsed, period, start, and stop.


Benchmark.prototype.times.cycle

#

(Number): The time taken to complete the last cycle (secs).


Benchmark.prototype.times.elapsed

#

(Number): The time taken to complete the benchmark (secs).


Benchmark.prototype.times.period

#

(Number): The time taken to execute the test once (secs).


Benchmark.prototype.times.timeStamp

#

(Number): A timestamp of when the benchmark started (ms).


Benchmark.Deferred

Benchmark.Deferred(clone)

#

The Deferred constructor.

Arguments

  1. clone (Object): The cloned benchmark instance.

Benchmark.Deferred.prototype

Benchmark.Deferred.prototype.benchmark

#

(Object): The deferred benchmark instance.


Benchmark.Deferred.prototype.cycles

#

(Number): The number of deferred cycles performed while benchmarking.


Benchmark.Deferred.prototype.elapsed

#

(Number): The time taken to complete the deferred benchmark (secs).


Benchmark.Deferred.prototype.resolve

#

(Unknown): Handles cycling/completing the deferred benchmark.


Benchmark.Deferred.prototype.timeStamp

#

(Number): A timestamp of when the deferred benchmark started (ms).


Benchmark.Event

Benchmark.Event(type)

#

The Event constructor.

Arguments

  1. type (String|Object): The event type.

Benchmark.Event.prototype

Benchmark.Event.prototype.aborted

#

(Boolean): A flag to indicate if the emitters listener iteration is aborted.


Benchmark.Event.prototype.cancelled

#

(Boolean): A flag to indicate if the default action is cancelled.


Benchmark.Event.prototype.result

#

(Mixed): The return value of the last executed listener.


Benchmark.Event.prototype.timeStamp

#

(Number): A timestamp of when the event was created (ms).


Benchmark.Event.prototype.type

#

(String): The event type.


Benchmark.Event.prototype.currentTarget

Benchmark.Event.prototype.currentTarget

#

(Object): The object whose listeners are currently being processed.


Benchmark.Event.prototype.target

Benchmark.Event.prototype.target

#

(Object): The object to which the event was originally emitted.


Benchmark.Suite

Benchmark.Suite(name [, options={}])

#

The Suite constructor.

Arguments

  1. name (String): A name to identify the suite.
  2. [options={}] (Object): Options object.

Example

// basic usage (the `new` operator is optional)
var suite = new Benchmark.Suite;

// or using a name first
var suite = new Benchmark.Suite('foo');

// or with options
var suite = new Benchmark.Suite('foo', {

  // called when the suite starts running
  'onStart': onStart,

  // called between running benchmarks
  'onCycle': onCycle,

  // called when aborted
  'onAbort': onAbort,

  // called when a test errors
  'onError': onError,

  // called when reset
  'onReset': onReset,

  // called when the suite completes running
  'onComplete': onComplete
});

Benchmark.Suite.prototype

Benchmark.Suite.prototype.aborted

#

(Boolean): A flag to indicate if the suite is aborted.


Benchmark.Suite.prototype.length

#

(Number): The number of benchmarks in the suite.


Benchmark.Suite.prototype.running

#

(Boolean): A flag to indicate if the suite is running.


Benchmark.Suite.prototype.abort()

#

Aborts all benchmarks in the suite.

Returns

(Object): The suite instance.


Benchmark.Suite.prototype.add(name, fn [, options={}])

#

Adds a test to the benchmark suite.

Arguments

  1. name (String): A name to identify the benchmark.
  2. fn (Function|String): The test to benchmark.
  3. [options={}] (Object): Options object.

Returns

(Object): The benchmark instance.

Example

// basic usage
suite.add(fn);

// or using a name first
suite.add('foo', fn);

// or with options
suite.add('foo', fn, {
  'onCycle': onCycle,
  'onComplete': onComplete
});

// or name and options
suite.add('foo', {
  'fn': fn,
  'onCycle': onCycle,
  'onComplete': onComplete
});

// or options only
suite.add({
  'name': 'foo',
  'fn': fn,
  'onCycle': onCycle,
  'onComplete': onComplete
});

Benchmark.Suite.prototype.clone(options)

#

Creates a new suite with cloned benchmarks.

Arguments

  1. options (Object): Options object to overwrite cloned options.

Returns

(Object): The new suite instance.


Benchmark.Suite.prototype.emit(type)

#

Executes all registered listeners of the specified event type.

Arguments

  1. type (String|Object): The event type or object.

Returns

(Mixed): Returns the return value of the last listener executed.


Benchmark.Suite.prototype.filter(callback)

#

An Array#filter like method.

Arguments

  1. callback (Function|String): The function/alias called per iteration.

Returns

(Object): A new suite of benchmarks that passed callback filter.


Benchmark.Suite.prototype.forEach(callback)

#

An Array#forEach like method. Callbacks may terminate the loop by explicitly returning false.

Arguments

  1. callback (Function): The function called per iteration.

Returns

(Object): The suite iterated over.


Benchmark.Suite.prototype.indexOf(value)

#

An Array#indexOf like method.

Arguments

  1. value (Mixed): The value to search for.

Returns

(Number): The index of the matched value or -1.


Benchmark.Suite.prototype.invoke(name [, arg1, arg2, ...])

#

Invokes a method on all benchmarks in the suite.

Arguments

  1. name (String|Object): The name of the method to invoke OR options object.
  2. [arg1, arg2, ...] (Mixed): Arguments to invoke the method with.

Returns

(Array): A new array of values returned from each method invoked.


Benchmark.Suite.prototype.join([separator=','])

#

Converts the suite of benchmarks to a string.

Arguments

  1. [separator=','] (String): A string to separate each element of the array.

Returns

(String): The string.


Benchmark.Suite.prototype.listeners(type)

#

Returns an array of event listeners for a given type that can be manipulated to add or remove listeners.

Arguments

  1. type (String): The event type.

Returns

(Array): The listeners array.


Benchmark.Suite.prototype.map(callback)

#

An Array#map like method.

Arguments

  1. callback (Function): The function called per iteration.

Returns

(Array): A new array of values returned by the callback.


Benchmark.Suite.prototype.off([type, listener])

#

Unregisters a listener for the specified event type(s), or unregisters all listeners for the specified event type(s), or unregisters all listeners for all event types.

Arguments

  1. [type] (String): The event type.
  2. [listener] (Function): The function to unregister.

Returns

(Object): The benchmark instance.

Example

// unregister a listener for an event type
bench.off('cycle', listener);

// unregister a listener for multiple event types
bench.off('start cycle', listener);

// unregister all listeners for an event type
bench.off('cycle');

// unregister all listeners for multiple event types
bench.off('start cycle complete');

// unregister all listeners for all event types
bench.off();

Benchmark.Suite.prototype.on(type, listener)

#

Registers a listener for the specified event type(s).

Arguments

  1. type (String): The event type.
  2. listener (Function): The function to register.

Returns

(Object): The benchmark instance.

Example

// register a listener for an event type
bench.on('cycle', listener);

// register a listener for multiple event types
bench.on('start cycle', listener);

Benchmark.Suite.prototype.pluck(property)

#

Retrieves the value of a specified property from all benchmarks in the suite.

Arguments

  1. property (String): The property to pluck.

Returns

(Array): A new array of property values.


Benchmark.Suite.prototype.pop()

#

Removes the last benchmark from the suite and returns it.

Returns

(Mixed): The removed benchmark.


Benchmark.Suite.prototype.push()

#

Appends benchmarks to the suite.

Returns

(Number): The suite's new length.


Benchmark.Suite.prototype.reduce(callback, accumulator)

#

An Array#reduce like method.

Arguments

  1. callback (Function): The function called per iteration.
  2. accumulator (Mixed): Initial value of the accumulator.

Returns

(Mixed): The accumulator.


Benchmark.Suite.prototype.reset()

#

Resets all benchmarks in the suite.

Returns

(Object): The suite instance.


Benchmark.Suite.prototype.reverse()

#

Rearrange the host array's elements in reverse order.

Returns

(Array): The reversed array.


Benchmark.Suite.prototype.run([options={}])

#

Runs the suite.

Arguments

  1. [options={}] (Object): Options object.

Returns

(Object): The suite instance.

Example

// basic usage
suite.run();

// or with options
suite.run({ 'async': true, 'queued': true });

Benchmark.Suite.prototype.shift()

#

Removes the first element of the host array and returns it.

Returns

(Mixed): The first element of the array.


Benchmark.Suite.prototype.slice(start, end)

#

Creates an array of the host array's elements from the start index up to, but not including, the end index.

Arguments

  1. start (Number): The starting index.
  2. end (Number): The end index.

Returns

(Array): The new array.


Benchmark.Suite.prototype.sort([compareFn=null])

#

Sorts the benchmarks of the suite.

Arguments

  1. [compareFn=null] (Function): A function that defines the sort order.

Returns

(Object): The sorted suite.


Benchmark.Suite.prototype.splice(start, deleteCount [, val1, val2, ...])

#

Allows removing a range of elements and/or inserting elements into the host array.

Arguments

  1. start (Number): The start index.
  2. deleteCount (Number): The number of elements to delete.
  3. [val1, val2, ...] (Mixed): values to insert at the start index.

Returns

(Array): An array of removed elements.


Benchmark.Suite.prototype.unshift()

#

Appends arguments to the host array.

Returns

(Number): The new length.


Benchmark.Suite.options

Benchmark.Suite.options

#

(Object): The default options copied by suite instances.


Benchmark.Suite.options.name

#

(String): The name of the suite.