@best/analyzer
Advanced tools
Comparing version 7.0.1 to 8.0.0
@@ -7,3 +7,3 @@ "use strict"; | ||
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT | ||
*/ | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -10,0 +10,0 @@ exports.VERSION = void 0; |
@@ -7,3 +7,3 @@ "use strict"; | ||
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT | ||
*/ | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -17,3 +17,3 @@ exports.computeSampleStats = exports.compareSamples = exports.analyzeBenchmarks = void 0; | ||
const q = stats_1.quantile(arr, samplesQuantileThreshold); | ||
arr = arr.filter(v => v <= q); | ||
arr = arr.filter((v) => v <= q); | ||
} | ||
@@ -38,3 +38,3 @@ return { | ||
...acc, | ||
[key]: [] | ||
[key]: [], | ||
}), {}); | ||
@@ -46,3 +46,3 @@ collectorNode = collector[name] = emptyMetrics; | ||
} | ||
if (resultNode.type === "benchmark") { | ||
if (resultNode.type === 'benchmark') { | ||
const { metrics } = resultNode; | ||
@@ -64,3 +64,3 @@ Object.keys(metrics).reduce((collector, key) => { | ||
function createStatsStructure(node, collector) { | ||
if (node.type === "benchmark") { | ||
if (node.type === 'benchmark') { | ||
const { name, type } = node; | ||
@@ -87,3 +87,3 @@ const metricStats = collector[name]; | ||
benchmarkResults.map(async (benchmarkResult) => { | ||
const { results, benchmarkInfo: { benchmarkName }, projectConfig } = benchmarkResult; | ||
const { results, benchmarkInfo: { benchmarkName }, projectConfig, } = benchmarkResult; | ||
const structure = results[0]; | ||
@@ -108,3 +108,3 @@ // Collect the metrics for the nested benchmarks within | ||
benchmarkName, | ||
results: benchmarkStructure.nodes | ||
results: benchmarkStructure.nodes, | ||
}; | ||
@@ -111,0 +111,0 @@ })); |
@@ -7,3 +7,3 @@ "use strict"; | ||
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT | ||
*/ | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -27,3 +27,3 @@ exports.compare = exports.formatNumber = exports.medianAbsoluteDeviation = exports.median = exports.variance = exports.mean = exports.quantile = exports.sort = void 0; | ||
const avg = mean(arr); | ||
return mean(arr.map(v => (v - avg) ** 2)); | ||
return mean(arr.map((v) => (v - avg) ** 2)); | ||
} | ||
@@ -43,3 +43,3 @@ exports.variance = variance; | ||
if (med) { | ||
return median(arr.map(x => Math.abs(x - med))); | ||
return median(arr.map((x) => Math.abs(x - med))); | ||
} | ||
@@ -72,3 +72,3 @@ else { | ||
function getZ(n) { | ||
return (n - (size1 * size2 / 2)) / Math.sqrt(size1 * size2 * (size1 + size2 + 1) / 12); | ||
return (n - (size1 * size2) / 2) / Math.sqrt((size1 * size2 * (size1 + size2 + 1)) / 12); | ||
} | ||
@@ -75,0 +75,0 @@ if (size1 + size2 < 30) { |
@@ -17,3 +17,3 @@ { | ||
"types": "build/index.d.ts", | ||
"version": "7.0.1" | ||
"version": "8.0.0" | ||
} |
7941