Comparing version 0.1.342 to 0.1.343
@@ -14,5 +14,7 @@ /*! | ||
/** Detect Adobe AIR environment */ | ||
IN_AIR = isClassOf(window.runtime, 'ScriptBridgingProxyObject'), | ||
/** Detect Java environment */ | ||
IN_JAVA = isHostType(window, 'java') && | ||
!isHostType(window, 'netscape'), | ||
IN_JAVA = isClassOf(window.java, 'JavaPackage'), | ||
@@ -22,3 +24,3 @@ /** Used to integrity check compiled tests */ | ||
/** Used to skip Benchmark's initializations */ | ||
/** Used to skip initialization of the Benchmark constructor */ | ||
HEADLESS = function() { }, | ||
@@ -632,3 +634,3 @@ | ||
* @param {String|Object} name The name of the method to invoke OR options object. | ||
* @param {Mixed} [, arg1, arg2, ...] Arguments to invoke the method with. | ||
* @param {Mixed} [arg1, arg2, ...] Arguments to invoke the method with. | ||
* @returns {Array} A new array of values returned from each method invoked. | ||
@@ -800,3 +802,3 @@ * @example | ||
* @param {Mixed} object The owner of the property. | ||
* @param {String} property The property name to check. | ||
* @param {String} property The property to check. | ||
* @returns {Boolean} Returns true if the property value is a non-primitive, else false. | ||
@@ -1186,3 +1188,3 @@ */ | ||
tstat = (a.mean - b.mean) / sqrt(pooled * (1 / a.size + 1 / b.size)), | ||
near = abs(1 - a.mean / b.mean) < 0.05 && a.RME < 3 && b.RME < 3; | ||
near = abs(1 - a.mean / b.mean) < 0.055 && a.RME < 3 && b.RME < 3; | ||
@@ -1238,2 +1240,3 @@ // check if the means aren't close and the t-statistic is significant | ||
* @member Benchmark | ||
* @returns {String} A string representation of the benchmark instance. | ||
*/ | ||
@@ -1244,4 +1247,3 @@ function toString() { | ||
error = me.error, | ||
pm = IN_JAVA ? '\xf1' : '\xb1', | ||
x = IN_JAVA ? 'x' : '\xd7', | ||
pm = IN_JAVA ? '+/-' : '\xb1', | ||
result = me.name || me.id || ('<Test #' + me.fn.uid + '>'); | ||
@@ -1252,3 +1254,3 @@ | ||
} else { | ||
result += ' ' + x + ' ' + formatNumber(me.hz) + ' ' + pm + | ||
result += ' x ' + formatNumber(me.hz) + ' ' + pm + | ||
me.stats.RME.toFixed(2) + '% (' + cycles + ' cycle' + (cycles == 1 ? '' : 's') + ')'; | ||
@@ -1481,4 +1483,4 @@ } | ||
var me = this, | ||
alpha = IN_JAVA ? '\xe0' : '\u03b1', | ||
beta = IN_JAVA ? '\xe1' : '\u03b2', | ||
alpha = IN_JAVA ? 'a' : '\u03b1', | ||
beta = IN_JAVA ? 'b' : '\u03b2', | ||
description = [], | ||
@@ -1538,3 +1540,3 @@ doc = window.document || {}, | ||
// detect non Opera versions | ||
version = reduce(['version', name, 'Firefox', 'NetFront'], function(version, guess) { | ||
version = reduce(['version', name, 'AdobeAIR', 'Firefox', 'NetFront'], function(version, guess) { | ||
return version || (version = (RegExp(guess + '(?:-[\\d.]+/|[ /-])([^ ();/-]*)', 'i').exec(ua) || 0)[1]) || null; | ||
@@ -1574,2 +1576,7 @@ }, version); | ||
} | ||
// detect Adobe AIR | ||
else if (IN_AIR) { | ||
name = 'Adobe AIR'; | ||
os = runtime.flash.system.Capabilities.os; | ||
} | ||
// detect PhantomJS | ||
@@ -1580,5 +1587,10 @@ else if (isClassOf(window.phantom, 'RuntimeObject')) { | ||
} | ||
// detect non Safari WebKit based browsers | ||
else if ((data = product || os) && (!name || name == 'Safari' && !/(?:^iP|Linux|Mac OS|Windows)/.test(data))) { | ||
name = /[a-z]+/i.exec(data) + ' Browser'; | ||
// detect non Firefox Gecko/Safari WebKit based browsers | ||
else if (ua && (data = /^(?:Firefox|Safari|null)/.exec(name))) { | ||
if (name && !product && /[/,]/.test(ua.slice(ua.indexOf(data + '/') + String(data).length + 1))) { | ||
name = null; | ||
} | ||
if ((data = product || os) && !/^(?:iP|Lin|Mac|Win)/.test(data)) { | ||
name = /[a-z]+/i.exec(data) + ' Browser'; | ||
} | ||
} | ||
@@ -1626,3 +1638,3 @@ // detect IE compatibility mode | ||
// add layout engine | ||
if (layout && /Browser|Lunascape|Maxthon|Phantom|Sleipnir/.test(name)) { | ||
if (layout && /Adobe|Browser|Lunascape|Maxthon|Phantom|Sleipnir/.test(name)) { | ||
description.push(layout); | ||
@@ -1651,3 +1663,3 @@ } | ||
'name': name && description.unshift(name) && name, | ||
'os': os && description.push((product ? '' : 'on ') + os) && os, | ||
'os': name && os && description.push((product ? '' : 'on ') + os) && os, | ||
'product': product, | ||
@@ -1669,3 +1681,3 @@ 'description': description.length ? description.join(' ') : ua, | ||
*/ | ||
'version': '0.1.342', | ||
'version': '0.1.343', | ||
@@ -2011,3 +2023,3 @@ // generic Array#forEach | ||
* @param {String|Object} name The name of the method to invoke OR options object. | ||
* @param {Mixed} [, arg1, arg2, ...] Arguments to invoke the method with. | ||
* @param {Mixed} [arg1, arg2, ...] Arguments to invoke the method with. | ||
* @returns {Array} A new array of values returned from each method invoked. | ||
@@ -2114,2 +2126,7 @@ */ | ||
// trigger clock's lazy define early to avoid a security error | ||
if (IN_AIR) { | ||
clock({ 'fn': noop, 'count': 1 }); | ||
} | ||
// feature detect | ||
@@ -2116,0 +2133,0 @@ HAS_TIMEOUT_API = isHostType(window, 'setTimeout') && |
@@ -5,90 +5,90 @@ # Benchmark.js API documentation | ||
* [`Benchmark`](#Benchmark) | ||
* [`Benchmark.platform`](#static-platform) | ||
* [`Benchmark.version`](#static-version) | ||
* [`Benchmark.each`](#static-each) | ||
* [`Benchmark.extend`](#static-extend) | ||
* [`Benchmark.filter`](#static-filter) | ||
* [`Benchmark.forIn`](#static-forIn) | ||
* [`Benchmark.formatNumber`](#static-formatNumber) | ||
* [`Benchmark.hasKey`](#static-hasKey) | ||
* [`Benchmark.indexOf`](#static-indexOf) | ||
* [`Benchmark.interpolate`](#static-interpolate) | ||
* [`Benchmark.invoke`](#static-invoke) | ||
* [`Benchmark.isArray`](#static-isArray) | ||
* [`Benchmark.isClassOf`](#static-isClassOf) | ||
* [`Benchmark.isHostType`](#static-isHostType) | ||
* [`Benchmark.join`](#static-join) | ||
* [`Benchmark.map`](#static-map) | ||
* [`Benchmark.noop`](#static-noop) | ||
* [`Benchmark.pluck`](#static-pluck) | ||
* [`Benchmark.reduce`](#static-reduce) | ||
* [`Benchmark.trim`](#static-trim) | ||
* [`Benchmark.platform`](#Benchmark.platform) | ||
* [`Benchmark.version`](#Benchmark.version) | ||
* [`Benchmark.each`](#Benchmark.each) | ||
* [`Benchmark.extend`](#Benchmark.extend) | ||
* [`Benchmark.filter`](#Benchmark.filter) | ||
* [`Benchmark.forIn`](#Benchmark.forIn) | ||
* [`Benchmark.formatNumber`](#Benchmark.formatNumber) | ||
* [`Benchmark.hasKey`](#Benchmark.hasKey) | ||
* [`Benchmark.indexOf`](#Benchmark.indexOf) | ||
* [`Benchmark.interpolate`](#Benchmark.interpolate) | ||
* [`Benchmark.invoke`](#Benchmark.invoke) | ||
* [`Benchmark.isArray`](#Benchmark.isArray) | ||
* [`Benchmark.isClassOf`](#Benchmark.isClassOf) | ||
* [`Benchmark.isHostType`](#Benchmark.isHostType) | ||
* [`Benchmark.join`](#Benchmark.join) | ||
* [`Benchmark.map`](#Benchmark.map) | ||
* [`Benchmark.noop`](#Benchmark.noop) | ||
* [`Benchmark.pluck`](#Benchmark.pluck) | ||
* [`Benchmark.reduce`](#Benchmark.reduce) | ||
* [`Benchmark.trim`](#Benchmark.trim) | ||
## `Benchmark.prototype` | ||
* [`Benchmark#CYCLE_DELAY`](#CYCLE_DELAY) | ||
* [`Benchmark#DEFAULT_ASYNC`](#DEFAULT_ASYNC) | ||
* [`Benchmark#INIT_RUN_COUNT`](#INIT_RUN_COUNT) | ||
* [`Benchmark#MAX_TIME_ELAPSED`](#MAX_TIME_ELAPSED) | ||
* [`Benchmark#ME`](#ME) | ||
* [`Benchmark#MIN_SAMPLE_SIZE`](#MIN_SAMPLE_SIZE) | ||
* [`Benchmark#MIN_TIME`](#MIN_TIME) | ||
* [`Benchmark#RME`](#RME) | ||
* [`Benchmark#SEM`](#SEM) | ||
* [`Benchmark#aborted`](#aborted) | ||
* [`Benchmark#count`](#count) | ||
* [`Benchmark#created`](#created) | ||
* [`Benchmark#cycle`](#cycle) | ||
* [`Benchmark#cycles`](#cycles) | ||
* [`Benchmark#deviation`](#deviation) | ||
* [`Benchmark#elapsed`](#elapsed) | ||
* [`Benchmark#error`](#error) | ||
* [`Benchmark#hz`](#hz) | ||
* [`Benchmark#mean`](#mean) | ||
* [`Benchmark#period`](#period) | ||
* [`Benchmark#running`](#running) | ||
* [`Benchmark#size`](#size) | ||
* [`Benchmark#start`](#start) | ||
* [`Benchmark#stats`](#stats) | ||
* [`Benchmark#stop`](#stop) | ||
* [`Benchmark#times`](#times) | ||
* [`Benchmark#variance`](#variance) | ||
* [`Benchmark#abort`](#abort) | ||
* [`Benchmark#addListener`](#addListener) | ||
* [`Benchmark#clone`](#clone) | ||
* [`Benchmark#compare`](#compare) | ||
* [`Benchmark#emit`](#emit) | ||
* [`Benchmark#on`](#on) | ||
* [`Benchmark#removeAllListeners`](#removeAllListeners) | ||
* [`Benchmark#removeListener`](#removeListener) | ||
* [`Benchmark#reset`](#reset) | ||
* [`Benchmark#run`](#run) | ||
* [`Benchmark#toString`](#toString) | ||
* [`Benchmark#CYCLE_DELAY`](#Benchmark:CYCLE_DELAY) | ||
* [`Benchmark#DEFAULT_ASYNC`](#Benchmark:DEFAULT_ASYNC) | ||
* [`Benchmark#INIT_RUN_COUNT`](#Benchmark:INIT_RUN_COUNT) | ||
* [`Benchmark#MAX_TIME_ELAPSED`](#Benchmark:MAX_TIME_ELAPSED) | ||
* [`Benchmark#MIN_SAMPLE_SIZE`](#Benchmark:MIN_SAMPLE_SIZE) | ||
* [`Benchmark#MIN_TIME`](#Benchmark:MIN_TIME) | ||
* [`Benchmark#aborted`](#Benchmark:aborted) | ||
* [`Benchmark#count`](#Benchmark:count) | ||
* [`Benchmark#created`](#Benchmark:created) | ||
* [`Benchmark#cycles`](#Benchmark:cycles) | ||
* [`Benchmark#error`](#Benchmark:error) | ||
* [`Benchmark#hz`](#Benchmark:hz) | ||
* [`Benchmark#running`](#Benchmark:running) | ||
* [`Benchmark#abort`](#Benchmark:abort) | ||
* [`Benchmark#addListener`](#Benchmark:addListener) | ||
* [`Benchmark#clone`](#Benchmark:clone) | ||
* [`Benchmark#compare`](#Benchmark:compare) | ||
* [`Benchmark#emit`](#Benchmark:emit) | ||
* [`Benchmark#on`](#Benchmark:on) | ||
* [`Benchmark#removeAllListeners`](#Benchmark:removeAllListeners) | ||
* [`Benchmark#removeListener`](#Benchmark:removeListener) | ||
* [`Benchmark#reset`](#Benchmark:reset) | ||
* [`Benchmark#run`](#Benchmark:run) | ||
* [`Benchmark#toString`](#Benchmark:toString) | ||
* [`Benchmark#stats`](#Benchmark:stats) | ||
* [`Benchmark#stats.ME`](#Benchmark:stats.ME) | ||
* [`Benchmark#stats.RME`](#Benchmark:stats.RME) | ||
* [`Benchmark#stats.SEM`](#Benchmark:stats.SEM) | ||
* [`Benchmark#stats.deviation`](#Benchmark:stats.deviation) | ||
* [`Benchmark#stats.mean`](#Benchmark:stats.mean) | ||
* [`Benchmark#stats.size`](#Benchmark:stats.size) | ||
* [`Benchmark#stats.variance`](#Benchmark:stats.variance) | ||
* [`Benchmark#times`](#Benchmark:times) | ||
* [`Benchmark#times.cycle`](#Benchmark:times.cycle) | ||
* [`Benchmark#times.elapsed`](#Benchmark:times.elapsed) | ||
* [`Benchmark#times.period`](#Benchmark:times.period) | ||
* [`Benchmark#times.start`](#Benchmark:times.start) | ||
* [`Benchmark#times.stop`](#Benchmark:times.stop) | ||
## `Benchmark.Suite` | ||
* [`Benchmark.Suite`](#Suite) | ||
* [`Benchmark.Suite`](#Benchmark.Suite) | ||
## `Benchmark.Suite.prototype` | ||
* [`Benchmark.Suite#aborted`](#aborted) | ||
* [`Benchmark.Suite#length`](#length) | ||
* [`Benchmark.Suite#running`](#running) | ||
* [`Benchmark.Suite#abort`](#abort) | ||
* [`Benchmark.Suite#add`](#add) | ||
* [`Benchmark.Suite#addListener`](#addListener) | ||
* [`Benchmark.Suite#clone`](#clone) | ||
* [`Benchmark.Suite#each`](#each) | ||
* [`Benchmark.Suite#emit`](#emit) | ||
* [`Benchmark.Suite#filter`](#filter) | ||
* [`Benchmark.Suite#indexOf`](#indexOf) | ||
* [`Benchmark.Suite#invoke`](#invoke) | ||
* [`Benchmark.Suite#map`](#map) | ||
* [`Benchmark.Suite#on`](#on) | ||
* [`Benchmark.Suite#pluck`](#pluck) | ||
* [`Benchmark.Suite#reduce`](#reduce) | ||
* [`Benchmark.Suite#removeAllListeners`](#removeAllListeners) | ||
* [`Benchmark.Suite#removeListener`](#removeListener) | ||
* [`Benchmark.Suite#reset`](#reset) | ||
* [`Benchmark.Suite#run`](#run) | ||
* [`Benchmark.Suite#aborted`](#Benchmark.Suite:aborted) | ||
* [`Benchmark.Suite#length`](#Benchmark.Suite:length) | ||
* [`Benchmark.Suite#running`](#Benchmark.Suite:running) | ||
* [`Benchmark.Suite#abort`](#Benchmark.Suite:abort) | ||
* [`Benchmark.Suite#add`](#Benchmark.Suite:add) | ||
* [`Benchmark.Suite#addListener`](#Benchmark.Suite:addListener) | ||
* [`Benchmark.Suite#clone`](#Benchmark.Suite:clone) | ||
* [`Benchmark.Suite#each`](#Benchmark.Suite:each) | ||
* [`Benchmark.Suite#emit`](#Benchmark.Suite:emit) | ||
* [`Benchmark.Suite#filter`](#Benchmark.Suite:filter) | ||
* [`Benchmark.Suite#indexOf`](#Benchmark.Suite:indexOf) | ||
* [`Benchmark.Suite#invoke`](#Benchmark.Suite:invoke) | ||
* [`Benchmark.Suite#map`](#Benchmark.Suite:map) | ||
* [`Benchmark.Suite#on`](#Benchmark.Suite:on) | ||
* [`Benchmark.Suite#pluck`](#Benchmark.Suite:pluck) | ||
* [`Benchmark.Suite#reduce`](#Benchmark.Suite:reduce) | ||
* [`Benchmark.Suite#removeAllListeners`](#Benchmark.Suite:removeAllListeners) | ||
* [`Benchmark.Suite#removeListener`](#Benchmark.Suite:removeListener) | ||
* [`Benchmark.Suite#reset`](#Benchmark.Suite:reset) | ||
* [`Benchmark.Suite#run`](#Benchmark.Suite:run) | ||
## `Benchmark` | ||
### <a name="Benchmark" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L117" title="View in source">`Benchmark(name, fn, options)`</a> | ||
### <a name="Benchmark" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L119" title="View in source">`Benchmark(name, fn [, options={}])`</a> | ||
Benchmark constructor. | ||
@@ -140,11 +140,11 @@ [▲][1] | ||
## <a name="static-platform" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1471" title="View in source">`Benchmark.platform`</a> | ||
### <a name="Benchmark.platform" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1473" title="View in source">`Benchmark.platform`</a> | ||
*(Boolean)*: Platform object containing browser name, version, and operating system. | ||
[▲][1] | ||
## <a name="static-version" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1655" title="View in source">`Benchmark.version`</a> | ||
### <a name="Benchmark.version" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1667" title="View in source">`Benchmark.version`</a> | ||
*(String)*: The version number. | ||
[▲][1] | ||
## <a name="static-each" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L469" title="View in source">`Benchmark.each(array, callback)`</a> | ||
### <a name="Benchmark.each" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L471" title="View in source">`Benchmark.each(array, callback)`</a> | ||
A generic bare-bones `Array#forEach` solution. | ||
@@ -161,3 +161,3 @@ Callbacks may terminate the loop by explicitly returning `false`. | ||
## <a name="static-extend" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L489" title="View in source">`Benchmark.extend(destination, source)`</a> | ||
### <a name="Benchmark.extend" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L491" title="View in source">`Benchmark.extend(destination [, source={}])`</a> | ||
Copies own/inherited properties of a source object to the destination object. | ||
@@ -173,3 +173,3 @@ [▲][1] | ||
## <a name="static-filter" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L520" title="View in source">`Benchmark.filter(array, callback)`</a> | ||
### <a name="Benchmark.filter" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L522" title="View in source">`Benchmark.filter(array, callback)`</a> | ||
A generic bare-bones `Array#filter` solution. | ||
@@ -200,3 +200,3 @@ [▲][1] | ||
## <a name="static-forIn" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L550" title="View in source">`Benchmark.forIn(object, callback)`</a> | ||
### <a name="Benchmark.forIn" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L552" title="View in source">`Benchmark.forIn(object, callback)`</a> | ||
A generic bare-bones for-in solution for an object's own properties. | ||
@@ -212,3 +212,3 @@ [▲][1] | ||
## <a name="static-formatNumber" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L566" title="View in source">`Benchmark.formatNumber(number)`</a> | ||
### <a name="Benchmark.formatNumber" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L568" title="View in source">`Benchmark.formatNumber(number)`</a> | ||
Converts a number to a more readable comma-separated string representation. | ||
@@ -223,3 +223,3 @@ [▲][1] | ||
## <a name="static-hasKey" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L584" title="View in source">`Benchmark.hasKey(object, key)`</a> | ||
### <a name="Benchmark.hasKey" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L586" title="View in source">`Benchmark.hasKey(object, key)`</a> | ||
Checks if an object has the specified key as a direct property. | ||
@@ -235,3 +235,3 @@ [▲][1] | ||
## <a name="static-indexOf" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L613" title="View in source">`Benchmark.indexOf(array, value)`</a> | ||
### <a name="Benchmark.indexOf" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L615" title="View in source">`Benchmark.indexOf(array, value)`</a> | ||
A generic bare-bones `Array#indexOf` solution. | ||
@@ -247,3 +247,3 @@ [▲][1] | ||
## <a name="static-interpolate" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L759" title="View in source">`Benchmark.interpolate(string, object)`</a> | ||
### <a name="Benchmark.interpolate" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L761" title="View in source">`Benchmark.interpolate(string, object)`</a> | ||
Modify a string by replacing named tokens with matching object property values. | ||
@@ -265,3 +265,3 @@ [▲][1] | ||
## <a name="static-invoke" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L662" title="View in source">`Benchmark.invoke(benches, name)`</a> | ||
### <a name="Benchmark.invoke" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L664" title="View in source">`Benchmark.invoke(benches, name [, arg1, arg2, ...])`</a> | ||
Invokes a method on all items in an array. | ||
@@ -273,3 +273,3 @@ [▲][1] | ||
2. `name` *(String|Object)*: The name of the method to invoke OR options object. | ||
3. `[, arg1, arg2, ...]` *(Mixed)*: Arguments to invoke the method with. | ||
3. `[arg1, arg2, ...]` *(Mixed)*: Arguments to invoke the method with. | ||
@@ -308,3 +308,3 @@ #### Returns | ||
## <a name="static-isArray" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L774" title="View in source">`Benchmark.isArray(value)`</a> | ||
### <a name="Benchmark.isArray" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L776" title="View in source">`Benchmark.isArray(value)`</a> | ||
Determines if the given value is an array. | ||
@@ -319,3 +319,3 @@ [▲][1] | ||
## <a name="static-isClassOf" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L786" title="View in source">`Benchmark.isClassOf(object, name)`</a> | ||
### <a name="Benchmark.isClassOf" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L788" title="View in source">`Benchmark.isClassOf(object, name)`</a> | ||
Checks if an object is of the specified class. | ||
@@ -331,3 +331,3 @@ [▲][1] | ||
## <a name="static-isHostType" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L800" title="View in source">`Benchmark.isHostType(object, property)`</a> | ||
### <a name="Benchmark.isHostType" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L802" title="View in source">`Benchmark.isHostType(object, property)`</a> | ||
Host objects can return type values that are different from their actual | ||
@@ -340,3 +340,3 @@ data type. The objects we are concerned with usually return non-primitive | ||
1. `object` *(Mixed)*: The owner of the property. | ||
2. `property` *(String)*: The property name to check. | ||
2. `property` *(String)*: The property to check. | ||
@@ -346,3 +346,3 @@ #### Returns | ||
## <a name="static-join" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L814" title="View in source">`Benchmark.join(object, separator1, separator2)`</a> | ||
### <a name="Benchmark.join" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L816" title="View in source">`Benchmark.join(object [, separator1=',', separator2=': '])`</a> | ||
Creates a string of joined array values or object key-value pairs. | ||
@@ -359,3 +359,3 @@ [▲][1] | ||
## <a name="static-map" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L836" title="View in source">`Benchmark.map(array, callback)`</a> | ||
### <a name="Benchmark.map" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L838" title="View in source">`Benchmark.map(array, callback)`</a> | ||
A generic bare-bones `Array#map` solution. | ||
@@ -371,7 +371,7 @@ [▲][1] | ||
## <a name="static-noop" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L848" title="View in source">`Benchmark.noop()`</a> | ||
### <a name="Benchmark.noop" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L850" title="View in source">`Benchmark.noop`</a> | ||
A no-operation function. | ||
[▲][1] | ||
## <a name="static-pluck" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L860" title="View in source">`Benchmark.pluck(array, property)`</a> | ||
### <a name="Benchmark.pluck" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L862" title="View in source">`Benchmark.pluck(array, property)`</a> | ||
Retrieves the value of a specified property from all items in an array. | ||
@@ -387,3 +387,3 @@ [▲][1] | ||
## <a name="static-reduce" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L875" title="View in source">`Benchmark.reduce(array, callback, accumulator)`</a> | ||
### <a name="Benchmark.reduce" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L877" title="View in source">`Benchmark.reduce(array, callback, accumulator)`</a> | ||
A generic bare-bones `Array#reduce` solution. | ||
@@ -400,3 +400,3 @@ [▲][1] | ||
## <a name="static-trim" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L889" title="View in source">`Benchmark.trim(string)`</a> | ||
### <a name="Benchmark.trim" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L891" title="View in source">`Benchmark.trim(string)`</a> | ||
A generic bare-bones `String#trim` solution. | ||
@@ -413,111 +413,55 @@ [▲][1] | ||
## `Benchmark.prototype` | ||
## <a name="CYCLE_DELAY" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1724" title="View in source">`Benchmark#CYCLE_DELAY`</a> | ||
### <a name="Benchmark:CYCLE_DELAY" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1736" title="View in source">`Benchmark#CYCLE_DELAY`</a> | ||
*(Number)*: The delay between test cycles *(secs)*. | ||
[▲][1] | ||
## <a name="DEFAULT_ASYNC" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1731" title="View in source">`Benchmark#DEFAULT_ASYNC`</a> | ||
### <a name="Benchmark:DEFAULT_ASYNC" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1743" title="View in source">`Benchmark#DEFAULT_ASYNC`</a> | ||
*(Boolean)*: A flag to indicate methods will run asynchronously by default. | ||
[▲][1] | ||
## <a name="INIT_RUN_COUNT" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1738" title="View in source">`Benchmark#INIT_RUN_COUNT`</a> | ||
### <a name="Benchmark:INIT_RUN_COUNT" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1750" title="View in source">`Benchmark#INIT_RUN_COUNT`</a> | ||
*(Number)*: The default number of times to execute a test on a benchmark's first cycle. | ||
[▲][1] | ||
## <a name="MAX_TIME_ELAPSED" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1745" title="View in source">`Benchmark#MAX_TIME_ELAPSED`</a> | ||
### <a name="Benchmark:MAX_TIME_ELAPSED" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1757" title="View in source">`Benchmark#MAX_TIME_ELAPSED`</a> | ||
*(Number)*: The maximum time a benchmark is allowed to run before finishing *(secs)*. | ||
[▲][1] | ||
## <a name="ME" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1828" title="View in source">`Benchmark#ME`</a> | ||
*(Number)*: The margin of error. | ||
[▲][1] | ||
## <a name="MIN_SAMPLE_SIZE" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1752" title="View in source">`Benchmark#MIN_SAMPLE_SIZE`</a> | ||
### <a name="Benchmark:MIN_SAMPLE_SIZE" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1764" title="View in source">`Benchmark#MIN_SAMPLE_SIZE`</a> | ||
*(Number)*: The minimum sample size required to perform statistical analysis. | ||
[▲][1] | ||
## <a name="MIN_TIME" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1759" title="View in source">`Benchmark#MIN_TIME`</a> | ||
### <a name="Benchmark:MIN_TIME" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1771" title="View in source">`Benchmark#MIN_TIME`</a> | ||
*(Number)*: The time needed to reduce the percent uncertainty of measurement to `1`% *(secs)*. | ||
[▲][1] | ||
## <a name="RME" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1835" title="View in source">`Benchmark#RME`</a> | ||
*(Number)*: The relative margin of error *(expressed as a percentage of the mean)*. | ||
[▲][1] | ||
## <a name="SEM" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1842" title="View in source">`Benchmark#SEM`</a> | ||
*(Number)*: The standard error of the mean. | ||
[▲][1] | ||
## <a name="aborted" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1801" title="View in source">`Benchmark#aborted`</a> | ||
### <a name="Benchmark:aborted" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1813" title="View in source">`Benchmark#aborted`</a> | ||
*(Boolean)*: A flag to indicate if the benchmark is aborted. | ||
[▲][1] | ||
## <a name="count" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1766" title="View in source">`Benchmark#count`</a> | ||
### <a name="Benchmark:count" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1778" title="View in source">`Benchmark#count`</a> | ||
*(Number)*: The number of times a test was executed. | ||
[▲][1] | ||
## <a name="created" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1773" title="View in source">`Benchmark#created`</a> | ||
### <a name="Benchmark:created" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1785" title="View in source">`Benchmark#created`</a> | ||
*(Number)*: A timestamp of when the benchmark was created. | ||
[▲][1] | ||
## <a name="cycle" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1885" title="View in source">`Benchmark#cycle`</a> | ||
*(Number)*: The time taken to complete the last cycle *(secs)* | ||
[▲][1] | ||
## <a name="cycles" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1780" title="View in source">`Benchmark#cycles`</a> | ||
### <a name="Benchmark:cycles" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1792" title="View in source">`Benchmark#cycles`</a> | ||
*(Number)*: The number of cycles performed while benchmarking. | ||
[▲][1] | ||
## <a name="deviation" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1849" title="View in source">`Benchmark#deviation`</a> | ||
*(Number)*: The sample standard deviation. | ||
[▲][1] | ||
## <a name="elapsed" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1892" title="View in source">`Benchmark#elapsed`</a> | ||
*(Number)*: The time taken to complete the benchmark *(secs)*. | ||
[▲][1] | ||
## <a name="error" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1787" title="View in source">`Benchmark#error`</a> | ||
### <a name="Benchmark:error" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1799" title="View in source">`Benchmark#error`</a> | ||
*(Object|Null)*: The error object if the test failed. | ||
[▲][1] | ||
## <a name="hz" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1794" title="View in source">`Benchmark#hz`</a> | ||
### <a name="Benchmark:hz" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1806" title="View in source">`Benchmark#hz`</a> | ||
*(Number)*: The number of executions per second. | ||
[▲][1] | ||
## <a name="mean" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1856" title="View in source">`Benchmark#mean`</a> | ||
*(Number)*: The sample arithmetic mean. | ||
[▲][1] | ||
## <a name="period" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1899" title="View in source">`Benchmark#period`</a> | ||
*(Number)*: The time taken to execute the test once *(secs)*. | ||
[▲][1] | ||
## <a name="running" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1808" title="View in source">`Benchmark#running`</a> | ||
### <a name="Benchmark:running" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1820" title="View in source">`Benchmark#running`</a> | ||
*(Boolean)*: A flag to indicate if the benchmark is running. | ||
[▲][1] | ||
## <a name="size" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1863" title="View in source">`Benchmark#size`</a> | ||
*(Number)*: The sample size. | ||
[▲][1] | ||
## <a name="start" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1906" title="View in source">`Benchmark#start`</a> | ||
*(Number)*: A timestamp of when the benchmark started *(ms)*. | ||
[▲][1] | ||
## <a name="stats" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1821" title="View in source">`Benchmark#stats`</a> | ||
*(Object)*: An object of stats including mean, margin or error, and standard deviation. | ||
[▲][1] | ||
## <a name="stop" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1913" title="View in source">`Benchmark#stop`</a> | ||
*(Number)*: A timestamp of when the benchmark finished *(ms)*. | ||
[▲][1] | ||
## <a name="times" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1878" title="View in source">`Benchmark#times`</a> | ||
*(Object)*: An object of timing data including cycle, elapsed, period, start, and stop. | ||
[▲][1] | ||
## <a name="variance" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1870" title="View in source">`Benchmark#variance`</a> | ||
*(Number)*: The sample variance. | ||
[▲][1] | ||
## <a name="abort" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1127" title="View in source">`Benchmark#abort()`</a> | ||
### <a name="Benchmark:abort" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1129" title="View in source">`Benchmark#abort`</a> | ||
Aborts the benchmark without recording times. | ||
@@ -529,3 +473,3 @@ [▲][1] | ||
## <a name="addListener" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1038" title="View in source">`Benchmark#addListener(type, listener)`</a> | ||
### <a name="Benchmark:addListener" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1040" title="View in source">`Benchmark#addListener(type, listener)`</a> | ||
Registers a single listener of a specified event type. | ||
@@ -548,3 +492,3 @@ [▲][1] | ||
## <a name="clone" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1155" title="View in source">`Benchmark#clone(options)`</a> | ||
### <a name="Benchmark:clone" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1157" title="View in source">`Benchmark#clone(options)`</a> | ||
Creates a new benchmark using the same test and options. | ||
@@ -564,3 +508,3 @@ [▲][1] | ||
## <a name="compare" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1173" title="View in source">`Benchmark#compare(other)`</a> | ||
### <a name="Benchmark:compare" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1175" title="View in source">`Benchmark#compare(other)`</a> | ||
Determines if the benchmark's period is smaller than another. | ||
@@ -575,3 +519,3 @@ [▲][1] | ||
## <a name="emit" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1053" title="View in source">`Benchmark#emit(type)`</a> | ||
### <a name="Benchmark:emit" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1055" title="View in source">`Benchmark#emit(type)`</a> | ||
Executes all registered listeners of a specified event type. | ||
@@ -583,7 +527,7 @@ [▲][1] | ||
## <a name="on" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1814" title="View in source">`Benchmark#on`</a> | ||
### <a name="Benchmark:on" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1826" title="View in source">`Benchmark#on`</a> | ||
Alias of [`Benchmark#addListener`](#addListener). | ||
[▲][1] | ||
## <a name="removeAllListeners" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1110" title="View in source">`Benchmark#removeAllListeners(type)`</a> | ||
### <a name="Benchmark:removeAllListeners" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1112" title="View in source">`Benchmark#removeAllListeners(type)`</a> | ||
Unregisters all listeners of a specified event type. | ||
@@ -605,3 +549,3 @@ [▲][1] | ||
## <a name="removeListener" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1083" title="View in source">`Benchmark#removeListener(type, listener)`</a> | ||
### <a name="Benchmark:removeListener" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1085" title="View in source">`Benchmark#removeListener(type, listener)`</a> | ||
Unregisters a single listener of a specified event type. | ||
@@ -624,3 +568,3 @@ [▲][1] | ||
## <a name="reset" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1193" title="View in source">`Benchmark#reset()`</a> | ||
### <a name="Benchmark:reset" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1195" title="View in source">`Benchmark#reset`</a> | ||
Reset properties and abort if running. | ||
@@ -632,3 +576,3 @@ [▲][1] | ||
## <a name="run" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1377" title="View in source">`Benchmark#run(async)`</a> | ||
### <a name="Benchmark:run" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1379" title="View in source">`Benchmark#run([async=false])`</a> | ||
Runs the benchmark. | ||
@@ -643,9 +587,68 @@ [▲][1] | ||
## <a name="toString" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1234" title="View in source">`Benchmark#toString()`</a> | ||
### <a name="Benchmark:toString" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1237" title="View in source">`Benchmark#toString`</a> | ||
Displays relevant benchmark information when coerced to a string. | ||
[▲][1] | ||
#### Returns | ||
*(String)*: A string representation of the benchmark instance. | ||
### <a name="Benchmark:stats" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1833" title="View in source">`Benchmark#stats`</a> | ||
*(Object)*: An object of stats including mean, margin or error, and standard deviation. | ||
[▲][1] | ||
### <a name="Benchmark:stats.ME" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1840" title="View in source">`Benchmark#stats.ME`</a> | ||
*(Number)*: The margin of error. | ||
[▲][1] | ||
### <a name="Benchmark:stats.RME" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1847" title="View in source">`Benchmark#stats.RME`</a> | ||
*(Number)*: The relative margin of error *(expressed as a percentage of the mean)*. | ||
[▲][1] | ||
### <a name="Benchmark:stats.SEM" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1854" title="View in source">`Benchmark#stats.SEM`</a> | ||
*(Number)*: The standard error of the mean. | ||
[▲][1] | ||
### <a name="Benchmark:stats.deviation" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1861" title="View in source">`Benchmark#stats.deviation`</a> | ||
*(Number)*: The sample standard deviation. | ||
[▲][1] | ||
### <a name="Benchmark:stats.mean" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1868" title="View in source">`Benchmark#stats.mean`</a> | ||
*(Number)*: The sample arithmetic mean. | ||
[▲][1] | ||
### <a name="Benchmark:stats.size" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1875" title="View in source">`Benchmark#stats.size`</a> | ||
*(Number)*: The sample size. | ||
[▲][1] | ||
### <a name="Benchmark:stats.variance" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1882" title="View in source">`Benchmark#stats.variance`</a> | ||
*(Number)*: The sample variance. | ||
[▲][1] | ||
### <a name="Benchmark:times" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1890" title="View in source">`Benchmark#times`</a> | ||
*(Object)*: An object of timing data including cycle, elapsed, period, start, and stop. | ||
[▲][1] | ||
### <a name="Benchmark:times.cycle" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1897" title="View in source">`Benchmark#times.cycle`</a> | ||
*(Number)*: The time taken to complete the last cycle *(secs)* | ||
[▲][1] | ||
### <a name="Benchmark:times.elapsed" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1904" title="View in source">`Benchmark#times.elapsed`</a> | ||
*(Number)*: The time taken to complete the benchmark *(secs)*. | ||
[▲][1] | ||
### <a name="Benchmark:times.period" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1911" title="View in source">`Benchmark#times.period`</a> | ||
*(Number)*: The time taken to execute the test once *(secs)*. | ||
[▲][1] | ||
### <a name="Benchmark:times.start" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1918" title="View in source">`Benchmark#times.start`</a> | ||
*(Number)*: A timestamp of when the benchmark started *(ms)*. | ||
[▲][1] | ||
### <a name="Benchmark:times.stop" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1925" title="View in source">`Benchmark#times.stop`</a> | ||
*(Number)*: A timestamp of when the benchmark finished *(ms)*. | ||
[▲][1] | ||
## `Benchmark.Suite` | ||
### <a name="Suite" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L174" title="View in source">`Benchmark.Suite(name, options)`</a> | ||
### <a name="Benchmark.Suite" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L176" title="View in source">`Benchmark.Suite(name [, options={}])`</a> | ||
Suite constructor. | ||
@@ -689,15 +692,15 @@ [▲][1] | ||
## `Benchmark.Suite.prototype` | ||
## <a name="aborted" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1966" title="View in source">`Benchmark.Suite#aborted`</a> | ||
### <a name="Benchmark.Suite:aborted" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1978" title="View in source">`Benchmark.Suite#aborted`</a> | ||
*(Boolean)*: A flag to indicate if the suite is aborted. | ||
[▲][1] | ||
## <a name="length" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1959" title="View in source">`Benchmark.Suite#length`</a> | ||
### <a name="Benchmark.Suite:length" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1971" title="View in source">`Benchmark.Suite#length`</a> | ||
*(Number)*: The number of benchmarks in the suite. | ||
[▲][1] | ||
## <a name="running" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1973" title="View in source">`Benchmark.Suite#running`</a> | ||
### <a name="Benchmark.Suite:running" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1985" title="View in source">`Benchmark.Suite#running`</a> | ||
*(Boolean)*: A flag to indicate if the suite is running. | ||
[▲][1] | ||
## <a name="abort" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L901" title="View in source">`Benchmark.Suite#abortSuite()`</a> | ||
### <a name="Benchmark.Suite:abort" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L903" title="View in source">`Benchmark.Suite#abortSuite`</a> | ||
Aborts all benchmarks in the suite. | ||
@@ -709,3 +712,3 @@ [▲][1] | ||
## <a name="add" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L931" title="View in source">`Benchmark.Suite#add(name, fn, options)`</a> | ||
### <a name="Benchmark.Suite:add" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L933" title="View in source">`Benchmark.Suite#add(name, fn [, options={}])`</a> | ||
Adds a test to the benchmark suite. | ||
@@ -735,3 +738,3 @@ [▲][1] | ||
## <a name="addListener" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1038" title="View in source">`Benchmark.Suite#addListener(type, listener)`</a> | ||
### <a name="Benchmark.Suite:addListener" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1040" title="View in source">`Benchmark.Suite#addListener(type, listener)`</a> | ||
Registers a single listener of a specified event type. | ||
@@ -754,3 +757,3 @@ [▲][1] | ||
## <a name="clone" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L948" title="View in source">`Benchmark.Suite#cloneSuite(options)`</a> | ||
### <a name="Benchmark.Suite:clone" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L950" title="View in source">`Benchmark.Suite#cloneSuite(options)`</a> | ||
Creates a new suite with cloned benchmarks. | ||
@@ -765,3 +768,3 @@ [▲][1] | ||
## <a name="each" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1982" title="View in source">`Benchmark.Suite#each`</a> | ||
### <a name="Benchmark.Suite:each" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1994" title="View in source">`Benchmark.Suite#each(callback)`</a> | ||
A bare-bones `Array#forEach` solution. | ||
@@ -777,3 +780,3 @@ Callbacks may terminate the loop by explicitly returning `false`. | ||
## <a name="emit" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1053" title="View in source">`Benchmark.Suite#emit(type)`</a> | ||
### <a name="Benchmark.Suite:emit" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1055" title="View in source">`Benchmark.Suite#emit(type)`</a> | ||
Executes all registered listeners of a specified event type. | ||
@@ -785,3 +788,3 @@ [▲][1] | ||
## <a name="filter" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L967" title="View in source">`Benchmark.Suite#filterSuite(callback)`</a> | ||
### <a name="Benchmark.Suite:filter" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L969" title="View in source">`Benchmark.Suite#filterSuite(callback)`</a> | ||
A bare-bones `Array#filter` solution. | ||
@@ -796,3 +799,3 @@ [▲][1] | ||
## <a name="indexOf" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1990" title="View in source">`Benchmark.Suite#indexOf`</a> | ||
### <a name="Benchmark.Suite:indexOf" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L2002" title="View in source">`Benchmark.Suite#indexOf(value)`</a> | ||
A bare-bones `Array#indexOf` solution. | ||
@@ -807,3 +810,3 @@ [▲][1] | ||
## <a name="invoke" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1999" title="View in source">`Benchmark.Suite#invoke`</a> | ||
### <a name="Benchmark.Suite:invoke" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L2011" title="View in source">`Benchmark.Suite#invoke(name [, arg1, arg2, ...])`</a> | ||
Invokes a method on all benchmarks in the suite. | ||
@@ -814,3 +817,3 @@ [▲][1] | ||
1. `name` *(String|Object)*: The name of the method to invoke OR options object. | ||
2. `[, arg1, arg2, ...]` *(Mixed)*: Arguments to invoke the method with. | ||
2. `[arg1, arg2, ...]` *(Mixed)*: Arguments to invoke the method with. | ||
@@ -820,3 +823,3 @@ #### Returns | ||
## <a name="map" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L2007" title="View in source">`Benchmark.Suite#map`</a> | ||
### <a name="Benchmark.Suite:map" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L2019" title="View in source">`Benchmark.Suite#map(callback)`</a> | ||
A bare-bones `Array#map` solution. | ||
@@ -831,7 +834,7 @@ [▲][1] | ||
## <a name="on" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1814" title="View in source">`Benchmark.Suite#on`</a> | ||
### <a name="Benchmark.Suite:on" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1826" title="View in source">`Benchmark.Suite#on`</a> | ||
Alias of [`Benchmark#addListener`](#addListener). | ||
[▲][1] | ||
## <a name="pluck" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L2015" title="View in source">`Benchmark.Suite#pluck`</a> | ||
### <a name="Benchmark.Suite:pluck" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L2027" title="View in source">`Benchmark.Suite#pluck(property)`</a> | ||
Retrieves the value of a specified property from all benchmarks in the suite. | ||
@@ -846,3 +849,3 @@ [▲][1] | ||
## <a name="reduce" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L2024" title="View in source">`Benchmark.Suite#reduce`</a> | ||
### <a name="Benchmark.Suite:reduce" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L2036" title="View in source">`Benchmark.Suite#reduce(callback, accumulator)`</a> | ||
A bare-bones `Array#reduce` solution. | ||
@@ -858,3 +861,3 @@ [▲][1] | ||
## <a name="removeAllListeners" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1110" title="View in source">`Benchmark.Suite#removeAllListeners(type)`</a> | ||
### <a name="Benchmark.Suite:removeAllListeners" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1112" title="View in source">`Benchmark.Suite#removeAllListeners(type)`</a> | ||
Unregisters all listeners of a specified event type. | ||
@@ -876,3 +879,3 @@ [▲][1] | ||
## <a name="removeListener" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1083" title="View in source">`Benchmark.Suite#removeListener(type, listener)`</a> | ||
### <a name="Benchmark.Suite:removeListener" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L1085" title="View in source">`Benchmark.Suite#removeListener(type, listener)`</a> | ||
Unregisters a single listener of a specified event type. | ||
@@ -895,3 +898,3 @@ [▲][1] | ||
## <a name="reset" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L981" title="View in source">`Benchmark.Suite#resetSuite()`</a> | ||
### <a name="Benchmark.Suite:reset" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L983" title="View in source">`Benchmark.Suite#resetSuite`</a> | ||
Resets all benchmarks in the suite. | ||
@@ -903,3 +906,3 @@ [▲][1] | ||
## <a name="run" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L997" title="View in source">`Benchmark.Suite#runSuite(async, queued)`</a> | ||
### <a name="Benchmark.Suite:run" href="https://github.com/mathiasbynens/benchmark.js/blob/master/benchmark.js#L999" title="View in source">`Benchmark.Suite#runSuite([async=false, queued=false])`</a> | ||
Runs the suite. | ||
@@ -906,0 +909,0 @@ [▲][1] |
{ | ||
"name": "benchmark", | ||
"version": "0.1.342", | ||
"version": "0.1.343", | ||
"description": "A benchmarking library that works on nearly all JavaScript platforms, supports high-resolution timers, and returns statistically significant results.", | ||
@@ -5,0 +5,0 @@ "homepage": "http://benchmarkjs.com/", |
@@ -13,3 +13,3 @@ # Benchmark.js | ||
In a browser: | ||
In a browser or Adobe AIR: | ||
@@ -16,0 +16,0 @@ <script src="benchmark.js"></script> |
@@ -31,8 +31,7 @@ module("Benchmark.platform"); | ||
.replace(/\bopera\.version\(\)/, 'opera') | ||
.replace(/\bIN_AIR\b/g, 'me.runtime') | ||
.replace(/\bIN_JAVA\b/g, 'false') | ||
.replace(/\bwindow\b/g, 'me') | ||
.replace(/\bexports\b/g, 'me.exports') | ||
.replace(/([^.\x22\x27])global\b/g, '$1me.global') | ||
.replace(/\bprocess\b/g, 'me.process') | ||
.replace(/\bsystem\b/g, 'me.system') | ||
.replace(/([^.\x22\x27])\bglobal\b/g, '$1me.global') | ||
.replace(/([^.])\bsystem\b/g, '$1me.system') | ||
.replace(/\b(?:Environment|RuntimeObject)\b/g, 'Object') | ||
@@ -42,3 +41,6 @@ .replace(/\bnav\.appMinorVersion/g, 'me.appMinorVersion') | ||
.replace(/\bnav\.platform/g, 'me.platform') | ||
.replace(/\bexports\b/g, 'me.exports') | ||
.replace(/\bexternal/g, 'me.external') | ||
.replace(/\bprocess\b/g, 'me.process') | ||
.replace(/\b(?:me\.)?runtime/g, 'me.runtime') | ||
.replace(/\b(?:me\.)?phantom/g, 'me.phantom') | ||
@@ -59,2 +61,7 @@ .replace(/\bdoc\.documentMode/g, 'me.mode')); | ||
var Tests = { | ||
'Adobe AIR 2.5 (like Safari 4.x) on Windows XP': { | ||
'ua': 'Mozilla/5.0 (Windows; U; en-US) AppleWebKit/531.9 (KHTML, like Gecko) AdobeAIR/2.5', | ||
'runtime': { 'flash': { 'system': { 'Capabilities': { 'os': 'Windows XP' }}}} | ||
}, | ||
'Avant Browser on Windows Server 2008 / Vista': { | ||
@@ -457,3 +464,3 @@ 'ua': 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Avant Browser)', | ||
'global': { }, | ||
'process': { 'version': 'v0.3.1', 'platform': 'cygwin' }, | ||
'process': { 'version': 'v0.3.1', 'platform': 'cygwin' } | ||
}, | ||
@@ -516,3 +523,3 @@ | ||
'Safari 3.0 on iPod iOS': { | ||
'ua': 'Mozila/5.0 (iPod; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Geckto) Version/3.0 Mobile/3A101a Safari/419.3' | ||
'ua': 'Mozila/5.0 (iPod; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/3A101a Safari/419.3' | ||
}, | ||
@@ -872,3 +879,3 @@ | ||
'Swiftfox 3.0.10#{alpha} on Linux i686': { | ||
'ua': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.10pre) Gecko/2009041814 Firefox/3.0.10pre (Swiftfox)', | ||
'ua': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.10pre) Gecko/2009041814 Firefox/3.0.10pre (Swiftfox)' | ||
}, | ||
@@ -884,4 +891,12 @@ | ||
'Firefox 3.6.8 is not Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100728 Firefox/3.6.8 CometBird/3.6.8,gzip(gfe),gzip(gfe)': { | ||
'ua': 'Firefox 3.6.8 is not Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100728 Firefox/3.6.8 CometBird/3.6.8,gzip(gfe),gzip(gfe)' | ||
}, | ||
'Mozilla/5.0 (PLAYSTATION 3; 2.00)': { | ||
'ua': 'Mozilla/5.0 (PLAYSTATION 3; 2.00)' | ||
}, | ||
'Mozilla/5.0 (X11; U; Linux; de-DE) AppleWebKit/532.4 (KHTML, like Gecko) rekonq Safari/532.4,gzip(gfe),gzip(gfe)': { | ||
'ua': 'Mozilla/5.0 (X11; U; Linux; de-DE) AppleWebKit/532.4 (KHTML, like Gecko) rekonq Safari/532.4,gzip(gfe),gzip(gfe)' | ||
} | ||
@@ -888,0 +903,0 @@ }; |
140815
2735