8.0.1 • Published 2 years ago
@tracerbench/stats v8.0.1
TracerBench: Automated Chrome Tracing For Benchmarking
TracerBench
Installation
yarn add @tracerbench/stats
// or
npm install --save @tracerbench/stats
Usage
'use strict';
const { Stats, convertMSToMicroseconds } = require('@tracerbench/stats');
// sample input (in MS)
const control = [1063, 2112, 1154, 988, 1066, 2111, 1097, 1062, 1033, 1017];
const experiment = [1063, 1092, 1088, 1030, 1089, 1047, 959, 1103, 1453, 1034];
const stats = new Stats({
// Ensure these are microseconds
control: control.map(convertMSToMicroseconds),
experiment: experiment.map(convertMSToMicroseconds),
name: 'My Experiment'
});
// example output:
stats.name; // => 'My Experiment';
stats.controlMS; // => control input converted to ms
stats.experimentMS; // => experiment input converted to ms
stats.controlSortedMS; // => control input sorted + converted to ms
stats.experimentSortedMS; // => experiment input sorted + converted to ms
stats.sampleCount; // => {control: 10, experiment: 10}
stats.range; // => { min: 959, max: 2112 }
stats.sparkLine; // => {control: "█▁▁▁▁▁▁▁▁▁▂", experiment: "█▁▁▁▁▁▁▁▁▁▁"}
stats.confidenceInterval; // => {min: -46, max: 120, isSig: false}
stats.estimator; // => 9; the median difference between each input pairing (control vs experiment).
stats.sevenFigureSummary; // => {
// control: {10: 1014, 25: 1040, 50: 1065, 75: 1140, 90: 2111, min: 988, max: 2112}
// experiment: {10: 1023, 25: 1037, 50: 1076, 75: 1091, 90: 1138, min: 959, max: 1453}
// }
stats.outliers; // => {
// control: {IQR: 100, lowerOutlier: 890, upperOutlier: 1290, outliers: Array(2)}
// experiment: {IQR: 54, lowerOutlier: 956, upperOutlier: 1172, outliers: Array(1)}
// }
Statistics Primer
https://www.tracerbench.com/docs/guide/stats-primer
Stats API
https://github.com/TracerBench/tracerbench/blob/master/packages/stats/markdown/stats.md
8.0.1
2 years ago
8.0.0
2 years ago
7.0.0
2 years ago
6.1.2
2 years ago
6.1.1
2 years ago
6.1.0
3 years ago
6.0.0
3 years ago
5.3.6
3 years ago
5.3.5
3 years ago
5.3.4
3 years ago
5.3.3
3 years ago
5.3.2
3 years ago
5.3.1
3 years ago
5.3.0
3 years ago
5.2.0
3 years ago
5.1.0
3 years ago
5.0.0
3 years ago
4.5.5
3 years ago
4.5.3
3 years ago
4.5.2
3 years ago
4.5.1
3 years ago
4.5.0
4 years ago
4.4.0
4 years ago
4.3.2
4 years ago
4.3.1
4 years ago
4.3.0
4 years ago
4.2.2
4 years ago
4.2.1
4 years ago
4.1.2
4 years ago
4.1.1
4 years ago
4.1.0
4 years ago
4.0.12
4 years ago
4.0.11
4 years ago
4.0.10
4 years ago
4.0.9
4 years ago
4.0.8
4 years ago
4.0.7
4 years ago
4.0.6
4 years ago
4.0.5
4 years ago
4.0.4
4 years ago
4.0.1
4 years ago
4.0.0
4 years ago
3.1.2
4 years ago
3.0.16
4 years ago
3.0.15
4 years ago