mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 01:57:50 +00:00
Update other vendors jsdoc comment blocks.
Former-commit-id: 3dcc92abe376d4c83baf6d2307c0a4343d5dce31
This commit is contained in:
308
vendor/benchmark.js/benchmark.js
vendored
308
vendor/benchmark.js/benchmark.js
vendored
@@ -105,8 +105,8 @@
|
||||
*
|
||||
* @static
|
||||
* @memberOf Benchmark
|
||||
* @param {Object} [context=window] The context object.
|
||||
* @returns {Function} Returns the `Benchmark` function.
|
||||
* @param {object} [context=window] The context object.
|
||||
* @returns {function} Returns the `Benchmark` function.
|
||||
*/
|
||||
function runInContext(context) {
|
||||
// exit early if unable to acquire lodash
|
||||
@@ -181,7 +181,7 @@
|
||||
*
|
||||
* @static
|
||||
* @memberOf Benchmark
|
||||
* @type Object
|
||||
* @type object
|
||||
*/
|
||||
var support = {};
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
* Detect Adobe AIR.
|
||||
*
|
||||
* @memberOf Benchmark.support
|
||||
* @type Boolean
|
||||
* @type boolean
|
||||
*/
|
||||
support.air = isClassOf(context.runtime, 'ScriptBridgingProxyObject');
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
* Detect if in a browser environment.
|
||||
*
|
||||
* @memberOf Benchmark.support
|
||||
* @type Boolean
|
||||
* @type boolean
|
||||
*/
|
||||
support.browser = doc && isHostType(context, 'navigator') && !isHostType(context, 'phantom');
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
* Detect if Java is enabled/exposed.
|
||||
*
|
||||
* @memberOf Benchmark.support
|
||||
* @type Boolean
|
||||
* @type boolean
|
||||
*/
|
||||
support.java = isClassOf(context.java, 'JavaPackage');
|
||||
|
||||
@@ -215,7 +215,7 @@
|
||||
* Detect if the Timers API exists.
|
||||
*
|
||||
* @memberOf Benchmark.support
|
||||
* @type Boolean
|
||||
* @type boolean
|
||||
*/
|
||||
support.timeout = isHostType(context, 'setTimeout') && isHostType(context, 'clearTimeout');
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
*
|
||||
* @name decompilation
|
||||
* @memberOf Benchmark.support
|
||||
* @type Boolean
|
||||
* @type boolean
|
||||
*/
|
||||
try {
|
||||
// Safari 2.x removes commas in object literals
|
||||
@@ -245,7 +245,7 @@
|
||||
* Timer object used by `clock()` and `Deferred#resolve`.
|
||||
*
|
||||
* @private
|
||||
* @type Object
|
||||
* @type object
|
||||
*/
|
||||
var timer = {
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
*
|
||||
* @private
|
||||
* @memberOf timer
|
||||
* @type Function|Object
|
||||
* @type {(function|object)}
|
||||
*/
|
||||
'ns': Date,
|
||||
|
||||
@@ -263,7 +263,7 @@
|
||||
*
|
||||
* @private
|
||||
* @memberOf timer
|
||||
* @param {Object} deferred The deferred instance.
|
||||
* @param {object} deferred The deferred instance.
|
||||
*/
|
||||
'start': null, // lazy defined in `clock()`
|
||||
|
||||
@@ -272,7 +272,7 @@
|
||||
*
|
||||
* @private
|
||||
* @memberOf timer
|
||||
* @param {Object} deferred The deferred instance.
|
||||
* @param {object} deferred The deferred instance.
|
||||
*/
|
||||
'stop': null // lazy defined in `clock()`
|
||||
};
|
||||
@@ -283,9 +283,9 @@
|
||||
* The Benchmark constructor.
|
||||
*
|
||||
* @constructor
|
||||
* @param {String} name A name to identify the benchmark.
|
||||
* @param {Function|String} fn The test to benchmark.
|
||||
* @param {Object} [options={}] Options object.
|
||||
* @param {string} name A name to identify the benchmark.
|
||||
* @param {(function|string)} fn The test to benchmark.
|
||||
* @param {object} [options={}] Options object.
|
||||
* @example
|
||||
*
|
||||
* // basic usage (the `new` operator is optional)
|
||||
@@ -394,7 +394,7 @@
|
||||
*
|
||||
* @constructor
|
||||
* @memberOf Benchmark
|
||||
* @param {Object} clone The cloned benchmark instance.
|
||||
* @param {object} clone The cloned benchmark instance.
|
||||
*/
|
||||
function Deferred(clone) {
|
||||
var deferred = this;
|
||||
@@ -410,7 +410,7 @@
|
||||
*
|
||||
* @constructor
|
||||
* @memberOf Benchmark
|
||||
* @param {String|Object} type The event type.
|
||||
* @param {(object|string)} type The event type.
|
||||
*/
|
||||
function Event(type) {
|
||||
var event = this;
|
||||
@@ -427,8 +427,8 @@
|
||||
*
|
||||
* @constructor
|
||||
* @memberOf Benchmark
|
||||
* @param {String} name A name to identify the suite.
|
||||
* @param {Object} [options={}] Options object.
|
||||
* @param {string} name A name to identify the suite.
|
||||
* @param {object} [options={}] Options object.
|
||||
* @example
|
||||
*
|
||||
* // basic usage (the `new` operator is optional)
|
||||
@@ -483,8 +483,8 @@
|
||||
* A deep clone utility.
|
||||
*
|
||||
* @private
|
||||
* @param {Mixed} value The value to clone.
|
||||
* @returns {Mixed} The cloned value.
|
||||
* @param {*} value The value to clone.
|
||||
* @returns {*} The cloned value.
|
||||
*/
|
||||
var cloneDeep = _.partialRight(_.cloneDeep, function(value) {
|
||||
// do not clone non-Object objects
|
||||
@@ -497,9 +497,9 @@
|
||||
* Creates a function from the given arguments string and body.
|
||||
*
|
||||
* @private
|
||||
* @param {String} args The comma separated function arguments.
|
||||
* @param {String} body The function body.
|
||||
* @returns {Function} The new function.
|
||||
* @param {string} args The comma separated function arguments.
|
||||
* @param {string} body The function body.
|
||||
* @returns {function} The new function.
|
||||
*/
|
||||
function createFunction() {
|
||||
// lazy define
|
||||
@@ -523,8 +523,8 @@
|
||||
* Delay the execution of a function based on the benchmark's `delay` property.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} bench The benchmark instance.
|
||||
* @param {Object} fn The function to execute.
|
||||
* @param {object} bench The benchmark instance.
|
||||
* @param {object} fn The function to execute.
|
||||
*/
|
||||
function delay(bench, fn) {
|
||||
bench._timerId = _.delay(fn, bench.delay * 1e3);
|
||||
@@ -545,8 +545,8 @@
|
||||
* Gets the name of the first argument from a function's source.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} fn The function.
|
||||
* @returns {String} The argument name.
|
||||
* @param {function} fn The function.
|
||||
* @returns {string} The argument name.
|
||||
*/
|
||||
function getFirstArgument(fn) {
|
||||
return (!_.has(fn, 'toString') &&
|
||||
@@ -558,8 +558,8 @@
|
||||
* See http://en.wikipedia.org/wiki/Geometric_mean#Relationship_with_arithmetic_mean_of_logarithms.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} sample The sample.
|
||||
* @returns {Number} The geometric mean.
|
||||
* @param {array} sample The sample.
|
||||
* @returns {number} The geometric mean.
|
||||
*/
|
||||
function getGeometricMean(sample) {
|
||||
return pow(Math.E, _.reduce(sample, function(sum, x) {
|
||||
@@ -571,8 +571,8 @@
|
||||
* Computes the arithmetic mean of a sample.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} sample The sample.
|
||||
* @returns {Number} The mean.
|
||||
* @param {array} sample The sample.
|
||||
* @returns {number} The mean.
|
||||
*/
|
||||
function getMean(sample) {
|
||||
return (_.reduce(sample, function(sum, x) {
|
||||
@@ -584,9 +584,9 @@
|
||||
* Gets the source code of a function.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} fn The function.
|
||||
* @param {String} altSource A string used when a function's source code is unretrievable.
|
||||
* @returns {String} The function's source code.
|
||||
* @param {function} fn The function.
|
||||
* @param {string} altSource A string used when a function's source code is unretrievable.
|
||||
* @returns {string} The function's source code.
|
||||
*/
|
||||
function getSource(fn, altSource) {
|
||||
var result = altSource;
|
||||
@@ -609,9 +609,9 @@
|
||||
* Checks if an object is of the specified class.
|
||||
*
|
||||
* @private
|
||||
* @param {Mixed} value The value to check.
|
||||
* @param {String} name The name of the class.
|
||||
* @returns {Boolean} Returns `true` if the value is of the specified class, else `false`.
|
||||
* @param {*} value The value to check.
|
||||
* @param {string} name The name of the class.
|
||||
* @returns {boolean} Returns `true` if the value is of the specified class, else `false`.
|
||||
*/
|
||||
function isClassOf(value, name) {
|
||||
return value != null && toString.call(value) == '[object ' + name + ']';
|
||||
@@ -623,9 +623,9 @@
|
||||
* types of "object", "function", or "unknown".
|
||||
*
|
||||
* @private
|
||||
* @param {Mixed} object The owner of the property.
|
||||
* @param {String} property The property to check.
|
||||
* @returns {Boolean} Returns `true` if the property value is a non-primitive, else `false`.
|
||||
* @param {*} object The owner of the property.
|
||||
* @param {string} property The property to check.
|
||||
* @returns {boolean} Returns `true` if the property value is a non-primitive, else `false`.
|
||||
*/
|
||||
function isHostType(object, property) {
|
||||
if (object == null) {
|
||||
@@ -639,8 +639,8 @@
|
||||
* Checks if a value can be safely coerced to a string.
|
||||
*
|
||||
* @private
|
||||
* @param {Mixed} value The value to check.
|
||||
* @returns {Boolean} Returns `true` if the value can be coerced, else `false`.
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if the value can be coerced, else `false`.
|
||||
*/
|
||||
function isStringable(value) {
|
||||
return _.has(value, 'toString') || isClassOf(value, 'String');
|
||||
@@ -659,8 +659,8 @@
|
||||
* A wrapper around require() to suppress `module missing` errors.
|
||||
*
|
||||
* @private
|
||||
* @param {String} id The module id.
|
||||
* @returns {Mixed} The exported module or `null`.
|
||||
* @param {string} id The module id.
|
||||
* @returns {*} The exported module or `null`.
|
||||
*/
|
||||
function req(id) {
|
||||
try {
|
||||
@@ -673,7 +673,7 @@
|
||||
* Runs a snippet of JavaScript via script injection.
|
||||
*
|
||||
* @private
|
||||
* @param {String} code The code to run.
|
||||
* @param {string} code The code to run.
|
||||
*/
|
||||
function runScript(code) {
|
||||
var anchor = freeDefine ? define.amd : Benchmark,
|
||||
@@ -704,8 +704,8 @@
|
||||
* A helper function for setting options/event handlers.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The benchmark or suite instance.
|
||||
* @param {Object} [options={}] Options object.
|
||||
* @param {object} object The benchmark or suite instance.
|
||||
* @param {object} [options={}] Options object.
|
||||
*/
|
||||
function setOptions(object, options) {
|
||||
options = _.extend({}, object.constructor.options, options);
|
||||
@@ -758,10 +758,10 @@
|
||||
*
|
||||
* @static
|
||||
* @memberOf Benchmark
|
||||
* @param {Array} array The array to iterate over.
|
||||
* @param {Function|String} callback The function/alias called per iteration.
|
||||
* @param {Mixed} thisArg The `this` binding for the callback.
|
||||
* @returns {Array} A new array of values that passed callback filter.
|
||||
* @param {array} array The array to iterate over.
|
||||
* @param {(function|string)} callback The function/alias called per iteration.
|
||||
* @param {*} thisArg The `this` binding for the callback.
|
||||
* @returns {array} A new array of values that passed callback filter.
|
||||
* @example
|
||||
*
|
||||
* // get odd numbers
|
||||
@@ -804,8 +804,8 @@
|
||||
*
|
||||
* @static
|
||||
* @memberOf Benchmark
|
||||
* @param {Number} number The number to convert.
|
||||
* @returns {String} The more readable string representation.
|
||||
* @param {number} number The number to convert.
|
||||
* @returns {string} The more readable string representation.
|
||||
*/
|
||||
function formatNumber(number) {
|
||||
number = String(number).split('.');
|
||||
@@ -818,10 +818,10 @@
|
||||
*
|
||||
* @static
|
||||
* @memberOf Benchmark
|
||||
* @param {Array} benches Array of benchmarks to iterate over.
|
||||
* @param {String|Object} name The name of the method to invoke OR options object.
|
||||
* @param {Mixed} [arg1, arg2, ...] Arguments to invoke the method with.
|
||||
* @returns {Array} A new array of values returned from each method invoked.
|
||||
* @param {array} benches Array of benchmarks to iterate over.
|
||||
* @param {(object|string)} name The name of the method to invoke OR options object.
|
||||
* @param {...*} [arg] Arguments to invoke the method with.
|
||||
* @returns {array} A new array of values returned from each method invoked.
|
||||
* @example
|
||||
*
|
||||
* // invoke `reset` on all benchmarks
|
||||
@@ -999,10 +999,10 @@
|
||||
*
|
||||
* @static
|
||||
* @memberOf Benchmark
|
||||
* @param {Array|Object} object The object to operate on.
|
||||
* @param {String} [separator1=','] The separator used between key-value pairs.
|
||||
* @param {String} [separator2=': '] The separator used between keys and values.
|
||||
* @returns {String} The joined result.
|
||||
* @param {(array|object)} object The object to operate on.
|
||||
* @param {string} [separator1=','] The separator used between key-value pairs.
|
||||
* @param {string} [separator2=': '] The separator used between keys and values.
|
||||
* @returns {string} The joined result.
|
||||
*/
|
||||
function join(object, separator1, separator2) {
|
||||
var result = [],
|
||||
@@ -1023,7 +1023,7 @@
|
||||
*
|
||||
* @name abort
|
||||
* @memberOf Benchmark.Suite
|
||||
* @returns {Object} The suite instance.
|
||||
* @returns {object} The suite instance.
|
||||
*/
|
||||
function abortSuite() {
|
||||
var event,
|
||||
@@ -1052,10 +1052,10 @@
|
||||
* Adds a test to the benchmark suite.
|
||||
*
|
||||
* @memberOf Benchmark.Suite
|
||||
* @param {String} name A name to identify the benchmark.
|
||||
* @param {Function|String} fn The test to benchmark.
|
||||
* @param {Object} [options={}] Options object.
|
||||
* @returns {Object} The benchmark instance.
|
||||
* @param {string} name A name to identify the benchmark.
|
||||
* @param {(function|string)} fn The test to benchmark.
|
||||
* @param {object} [options={}] Options object.
|
||||
* @returns {object} The benchmark instance.
|
||||
* @example
|
||||
*
|
||||
* // basic usage
|
||||
@@ -1101,8 +1101,8 @@
|
||||
*
|
||||
* @name clone
|
||||
* @memberOf Benchmark.Suite
|
||||
* @param {Object} options Options object to overwrite cloned options.
|
||||
* @returns {Object} The new suite instance.
|
||||
* @param {object} options Options object to overwrite cloned options.
|
||||
* @returns {object} The new suite instance.
|
||||
*/
|
||||
function cloneSuite(options) {
|
||||
var suite = this,
|
||||
@@ -1124,8 +1124,8 @@
|
||||
*
|
||||
* @name filter
|
||||
* @memberOf Benchmark.Suite
|
||||
* @param {Function|String} callback The function/alias called per iteration.
|
||||
* @returns {Object} A new suite of benchmarks that passed callback filter.
|
||||
* @param {(function|string)} callback The function/alias called per iteration.
|
||||
* @returns {object} A new suite of benchmarks that passed callback filter.
|
||||
*/
|
||||
function filterSuite(callback) {
|
||||
var suite = this,
|
||||
@@ -1140,7 +1140,7 @@
|
||||
*
|
||||
* @name reset
|
||||
* @memberOf Benchmark.Suite
|
||||
* @returns {Object} The suite instance.
|
||||
* @returns {object} The suite instance.
|
||||
*/
|
||||
function resetSuite() {
|
||||
var event,
|
||||
@@ -1169,8 +1169,8 @@
|
||||
*
|
||||
* @name run
|
||||
* @memberOf Benchmark.Suite
|
||||
* @param {Object} [options={}] Options object.
|
||||
* @returns {Object} The suite instance.
|
||||
* @param {object} [options={}] Options object.
|
||||
* @returns {object} The suite instance.
|
||||
* @example
|
||||
*
|
||||
* // basic usage
|
||||
@@ -1215,8 +1215,8 @@
|
||||
* Executes all registered listeners of the specified event type.
|
||||
*
|
||||
* @memberOf Benchmark, Benchmark.Suite
|
||||
* @param {String|Object} type The event type or object.
|
||||
* @returns {Mixed} Returns the return value of the last listener executed.
|
||||
* @param {(object|string)} type The event type or object.
|
||||
* @returns {*} Returns the return value of the last listener executed.
|
||||
*/
|
||||
function emit(type) {
|
||||
var listeners,
|
||||
@@ -1245,8 +1245,8 @@
|
||||
* to add or remove listeners.
|
||||
*
|
||||
* @memberOf Benchmark, Benchmark.Suite
|
||||
* @param {String} type The event type.
|
||||
* @returns {Array} The listeners array.
|
||||
* @param {string} type The event type.
|
||||
* @returns {array} The listeners array.
|
||||
*/
|
||||
function listeners(type) {
|
||||
var object = this,
|
||||
@@ -1261,9 +1261,9 @@
|
||||
* or unregisters all listeners for all event types.
|
||||
*
|
||||
* @memberOf Benchmark, Benchmark.Suite
|
||||
* @param {String} [type] The event type.
|
||||
* @param {Function} [listener] The function to unregister.
|
||||
* @returns {Object} The benchmark instance.
|
||||
* @param {string} [type] The event type.
|
||||
* @param {function} [listener] The function to unregister.
|
||||
* @returns {object} The benchmark instance.
|
||||
* @example
|
||||
*
|
||||
* // unregister a listener for an event type
|
||||
@@ -1312,9 +1312,9 @@
|
||||
* Registers a listener for the specified event type(s).
|
||||
*
|
||||
* @memberOf Benchmark, Benchmark.Suite
|
||||
* @param {String} type The event type.
|
||||
* @param {Function} listener The function to register.
|
||||
* @returns {Object} The benchmark instance.
|
||||
* @param {string} type The event type.
|
||||
* @param {function} listener The function to register.
|
||||
* @returns {object} The benchmark instance.
|
||||
* @example
|
||||
*
|
||||
* // register a listener for an event type
|
||||
@@ -1342,7 +1342,7 @@
|
||||
* Aborts the benchmark without recording times.
|
||||
*
|
||||
* @memberOf Benchmark
|
||||
* @returns {Object} The benchmark instance.
|
||||
* @returns {object} The benchmark instance.
|
||||
*/
|
||||
function abort() {
|
||||
var event,
|
||||
@@ -1375,8 +1375,8 @@
|
||||
* Creates a new benchmark using the same test and options.
|
||||
*
|
||||
* @memberOf Benchmark
|
||||
* @param {Object} options Options object to overwrite cloned options.
|
||||
* @returns {Object} The new benchmark instance.
|
||||
* @param {object} options Options object to overwrite cloned options.
|
||||
* @returns {object} The new benchmark instance.
|
||||
* @example
|
||||
*
|
||||
* var bizarro = bench.clone({
|
||||
@@ -1405,8 +1405,8 @@
|
||||
* Determines if a benchmark is faster than another.
|
||||
*
|
||||
* @memberOf Benchmark
|
||||
* @param {Object} other The benchmark to compare.
|
||||
* @returns {Number} Returns `-1` if slower, `1` if faster, and `0` if indeterminate.
|
||||
* @param {object} other The benchmark to compare.
|
||||
* @returns {number} Returns `-1` if slower, `1` if faster, and `0` if indeterminate.
|
||||
*/
|
||||
function compare(other) {
|
||||
var critical,
|
||||
@@ -1459,7 +1459,7 @@
|
||||
* Reset properties and abort if running.
|
||||
*
|
||||
* @memberOf Benchmark
|
||||
* @returns {Object} The benchmark instance.
|
||||
* @returns {object} The benchmark instance.
|
||||
*/
|
||||
function reset() {
|
||||
var data,
|
||||
@@ -1530,7 +1530,7 @@
|
||||
*
|
||||
* @name toString
|
||||
* @memberOf Benchmark
|
||||
* @returns {String} A string representation of the benchmark instance.
|
||||
* @returns {string} A string representation of the benchmark instance.
|
||||
*/
|
||||
function toStringBench() {
|
||||
var bench = this,
|
||||
@@ -1557,8 +1557,8 @@
|
||||
* Clocks the time taken to execute a test per cycle (secs).
|
||||
*
|
||||
* @private
|
||||
* @param {Object} bench The benchmark instance.
|
||||
* @returns {Number} The time taken.
|
||||
* @param {object} bench The benchmark instance.
|
||||
* @returns {number} The time taken.
|
||||
*/
|
||||
function clock() {
|
||||
var applet,
|
||||
@@ -1872,8 +1872,8 @@
|
||||
* Computes stats on benchmark results.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} bench The benchmark instance.
|
||||
* @param {Object} options The options object.
|
||||
* @param {object} bench The benchmark instance.
|
||||
* @param {object} options The options object.
|
||||
*/
|
||||
function compute(bench, options) {
|
||||
options || (options = {});
|
||||
@@ -2026,8 +2026,8 @@
|
||||
* Cycles a benchmark until a run `count` can be established.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} clone The cloned benchmark instance.
|
||||
* @param {Object} options The options object.
|
||||
* @param {object} clone The cloned benchmark instance.
|
||||
* @param {object} options The options object.
|
||||
*/
|
||||
function cycle(clone, options) {
|
||||
options || (options = {});
|
||||
@@ -2130,8 +2130,8 @@
|
||||
* Runs the benchmark.
|
||||
*
|
||||
* @memberOf Benchmark
|
||||
* @param {Object} [options={}] Options object.
|
||||
* @returns {Object} The benchmark instance.
|
||||
* @param {object} [options={}] Options object.
|
||||
* @returns {object} The benchmark instance.
|
||||
* @example
|
||||
*
|
||||
* // basic usage
|
||||
@@ -2187,7 +2187,7 @@
|
||||
*
|
||||
* @static
|
||||
* @memberOf Benchmark
|
||||
* @type Object
|
||||
* @type object
|
||||
*/
|
||||
'options': {
|
||||
|
||||
@@ -2196,7 +2196,7 @@
|
||||
* by default.
|
||||
*
|
||||
* @memberOf Benchmark.options
|
||||
* @type Boolean
|
||||
* @type boolean
|
||||
*/
|
||||
'async': false,
|
||||
|
||||
@@ -2204,14 +2204,14 @@
|
||||
* A flag to indicate that the benchmark clock is deferred.
|
||||
*
|
||||
* @memberOf Benchmark.options
|
||||
* @type Boolean
|
||||
* @type boolean
|
||||
*/
|
||||
'defer': false,
|
||||
|
||||
/**
|
||||
* The delay between test cycles (secs).
|
||||
* @memberOf Benchmark.options
|
||||
* @type Number
|
||||
* @type number
|
||||
*/
|
||||
'delay': 0.005,
|
||||
|
||||
@@ -2220,7 +2220,7 @@
|
||||
* (auto-generated if absent).
|
||||
*
|
||||
* @memberOf Benchmark.options
|
||||
* @type String
|
||||
* @type string
|
||||
*/
|
||||
'id': undefined,
|
||||
|
||||
@@ -2228,7 +2228,7 @@
|
||||
* The default number of times to execute a test on a benchmark's first cycle.
|
||||
*
|
||||
* @memberOf Benchmark.options
|
||||
* @type Number
|
||||
* @type number
|
||||
*/
|
||||
'initCount': 1,
|
||||
|
||||
@@ -2238,7 +2238,7 @@
|
||||
* Note: Cycle delays aren't counted toward the maximum time.
|
||||
*
|
||||
* @memberOf Benchmark.options
|
||||
* @type Number
|
||||
* @type number
|
||||
*/
|
||||
'maxTime': 5,
|
||||
|
||||
@@ -2246,7 +2246,7 @@
|
||||
* The minimum sample size required to perform statistical analysis.
|
||||
*
|
||||
* @memberOf Benchmark.options
|
||||
* @type Number
|
||||
* @type number
|
||||
*/
|
||||
'minSamples': 5,
|
||||
|
||||
@@ -2254,7 +2254,7 @@
|
||||
* The time needed to reduce the percent uncertainty of measurement to 1% (secs).
|
||||
*
|
||||
* @memberOf Benchmark.options
|
||||
* @type Number
|
||||
* @type number
|
||||
*/
|
||||
'minTime': 0,
|
||||
|
||||
@@ -2262,7 +2262,7 @@
|
||||
* The name of the benchmark.
|
||||
*
|
||||
* @memberOf Benchmark.options
|
||||
* @type String
|
||||
* @type string
|
||||
*/
|
||||
'name': undefined,
|
||||
|
||||
@@ -2270,7 +2270,7 @@
|
||||
* An event listener called when the benchmark is aborted.
|
||||
*
|
||||
* @memberOf Benchmark.options
|
||||
* @type Function
|
||||
* @type function
|
||||
*/
|
||||
'onAbort': undefined,
|
||||
|
||||
@@ -2278,7 +2278,7 @@
|
||||
* An event listener called when the benchmark completes running.
|
||||
*
|
||||
* @memberOf Benchmark.options
|
||||
* @type Function
|
||||
* @type function
|
||||
*/
|
||||
'onComplete': undefined,
|
||||
|
||||
@@ -2286,7 +2286,7 @@
|
||||
* An event listener called after each run cycle.
|
||||
*
|
||||
* @memberOf Benchmark.options
|
||||
* @type Function
|
||||
* @type function
|
||||
*/
|
||||
'onCycle': undefined,
|
||||
|
||||
@@ -2294,7 +2294,7 @@
|
||||
* An event listener called when a test errors.
|
||||
*
|
||||
* @memberOf Benchmark.options
|
||||
* @type Function
|
||||
* @type function
|
||||
*/
|
||||
'onError': undefined,
|
||||
|
||||
@@ -2302,7 +2302,7 @@
|
||||
* An event listener called when the benchmark is reset.
|
||||
*
|
||||
* @memberOf Benchmark.options
|
||||
* @type Function
|
||||
* @type function
|
||||
*/
|
||||
'onReset': undefined,
|
||||
|
||||
@@ -2310,7 +2310,7 @@
|
||||
* An event listener called when the benchmark starts running.
|
||||
*
|
||||
* @memberOf Benchmark.options
|
||||
* @type Function
|
||||
* @type function
|
||||
*/
|
||||
'onStart': undefined
|
||||
},
|
||||
@@ -2321,7 +2321,7 @@
|
||||
*
|
||||
* @static
|
||||
* @memberOf Benchmark
|
||||
* @type Object
|
||||
* @type object
|
||||
*/
|
||||
'platform': context.platform || req('platform') || ({
|
||||
'description': context.navigator && context.navigator.userAgent || null,
|
||||
@@ -2342,7 +2342,7 @@
|
||||
*
|
||||
* @static
|
||||
* @memberOf Benchmark
|
||||
* @type String
|
||||
* @type string
|
||||
*/
|
||||
'version': '1.0.0'
|
||||
});
|
||||
@@ -2369,7 +2369,7 @@
|
||||
* The number of times a test was executed.
|
||||
*
|
||||
* @memberOf Benchmark
|
||||
* @type Number
|
||||
* @type number
|
||||
*/
|
||||
'count': 0,
|
||||
|
||||
@@ -2377,7 +2377,7 @@
|
||||
* The number of cycles performed while benchmarking.
|
||||
*
|
||||
* @memberOf Benchmark
|
||||
* @type Number
|
||||
* @type number
|
||||
*/
|
||||
'cycles': 0,
|
||||
|
||||
@@ -2385,7 +2385,7 @@
|
||||
* The number of executions per second.
|
||||
*
|
||||
* @memberOf Benchmark
|
||||
* @type Number
|
||||
* @type number
|
||||
*/
|
||||
'hz': 0,
|
||||
|
||||
@@ -2393,7 +2393,7 @@
|
||||
* The compiled test function.
|
||||
*
|
||||
* @memberOf Benchmark
|
||||
* @type Function|String
|
||||
* @type function|...string
|
||||
*/
|
||||
'compiled': undefined,
|
||||
|
||||
@@ -2401,7 +2401,7 @@
|
||||
* The error object if the test failed.
|
||||
*
|
||||
* @memberOf Benchmark
|
||||
* @type Object
|
||||
* @type object
|
||||
*/
|
||||
'error': undefined,
|
||||
|
||||
@@ -2409,7 +2409,7 @@
|
||||
* The test to benchmark.
|
||||
*
|
||||
* @memberOf Benchmark
|
||||
* @type Function|String
|
||||
* @type function|...string
|
||||
*/
|
||||
'fn': undefined,
|
||||
|
||||
@@ -2417,7 +2417,7 @@
|
||||
* A flag to indicate if the benchmark is aborted.
|
||||
*
|
||||
* @memberOf Benchmark
|
||||
* @type Boolean
|
||||
* @type boolean
|
||||
*/
|
||||
'aborted': false,
|
||||
|
||||
@@ -2425,7 +2425,7 @@
|
||||
* A flag to indicate if the benchmark is running.
|
||||
*
|
||||
* @memberOf Benchmark
|
||||
* @type Boolean
|
||||
* @type boolean
|
||||
*/
|
||||
'running': false,
|
||||
|
||||
@@ -2433,7 +2433,7 @@
|
||||
* Compiled into the test and executed immediately **before** the test loop.
|
||||
*
|
||||
* @memberOf Benchmark
|
||||
* @type Function|String
|
||||
* @type function|...string
|
||||
* @example
|
||||
*
|
||||
* // basic usage
|
||||
@@ -2496,7 +2496,7 @@
|
||||
* Compiled into the test and executed immediately **after** the test loop.
|
||||
*
|
||||
* @memberOf Benchmark
|
||||
* @type Function|String
|
||||
* @type function|...string
|
||||
*/
|
||||
'teardown': noop,
|
||||
|
||||
@@ -2504,7 +2504,7 @@
|
||||
* An object of stats including mean, margin or error, and standard deviation.
|
||||
*
|
||||
* @memberOf Benchmark
|
||||
* @type Object
|
||||
* @type object
|
||||
*/
|
||||
'stats': {
|
||||
|
||||
@@ -2512,7 +2512,7 @@
|
||||
* The margin of error.
|
||||
*
|
||||
* @memberOf Benchmark#stats
|
||||
* @type Number
|
||||
* @type number
|
||||
*/
|
||||
'moe': 0,
|
||||
|
||||
@@ -2520,7 +2520,7 @@
|
||||
* The relative margin of error (expressed as a percentage of the mean).
|
||||
*
|
||||
* @memberOf Benchmark#stats
|
||||
* @type Number
|
||||
* @type number
|
||||
*/
|
||||
'rme': 0,
|
||||
|
||||
@@ -2528,7 +2528,7 @@
|
||||
* The standard error of the mean.
|
||||
*
|
||||
* @memberOf Benchmark#stats
|
||||
* @type Number
|
||||
* @type number
|
||||
*/
|
||||
'sem': 0,
|
||||
|
||||
@@ -2536,7 +2536,7 @@
|
||||
* The sample standard deviation.
|
||||
*
|
||||
* @memberOf Benchmark#stats
|
||||
* @type Number
|
||||
* @type number
|
||||
*/
|
||||
'deviation': 0,
|
||||
|
||||
@@ -2544,7 +2544,7 @@
|
||||
* The sample arithmetic mean (secs).
|
||||
*
|
||||
* @memberOf Benchmark#stats
|
||||
* @type Number
|
||||
* @type number
|
||||
*/
|
||||
'mean': 0,
|
||||
|
||||
@@ -2560,7 +2560,7 @@
|
||||
* The sample variance.
|
||||
*
|
||||
* @memberOf Benchmark#stats
|
||||
* @type Number
|
||||
* @type number
|
||||
*/
|
||||
'variance': 0
|
||||
},
|
||||
@@ -2569,7 +2569,7 @@
|
||||
* An object of timing data including cycle, elapsed, period, start, and stop.
|
||||
*
|
||||
* @memberOf Benchmark
|
||||
* @type Object
|
||||
* @type object
|
||||
*/
|
||||
'times': {
|
||||
|
||||
@@ -2577,7 +2577,7 @@
|
||||
* The time taken to complete the last cycle (secs).
|
||||
*
|
||||
* @memberOf Benchmark#times
|
||||
* @type Number
|
||||
* @type number
|
||||
*/
|
||||
'cycle': 0,
|
||||
|
||||
@@ -2585,7 +2585,7 @@
|
||||
* The time taken to complete the benchmark (secs).
|
||||
*
|
||||
* @memberOf Benchmark#times
|
||||
* @type Number
|
||||
* @type number
|
||||
*/
|
||||
'elapsed': 0,
|
||||
|
||||
@@ -2593,7 +2593,7 @@
|
||||
* The time taken to execute the test once (secs).
|
||||
*
|
||||
* @memberOf Benchmark#times
|
||||
* @type Number
|
||||
* @type number
|
||||
*/
|
||||
'period': 0,
|
||||
|
||||
@@ -2601,7 +2601,7 @@
|
||||
* A timestamp of when the benchmark started (ms).
|
||||
*
|
||||
* @memberOf Benchmark#times
|
||||
* @type Number
|
||||
* @type number
|
||||
*/
|
||||
'timeStamp': 0
|
||||
}
|
||||
@@ -2628,7 +2628,7 @@
|
||||
* The deferred benchmark instance.
|
||||
*
|
||||
* @memberOf Benchmark.Deferred
|
||||
* @type Object
|
||||
* @type object
|
||||
*/
|
||||
'benchmark': null,
|
||||
|
||||
@@ -2636,7 +2636,7 @@
|
||||
* The number of deferred cycles performed while benchmarking.
|
||||
*
|
||||
* @memberOf Benchmark.Deferred
|
||||
* @type Number
|
||||
* @type number
|
||||
*/
|
||||
'cycles': 0,
|
||||
|
||||
@@ -2644,7 +2644,7 @@
|
||||
* The time taken to complete the deferred benchmark (secs).
|
||||
*
|
||||
* @memberOf Benchmark.Deferred
|
||||
* @type Number
|
||||
* @type number
|
||||
*/
|
||||
'elapsed': 0,
|
||||
|
||||
@@ -2652,7 +2652,7 @@
|
||||
* A timestamp of when the deferred benchmark started (ms).
|
||||
*
|
||||
* @memberOf Benchmark.Deferred
|
||||
* @type Number
|
||||
* @type number
|
||||
*/
|
||||
'timeStamp': 0
|
||||
});
|
||||
@@ -2669,7 +2669,7 @@
|
||||
* A flag to indicate if the emitters listener iteration is aborted.
|
||||
*
|
||||
* @memberOf Benchmark.Event
|
||||
* @type Boolean
|
||||
* @type boolean
|
||||
*/
|
||||
'aborted': false,
|
||||
|
||||
@@ -2677,7 +2677,7 @@
|
||||
* A flag to indicate if the default action is cancelled.
|
||||
*
|
||||
* @memberOf Benchmark.Event
|
||||
* @type Boolean
|
||||
* @type boolean
|
||||
*/
|
||||
'cancelled': false,
|
||||
|
||||
@@ -2685,7 +2685,7 @@
|
||||
* The object whose listeners are currently being processed.
|
||||
*
|
||||
* @memberOf Benchmark.Event
|
||||
* @type Object
|
||||
* @type object
|
||||
*/
|
||||
'currentTarget': undefined,
|
||||
|
||||
@@ -2701,7 +2701,7 @@
|
||||
* The object to which the event was originally emitted.
|
||||
*
|
||||
* @memberOf Benchmark.Event
|
||||
* @type Object
|
||||
* @type object
|
||||
*/
|
||||
'target': undefined,
|
||||
|
||||
@@ -2709,7 +2709,7 @@
|
||||
* A timestamp of when the event was created (ms).
|
||||
*
|
||||
* @memberOf Benchmark.Event
|
||||
* @type Number
|
||||
* @type number
|
||||
*/
|
||||
'timeStamp': 0,
|
||||
|
||||
@@ -2717,7 +2717,7 @@
|
||||
* The event type.
|
||||
*
|
||||
* @memberOf Benchmark.Event
|
||||
* @type String
|
||||
* @type string
|
||||
*/
|
||||
'type': ''
|
||||
});
|
||||
@@ -2729,7 +2729,7 @@
|
||||
*
|
||||
* @static
|
||||
* @memberOf Benchmark.Suite
|
||||
* @type Object
|
||||
* @type object
|
||||
*/
|
||||
Suite.options = {
|
||||
|
||||
@@ -2737,7 +2737,7 @@
|
||||
* The name of the suite.
|
||||
*
|
||||
* @memberOf Benchmark.Suite.options
|
||||
* @type String
|
||||
* @type string
|
||||
*/
|
||||
'name': undefined
|
||||
};
|
||||
@@ -2750,7 +2750,7 @@
|
||||
* The number of benchmarks in the suite.
|
||||
*
|
||||
* @memberOf Benchmark.Suite
|
||||
* @type Number
|
||||
* @type number
|
||||
*/
|
||||
'length': 0,
|
||||
|
||||
@@ -2758,7 +2758,7 @@
|
||||
* A flag to indicate if the suite is aborted.
|
||||
*
|
||||
* @memberOf Benchmark.Suite
|
||||
* @type Boolean
|
||||
* @type boolean
|
||||
*/
|
||||
'aborted': false,
|
||||
|
||||
@@ -2766,7 +2766,7 @@
|
||||
* A flag to indicate if the suite is running.
|
||||
*
|
||||
* @memberOf Benchmark.Suite
|
||||
* @type Boolean
|
||||
* @type boolean
|
||||
*/
|
||||
'running': false
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user