Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tracerbench/stats

Package Overview
Dependencies
Maintainers
3
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tracerbench/stats

Stats class written in TS-Node

  • 4.5.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
22
decreased by-56.86%
Maintainers
3
Weekly downloads
 
Created
Source

TracerBench: Automated Chrome Tracing For Benchmarking

Build Status

TracerBench

https://www.tracerbench.com/

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

Keywords

FAQs

Package last updated on 17 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc