diff --git a/package.json b/package.json index 73604f3d..ee3767ac 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,9 @@ "husky": "^7.0.1", "conventional-changelog-cli": "^2.1.1", "@commitlint/config-conventional": "^12.1.4", - "@commitlint/cli": "^13.1.0" + "@commitlint/cli": "^13.1.0", + "@microsoft/api-extractor": "^7.18.11", + "@microsoft/api-documenter": "^7.13.54" }, "repository": { "type": "git", diff --git a/packages/stats/README.md b/packages/stats/README.md index d0555b8d..a783a184 100644 --- a/packages/stats/README.md +++ b/packages/stats/README.md @@ -3,6 +3,7 @@ [![Build Status](https://travis-ci.org/TracerBench/tracerbench.svg?branch=master)](https://travis-ci.org/TracerBench/tracerbench) ## TracerBench + https://www.tracerbench.com/ ### Installation @@ -21,8 +22,8 @@ npm install --save @tracerbench/stats 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 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 @@ -33,16 +34,16 @@ const stats = new Stats({ // 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.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.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.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} @@ -54,4 +55,7 @@ stats.outliers; // => { ``` # Statistics Primer + https://www.tracerbench.com/docs/guide/stats-primer + +# Stats API diff --git a/packages/stats/api-extractor.json b/packages/stats/api-extractor.json new file mode 100644 index 00000000..88b5db3f --- /dev/null +++ b/packages/stats/api-extractor.json @@ -0,0 +1,363 @@ +/** + * Config file for API Extractor. For more info, please visit: https://api-extractor.com + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + + /** + * Optionally specifies another JSON config file that this file extends from. This provides a way for + * standard settings to be shared across multiple projects. + * + * If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains + * the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be + * resolved using NodeJS require(). + * + * SUPPORTED TOKENS: none + * DEFAULT VALUE: "" + */ + // "extends": "./shared/api-extractor-base.json" + // "extends": "my-package/include/api-extractor-base.json" + + /** + * Determines the "" token that can be used with other config file settings. The project folder + * typically contains the tsconfig.json and package.json config files, but the path is user-defined. + * + * The path is resolved relative to the folder of the config file that contains the setting. + * + * The default value for "projectFolder" is the token "", which means the folder is determined by traversing + * parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder + * that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error + * will be reported. + * + * SUPPORTED TOKENS: + * DEFAULT VALUE: "" + */ + // "projectFolder": "..", + + /** + * (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor + * analyzes the symbols exported by this module. + * + * The file extension must be ".d.ts" and not ".ts". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + */ + "mainEntryPointFilePath": "/dist/src/index.d.ts", + /** + * A list of NPM package names whose exports should be treated as part of this package. + * + * For example, suppose that Webpack is used to generate a distributed bundle for the project "library1", + * and another NPM package "library2" is embedded in this bundle. Some types from library2 may become part + * of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly + * imports library2. To avoid this, we can specify: + * + * "bundledPackages": [ "library2" ], + * + * This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been + * local files for library1. + */ + "bundledPackages": [], + + /** + * Determines how the TypeScript compiler engine will be invoked by API Extractor. + */ + "compiler": { + /** + * Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * Note: This setting will be ignored if "overrideTsconfig" is used. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/tsconfig.json" + */ + // "tsconfigFilePath": "/tsconfig.json", + /** + * Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. + * The object must conform to the TypeScript tsconfig schema: + * + * http://json.schemastore.org/tsconfig + * + * If omitted, then the tsconfig.json file will be read from the "projectFolder". + * + * DEFAULT VALUE: no overrideTsconfig section + */ + // "overrideTsconfig": { + // . . . + // } + /** + * This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended + * and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when + * dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses + * for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck. + * + * DEFAULT VALUE: false + */ + // "skipLibCheck": true, + }, + + /** + * Configures how the API report file (*.api.md) will be generated. + */ + "apiReport": { + /** + * (REQUIRED) Whether to generate an API report. + */ + "enabled": true + + /** + * The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce + * a full file path. + * + * The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/". + * + * SUPPORTED TOKENS: , + * DEFAULT VALUE: ".api.md" + */ + // "reportFileName": ".api.md", + + /** + * Specifies the folder where the API report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy, + * e.g. for an API review. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/etc/" + */ + // "reportFolder": "/etc/", + + /** + * Specifies the folder where the temporary report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * After the temporary file is written to disk, it is compared with the file in the "reportFolder". + * If they are different, a production build will fail. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/" + */ + // "reportTempFolder": "/temp/" + }, + + /** + * Configures how the doc model file (*.api.json) will be generated. + */ + "docModel": { + /** + * (REQUIRED) Whether to generate a doc model file. + */ + "enabled": true + + /** + * The output path for the doc model file. The file extension should be ".api.json". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/.api.json" + */ + // "apiJsonFilePath": "/temp/.api.json" + }, + + /** + * Configures how the .d.ts rollup file will be generated. + */ + "dtsRollup": { + /** + * (REQUIRED) Whether to generate the .d.ts rollup file. + */ + "enabled": true + + /** + * Specifies the output path for a .d.ts rollup file to be generated without any trimming. + * This file will include all declarations that are exported by the main entry point. + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/dist/.d.ts" + */ + // "untrimmedFilePath": "/dist/.d.ts", + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release. + * This file will include only declarations that are marked as "@public" or "@beta". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "betaTrimmedFilePath": "/dist/-beta.d.ts", + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release. + * This file will include only declarations that are marked as "@public". + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "publicTrimmedFilePath": "/dist/-public.d.ts", + + /** + * When a declaration is trimmed, by default it will be replaced by a code comment such as + * "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the + * declaration completely. + * + * DEFAULT VALUE: false + */ + // "omitTrimmingComments": true + }, + + /** + * Configures how the tsdoc-metadata.json file will be generated. + */ + "tsdocMetadata": { + /** + * Whether to generate the tsdoc-metadata.json file. + * + * DEFAULT VALUE: true + */ + // "enabled": true, + /** + * Specifies where the TSDoc metadata file should be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * The default value is "", which causes the path to be automatically inferred from the "tsdocMetadata", + * "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup + * falls back to "tsdoc-metadata.json" in the package folder. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "tsdocMetadataFilePath": "/dist/tsdoc-metadata.json" + }, + + /** + * Specifies what type of newlines API Extractor should use when writing output files. By default, the output files + * will be written with Windows-style newlines. To use POSIX-style newlines, specify "lf" instead. + * To use the OS's default newline kind, specify "os". + * + * DEFAULT VALUE: "crlf" + */ + // "newlineKind": "crlf", + + /** + * Configures how API Extractor reports error and warning messages produced during analysis. + * + * There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages. + */ + "messages": { + /** + * Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing + * the input .d.ts files. + * + * TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "compilerMessageReporting": { + /** + * Configures the default routing for messages that don't match an explicit rule in this table. + */ + "default": { + /** + * Specifies whether the message should be written to the the tool's output log. Note that + * the "addToApiReportFile" property may supersede this option. + * + * Possible values: "error", "warning", "none" + * + * Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail + * and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes + * the "--local" option), the warning is displayed but the build will not fail. + * + * DEFAULT VALUE: "warning" + */ + "logLevel": "warning" + + /** + * When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md), + * then the message will be written inside that file; otherwise, the message is instead logged according to + * the "logLevel" option. + * + * DEFAULT VALUE: false + */ + // "addToApiReportFile": false + } + + // "TS2551": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + }, + + /** + * Configures handling of messages reported by API Extractor during its analysis. + * + * API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag" + * + * DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings + */ + "extractorMessageReporting": { + "default": { + "logLevel": "warning" + // "addToApiReportFile": false + } + + // "ae-extra-release-tag": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + }, + + /** + * Configures handling of messages reported by the TSDoc parser when analyzing code comments. + * + * TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "tsdocMessageReporting": { + "default": { + "logLevel": "warning" + // "addToApiReportFile": false + } + + // "tsdoc-link-tag-unescaped-text": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + } + } +} diff --git a/packages/stats/etc/stats.api.md b/packages/stats/etc/stats.api.md new file mode 100644 index 00000000..0c188901 --- /dev/null +++ b/packages/stats/etc/stats.api.md @@ -0,0 +1,148 @@ +## API Report File for "@tracerbench/stats" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +// Warning: (ae-forgotten-export) The symbol "_defaultModifier" needs to be exported by the entry point index.d.ts +// +// @public +export function cartesianProduct(listOne: number[], listTwo: number[], func?: typeof _defaultModifier): number[]; + +// @public +export function confidenceInterval(a: number[], b: number[], confidence: number): Omit; + +// @public +export function convertMicrosecondsToMS(ms: string | number): number; + +// @public +export function convertMSToMicroseconds(ms: string | number): number; + +// @public +export function getWilcoxonRankSumTest(control: number[], experiment: number[]): boolean; + +// @public +export function getWilcoxonSignedRankTest(control: number[], experiment: number[]): boolean; + +// @public (undocumented) +export type IAsPercentage = { + percentMin: number; + percentMedian: number; + percentMax: number; +}; + +// @public (undocumented) +export type IConfidenceInterval = { + min: number; + median: number; + max: number; + zScore: number; + isSig: boolean; + pValue: number; + U: number; + asPercent: IAsPercentage; +}; + +// @public (undocumented) +export interface IOutliers { + // (undocumented) + IQR: number; + // (undocumented) + lowerOutlier: number; + // (undocumented) + outliers: number[]; + // (undocumented) + upperOutlier: number; +} + +// @public (undocumented) +export type ISevenFigureSummary = { + [key in string | number]: number; +} & { + min: number; + max: number; + 10: number; + 25: number; + 50: number; + 75: number; + 90: number; +}; + +// @public (undocumented) +export interface IStatsOptions { + // (undocumented) + confidenceLevel?: 0.8 | 0.85 | 0.9 | 0.95 | 0.99 | 0.995 | 0.999; + // (undocumented) + control: number[]; + // (undocumented) + experiment: number[]; + // (undocumented) + name: string; +} + +// @public +export function roundFloatAndConvertMicrosecondsToMS(ms: string | number): number; + +// @public +export class Stats { + constructor(options: IStatsOptions, unitConverterFn?: (n: number) => number); + // Warning: (ae-forgotten-export) The symbol "Bucket" needs to be exported by the entry point index.d.ts + // + // (undocumented) + buckets: Bucket[]; + // (undocumented) + confidenceInterval: IConfidenceInterval; + // (undocumented) + confidenceIntervals: { + [key: number]: IConfidenceInterval; + }; + // (undocumented) + control: number[]; + // (undocumented) + controlSorted: number[]; + // (undocumented) + estimator: number; + // (undocumented) + experiment: number[]; + // (undocumented) + experimentSorted: number[]; + // (undocumented) + readonly name: string; + // (undocumented) + outliers: { + control: IOutliers; + experiment: IOutliers; + }; + // (undocumented) + populationVariance: { + control: number; + experiment: number; + }; + // (undocumented) + range: { + min: number; + max: number; + }; + // (undocumented) + readonly sampleCount: { + control: number; + experiment: number; + }; + // (undocumented) + sevenFigureSummary: { + control: ISevenFigureSummary; + experiment: ISevenFigureSummary; + }; + // (undocumented) + readonly sparkLine: { + control: string; + experiment: string; + }; +} + +// @public +export function toNearestHundreth(n: number): number; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/packages/stats/markdown/index.md b/packages/stats/markdown/index.md new file mode 100644 index 00000000..9899a7e0 --- /dev/null +++ b/packages/stats/markdown/index.md @@ -0,0 +1,12 @@ + + +[Home](./index.md) + +## API Reference + +## Packages + +| Package | Description | +| --- | --- | +| [@tracerbench/stats](./stats.md) | | + diff --git a/packages/stats/markdown/stats.cartesianproduct.md b/packages/stats/markdown/stats.cartesianproduct.md new file mode 100644 index 00000000..ca9ec18a --- /dev/null +++ b/packages/stats/markdown/stats.cartesianproduct.md @@ -0,0 +1,26 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [cartesianProduct](./stats.cartesianproduct.md) + +## cartesianProduct() function + +Apply the passed "func" to the permutations of the items in listOne and listTwo + +Signature: + +```typescript +export declare function cartesianProduct(listOne: number[], listTwo: number[], func?: typeof _defaultModifier): number[]; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| listOne | number\[\] | Array of numbers | +| listTwo | number\[\] | Array of numbers | +| func | typeof \_defaultModifier | Function used to do something with x and y | + +Returns: + +number\[\] + diff --git a/packages/stats/markdown/stats.confidenceinterval.md b/packages/stats/markdown/stats.confidenceinterval.md new file mode 100644 index 00000000..1b7072b4 --- /dev/null +++ b/packages/stats/markdown/stats.confidenceinterval.md @@ -0,0 +1,26 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [confidenceInterval](./stats.confidenceinterval.md) + +## confidenceInterval() function + +Calculate the confidence interval of the delta between the two distributions + +Signature: + +```typescript +export declare function confidenceInterval(a: number[], b: number[], confidence: number): Omit; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| a | number\[\] | | +| b | number\[\] | | +| confidence | number | | + +Returns: + +Omit<[IConfidenceInterval](./stats.iconfidenceinterval.md), 'isSig'> + diff --git a/packages/stats/markdown/stats.convertmicrosecondstoms.md b/packages/stats/markdown/stats.convertmicrosecondstoms.md new file mode 100644 index 00000000..5738f852 --- /dev/null +++ b/packages/stats/markdown/stats.convertmicrosecondstoms.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [convertMicrosecondsToMS](./stats.convertmicrosecondstoms.md) + +## convertMicrosecondsToMS() function + +Convert microseconds to milliseconds + +Signature: + +```typescript +export declare function convertMicrosecondsToMS(ms: string | number): number; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| ms | string \| number | Microseconds as either string or number | + +Returns: + +number + diff --git a/packages/stats/markdown/stats.convertmstomicroseconds.md b/packages/stats/markdown/stats.convertmstomicroseconds.md new file mode 100644 index 00000000..e7cd8f30 --- /dev/null +++ b/packages/stats/markdown/stats.convertmstomicroseconds.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [convertMSToMicroseconds](./stats.convertmstomicroseconds.md) + +## convertMSToMicroseconds() function + +Convert milliseconds to microseconds + +Signature: + +```typescript +export declare function convertMSToMicroseconds(ms: string | number): number; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| ms | string \| number | Milliseconds as either string or number | + +Returns: + +number + diff --git a/packages/stats/markdown/stats.getwilcoxonranksumtest.md b/packages/stats/markdown/stats.getwilcoxonranksumtest.md new file mode 100644 index 00000000..e57f6e2b --- /dev/null +++ b/packages/stats/markdown/stats.getwilcoxonranksumtest.md @@ -0,0 +1,25 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [getWilcoxonRankSumTest](./stats.getwilcoxonranksumtest.md) + +## getWilcoxonRankSumTest() function + +Wilcoxon Rank Sum Test independent test of 2 groups tested once un-paired two-tailed test alpha 0.05 critical values + +Signature: + +```typescript +export declare function getWilcoxonRankSumTest(control: number[], experiment: number[]): boolean; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| control | number\[\] | Control as array of numbers | +| experiment | number\[\] | Experiment as array of numbers | + +Returns: + +boolean + diff --git a/packages/stats/markdown/stats.getwilcoxonsignedranktest.md b/packages/stats/markdown/stats.getwilcoxonsignedranktest.md new file mode 100644 index 00000000..cdb71cf2 --- /dev/null +++ b/packages/stats/markdown/stats.getwilcoxonsignedranktest.md @@ -0,0 +1,25 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [getWilcoxonSignedRankTest](./stats.getwilcoxonsignedranktest.md) + +## getWilcoxonSignedRankTest() function + +Wilcoxon Signed Rank Test paired two-tailed test alpha 0.05 critical values + +Signature: + +```typescript +export declare function getWilcoxonSignedRankTest(control: number[], experiment: number[]): boolean; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| control | number\[\] | Control as array of numbers | +| experiment | number\[\] | | + +Returns: + +boolean + diff --git a/packages/stats/markdown/stats.iaspercentage.md b/packages/stats/markdown/stats.iaspercentage.md new file mode 100644 index 00000000..310edd8a --- /dev/null +++ b/packages/stats/markdown/stats.iaspercentage.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [IAsPercentage](./stats.iaspercentage.md) + +## IAsPercentage type + +Signature: + +```typescript +export declare type IAsPercentage = { + percentMin: number; + percentMedian: number; + percentMax: number; +}; +``` diff --git a/packages/stats/markdown/stats.iconfidenceinterval.md b/packages/stats/markdown/stats.iconfidenceinterval.md new file mode 100644 index 00000000..70aa6443 --- /dev/null +++ b/packages/stats/markdown/stats.iconfidenceinterval.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [IConfidenceInterval](./stats.iconfidenceinterval.md) + +## IConfidenceInterval type + +Signature: + +```typescript +export declare type IConfidenceInterval = { + min: number; + median: number; + max: number; + zScore: number; + isSig: boolean; + pValue: number; + U: number; + asPercent: IAsPercentage; +}; +``` +References: [IAsPercentage](./stats.iaspercentage.md) + diff --git a/packages/stats/markdown/stats.ioutliers.iqr.md b/packages/stats/markdown/stats.ioutliers.iqr.md new file mode 100644 index 00000000..327a7090 --- /dev/null +++ b/packages/stats/markdown/stats.ioutliers.iqr.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [IOutliers](./stats.ioutliers.md) > [IQR](./stats.ioutliers.iqr.md) + +## IOutliers.IQR property + +Signature: + +```typescript +IQR: number; +``` diff --git a/packages/stats/markdown/stats.ioutliers.loweroutlier.md b/packages/stats/markdown/stats.ioutliers.loweroutlier.md new file mode 100644 index 00000000..8562da82 --- /dev/null +++ b/packages/stats/markdown/stats.ioutliers.loweroutlier.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [IOutliers](./stats.ioutliers.md) > [lowerOutlier](./stats.ioutliers.loweroutlier.md) + +## IOutliers.lowerOutlier property + +Signature: + +```typescript +lowerOutlier: number; +``` diff --git a/packages/stats/markdown/stats.ioutliers.md b/packages/stats/markdown/stats.ioutliers.md new file mode 100644 index 00000000..0c0bcea9 --- /dev/null +++ b/packages/stats/markdown/stats.ioutliers.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [IOutliers](./stats.ioutliers.md) + +## IOutliers interface + +Signature: + +```typescript +export interface IOutliers +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [IQR](./stats.ioutliers.iqr.md) | number | | +| [lowerOutlier](./stats.ioutliers.loweroutlier.md) | number | | +| [outliers](./stats.ioutliers.outliers.md) | number\[\] | | +| [upperOutlier](./stats.ioutliers.upperoutlier.md) | number | | + diff --git a/packages/stats/markdown/stats.ioutliers.outliers.md b/packages/stats/markdown/stats.ioutliers.outliers.md new file mode 100644 index 00000000..c6b0fbef --- /dev/null +++ b/packages/stats/markdown/stats.ioutliers.outliers.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [IOutliers](./stats.ioutliers.md) > [outliers](./stats.ioutliers.outliers.md) + +## IOutliers.outliers property + +Signature: + +```typescript +outliers: number[]; +``` diff --git a/packages/stats/markdown/stats.ioutliers.upperoutlier.md b/packages/stats/markdown/stats.ioutliers.upperoutlier.md new file mode 100644 index 00000000..b9f56ae7 --- /dev/null +++ b/packages/stats/markdown/stats.ioutliers.upperoutlier.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [IOutliers](./stats.ioutliers.md) > [upperOutlier](./stats.ioutliers.upperoutlier.md) + +## IOutliers.upperOutlier property + +Signature: + +```typescript +upperOutlier: number; +``` diff --git a/packages/stats/markdown/stats.isevenfiguresummary.md b/packages/stats/markdown/stats.isevenfiguresummary.md new file mode 100644 index 00000000..17f3d381 --- /dev/null +++ b/packages/stats/markdown/stats.isevenfiguresummary.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [ISevenFigureSummary](./stats.isevenfiguresummary.md) + +## ISevenFigureSummary type + +Signature: + +```typescript +export declare type ISevenFigureSummary = { + [key in string | number]: number; +} & { + min: number; + max: number; + 10: number; + 25: number; + 50: number; + 75: number; + 90: number; +}; +``` diff --git a/packages/stats/markdown/stats.istatsoptions.confidencelevel.md b/packages/stats/markdown/stats.istatsoptions.confidencelevel.md new file mode 100644 index 00000000..cb74d523 --- /dev/null +++ b/packages/stats/markdown/stats.istatsoptions.confidencelevel.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [IStatsOptions](./stats.istatsoptions.md) > [confidenceLevel](./stats.istatsoptions.confidencelevel.md) + +## IStatsOptions.confidenceLevel property + +Signature: + +```typescript +confidenceLevel?: 0.8 | 0.85 | 0.9 | 0.95 | 0.99 | 0.995 | 0.999; +``` diff --git a/packages/stats/markdown/stats.istatsoptions.control.md b/packages/stats/markdown/stats.istatsoptions.control.md new file mode 100644 index 00000000..7d5f5ed6 --- /dev/null +++ b/packages/stats/markdown/stats.istatsoptions.control.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [IStatsOptions](./stats.istatsoptions.md) > [control](./stats.istatsoptions.control.md) + +## IStatsOptions.control property + +Signature: + +```typescript +control: number[]; +``` diff --git a/packages/stats/markdown/stats.istatsoptions.experiment.md b/packages/stats/markdown/stats.istatsoptions.experiment.md new file mode 100644 index 00000000..25a7df63 --- /dev/null +++ b/packages/stats/markdown/stats.istatsoptions.experiment.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [IStatsOptions](./stats.istatsoptions.md) > [experiment](./stats.istatsoptions.experiment.md) + +## IStatsOptions.experiment property + +Signature: + +```typescript +experiment: number[]; +``` diff --git a/packages/stats/markdown/stats.istatsoptions.md b/packages/stats/markdown/stats.istatsoptions.md new file mode 100644 index 00000000..1fa534a9 --- /dev/null +++ b/packages/stats/markdown/stats.istatsoptions.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [IStatsOptions](./stats.istatsoptions.md) + +## IStatsOptions interface + +Signature: + +```typescript +export interface IStatsOptions +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [confidenceLevel?](./stats.istatsoptions.confidencelevel.md) | 0.8 \| 0.85 \| 0.9 \| 0.95 \| 0.99 \| 0.995 \| 0.999 | (Optional) | +| [control](./stats.istatsoptions.control.md) | number\[\] | | +| [experiment](./stats.istatsoptions.experiment.md) | number\[\] | | +| [name](./stats.istatsoptions.name.md) | string | | + diff --git a/packages/stats/markdown/stats.istatsoptions.name.md b/packages/stats/markdown/stats.istatsoptions.name.md new file mode 100644 index 00000000..9423e344 --- /dev/null +++ b/packages/stats/markdown/stats.istatsoptions.name.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [IStatsOptions](./stats.istatsoptions.md) > [name](./stats.istatsoptions.name.md) + +## IStatsOptions.name property + +Signature: + +```typescript +name: string; +``` diff --git a/packages/stats/markdown/stats.md b/packages/stats/markdown/stats.md new file mode 100644 index 00000000..d2f27482 --- /dev/null +++ b/packages/stats/markdown/stats.md @@ -0,0 +1,40 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) + +## stats package + +## Classes + +| Class | Description | +| --- | --- | +| [Stats](./stats.stats.md) | Statistics class which powers the TracerBench statistical reporter | + +## Functions + +| Function | Description | +| --- | --- | +| [cartesianProduct(listOne, listTwo, func)](./stats.cartesianproduct.md) | Apply the passed "func" to the permutations of the items in listOne and listTwo | +| [confidenceInterval(a, b, confidence)](./stats.confidenceinterval.md) | Calculate the confidence interval of the delta between the two distributions | +| [convertMicrosecondsToMS(ms)](./stats.convertmicrosecondstoms.md) | Convert microseconds to milliseconds | +| [convertMSToMicroseconds(ms)](./stats.convertmstomicroseconds.md) | Convert milliseconds to microseconds | +| [getWilcoxonRankSumTest(control, experiment)](./stats.getwilcoxonranksumtest.md) | Wilcoxon Rank Sum Test independent test of 2 groups tested once un-paired two-tailed test alpha 0.05 critical values | +| [getWilcoxonSignedRankTest(control, experiment)](./stats.getwilcoxonsignedranktest.md) | Wilcoxon Signed Rank Test paired two-tailed test alpha 0.05 critical values | +| [roundFloatAndConvertMicrosecondsToMS(ms)](./stats.roundfloatandconvertmicrosecondstoms.md) | Round a float in microseconds and convert it to milliseconds | +| [toNearestHundreth(n)](./stats.tonearesthundreth.md) | Round a float to hundreth decimal place | + +## Interfaces + +| Interface | Description | +| --- | --- | +| [IOutliers](./stats.ioutliers.md) | | +| [IStatsOptions](./stats.istatsoptions.md) | | + +## Type Aliases + +| Type Alias | Description | +| --- | --- | +| [IAsPercentage](./stats.iaspercentage.md) | | +| [IConfidenceInterval](./stats.iconfidenceinterval.md) | | +| [ISevenFigureSummary](./stats.isevenfiguresummary.md) | | + diff --git a/packages/stats/markdown/stats.roundfloatandconvertmicrosecondstoms.md b/packages/stats/markdown/stats.roundfloatandconvertmicrosecondstoms.md new file mode 100644 index 00000000..c45b1005 --- /dev/null +++ b/packages/stats/markdown/stats.roundfloatandconvertmicrosecondstoms.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [roundFloatAndConvertMicrosecondsToMS](./stats.roundfloatandconvertmicrosecondstoms.md) + +## roundFloatAndConvertMicrosecondsToMS() function + +Round a float in microseconds and convert it to milliseconds + +Signature: + +```typescript +export declare function roundFloatAndConvertMicrosecondsToMS(ms: string | number): number; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| ms | string \| number | Microseconds float as a string or number | + +Returns: + +number + diff --git a/packages/stats/markdown/stats.stats._constructor_.md b/packages/stats/markdown/stats.stats._constructor_.md new file mode 100644 index 00000000..f5784d86 --- /dev/null +++ b/packages/stats/markdown/stats.stats._constructor_.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [Stats](./stats.stats.md) > [(constructor)](./stats.stats._constructor_.md) + +## Stats.(constructor) + +Constructs a new instance of the `Stats` class + +Signature: + +```typescript +constructor(options: IStatsOptions, unitConverterFn?: (n: number) => number); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| options | [IStatsOptions](./stats.istatsoptions.md) | | +| unitConverterFn | (n: number) => number | | + diff --git a/packages/stats/markdown/stats.stats.buckets.md b/packages/stats/markdown/stats.stats.buckets.md new file mode 100644 index 00000000..5a785c81 --- /dev/null +++ b/packages/stats/markdown/stats.stats.buckets.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [Stats](./stats.stats.md) > [buckets](./stats.stats.buckets.md) + +## Stats.buckets property + +Signature: + +```typescript +buckets: Bucket[]; +``` diff --git a/packages/stats/markdown/stats.stats.confidenceinterval.md b/packages/stats/markdown/stats.stats.confidenceinterval.md new file mode 100644 index 00000000..7afd9495 --- /dev/null +++ b/packages/stats/markdown/stats.stats.confidenceinterval.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [Stats](./stats.stats.md) > [confidenceInterval](./stats.stats.confidenceinterval.md) + +## Stats.confidenceInterval property + +Signature: + +```typescript +confidenceInterval: IConfidenceInterval; +``` diff --git a/packages/stats/markdown/stats.stats.confidenceintervals.md b/packages/stats/markdown/stats.stats.confidenceintervals.md new file mode 100644 index 00000000..9727b40a --- /dev/null +++ b/packages/stats/markdown/stats.stats.confidenceintervals.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [Stats](./stats.stats.md) > [confidenceIntervals](./stats.stats.confidenceintervals.md) + +## Stats.confidenceIntervals property + +Signature: + +```typescript +confidenceIntervals: { + [key: number]: IConfidenceInterval; + }; +``` diff --git a/packages/stats/markdown/stats.stats.control.md b/packages/stats/markdown/stats.stats.control.md new file mode 100644 index 00000000..072f2ef0 --- /dev/null +++ b/packages/stats/markdown/stats.stats.control.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [Stats](./stats.stats.md) > [control](./stats.stats.control.md) + +## Stats.control property + +Signature: + +```typescript +control: number[]; +``` diff --git a/packages/stats/markdown/stats.stats.controlsorted.md b/packages/stats/markdown/stats.stats.controlsorted.md new file mode 100644 index 00000000..b5bafcf6 --- /dev/null +++ b/packages/stats/markdown/stats.stats.controlsorted.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [Stats](./stats.stats.md) > [controlSorted](./stats.stats.controlsorted.md) + +## Stats.controlSorted property + +Signature: + +```typescript +controlSorted: number[]; +``` diff --git a/packages/stats/markdown/stats.stats.estimator.md b/packages/stats/markdown/stats.stats.estimator.md new file mode 100644 index 00000000..6f9b23e4 --- /dev/null +++ b/packages/stats/markdown/stats.stats.estimator.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [Stats](./stats.stats.md) > [estimator](./stats.stats.estimator.md) + +## Stats.estimator property + +Signature: + +```typescript +estimator: number; +``` diff --git a/packages/stats/markdown/stats.stats.experiment.md b/packages/stats/markdown/stats.stats.experiment.md new file mode 100644 index 00000000..ac8d144d --- /dev/null +++ b/packages/stats/markdown/stats.stats.experiment.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [Stats](./stats.stats.md) > [experiment](./stats.stats.experiment.md) + +## Stats.experiment property + +Signature: + +```typescript +experiment: number[]; +``` diff --git a/packages/stats/markdown/stats.stats.experimentsorted.md b/packages/stats/markdown/stats.stats.experimentsorted.md new file mode 100644 index 00000000..4b6ad498 --- /dev/null +++ b/packages/stats/markdown/stats.stats.experimentsorted.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [Stats](./stats.stats.md) > [experimentSorted](./stats.stats.experimentsorted.md) + +## Stats.experimentSorted property + +Signature: + +```typescript +experimentSorted: number[]; +``` diff --git a/packages/stats/markdown/stats.stats.md b/packages/stats/markdown/stats.stats.md new file mode 100644 index 00000000..ed3535bf --- /dev/null +++ b/packages/stats/markdown/stats.stats.md @@ -0,0 +1,40 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [Stats](./stats.stats.md) + +## Stats class + +Statistics class which powers the TracerBench statistical reporter + +Signature: + +```typescript +export declare class Stats +``` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [(constructor)(options, unitConverterFn)](./stats.stats._constructor_.md) | | Constructs a new instance of the Stats class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [buckets](./stats.stats.buckets.md) | | Bucket\[\] | | +| [confidenceInterval](./stats.stats.confidenceinterval.md) | | [IConfidenceInterval](./stats.iconfidenceinterval.md) | | +| [confidenceIntervals](./stats.stats.confidenceintervals.md) | | { \[key: number\]: [IConfidenceInterval](./stats.iconfidenceinterval.md); } | | +| [control](./stats.stats.control.md) | | number\[\] | | +| [controlSorted](./stats.stats.controlsorted.md) | | number\[\] | | +| [estimator](./stats.stats.estimator.md) | | number | | +| [experiment](./stats.stats.experiment.md) | | number\[\] | | +| [experimentSorted](./stats.stats.experimentsorted.md) | | number\[\] | | +| [name](./stats.stats.name.md) | | string | | +| [outliers](./stats.stats.outliers.md) | | { control: [IOutliers](./stats.ioutliers.md); experiment: [IOutliers](./stats.ioutliers.md); } | | +| [populationVariance](./stats.stats.populationvariance.md) | | { control: number; experiment: number; } | | +| [range](./stats.stats.range.md) | | { min: number; max: number; } | | +| [sampleCount](./stats.stats.samplecount.md) | | { control: number; experiment: number; } | | +| [sevenFigureSummary](./stats.stats.sevenfiguresummary.md) | | { control: [ISevenFigureSummary](./stats.isevenfiguresummary.md); experiment: [ISevenFigureSummary](./stats.isevenfiguresummary.md); } | | +| [sparkLine](./stats.stats.sparkline.md) | | { control: string; experiment: string; } | | + diff --git a/packages/stats/markdown/stats.stats.name.md b/packages/stats/markdown/stats.stats.name.md new file mode 100644 index 00000000..be9df08c --- /dev/null +++ b/packages/stats/markdown/stats.stats.name.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [Stats](./stats.stats.md) > [name](./stats.stats.name.md) + +## Stats.name property + +Signature: + +```typescript +readonly name: string; +``` diff --git a/packages/stats/markdown/stats.stats.outliers.md b/packages/stats/markdown/stats.stats.outliers.md new file mode 100644 index 00000000..4071185e --- /dev/null +++ b/packages/stats/markdown/stats.stats.outliers.md @@ -0,0 +1,14 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [Stats](./stats.stats.md) > [outliers](./stats.stats.outliers.md) + +## Stats.outliers property + +Signature: + +```typescript +outliers: { + control: IOutliers; + experiment: IOutliers; + }; +``` diff --git a/packages/stats/markdown/stats.stats.populationvariance.md b/packages/stats/markdown/stats.stats.populationvariance.md new file mode 100644 index 00000000..65c99007 --- /dev/null +++ b/packages/stats/markdown/stats.stats.populationvariance.md @@ -0,0 +1,14 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [Stats](./stats.stats.md) > [populationVariance](./stats.stats.populationvariance.md) + +## Stats.populationVariance property + +Signature: + +```typescript +populationVariance: { + control: number; + experiment: number; + }; +``` diff --git a/packages/stats/markdown/stats.stats.range.md b/packages/stats/markdown/stats.stats.range.md new file mode 100644 index 00000000..ecbb7846 --- /dev/null +++ b/packages/stats/markdown/stats.stats.range.md @@ -0,0 +1,14 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [Stats](./stats.stats.md) > [range](./stats.stats.range.md) + +## Stats.range property + +Signature: + +```typescript +range: { + min: number; + max: number; + }; +``` diff --git a/packages/stats/markdown/stats.stats.samplecount.md b/packages/stats/markdown/stats.stats.samplecount.md new file mode 100644 index 00000000..56a9e7d7 --- /dev/null +++ b/packages/stats/markdown/stats.stats.samplecount.md @@ -0,0 +1,14 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [Stats](./stats.stats.md) > [sampleCount](./stats.stats.samplecount.md) + +## Stats.sampleCount property + +Signature: + +```typescript +readonly sampleCount: { + control: number; + experiment: number; + }; +``` diff --git a/packages/stats/markdown/stats.stats.sevenfiguresummary.md b/packages/stats/markdown/stats.stats.sevenfiguresummary.md new file mode 100644 index 00000000..d248b0e6 --- /dev/null +++ b/packages/stats/markdown/stats.stats.sevenfiguresummary.md @@ -0,0 +1,14 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [Stats](./stats.stats.md) > [sevenFigureSummary](./stats.stats.sevenfiguresummary.md) + +## Stats.sevenFigureSummary property + +Signature: + +```typescript +sevenFigureSummary: { + control: ISevenFigureSummary; + experiment: ISevenFigureSummary; + }; +``` diff --git a/packages/stats/markdown/stats.stats.sparkline.md b/packages/stats/markdown/stats.stats.sparkline.md new file mode 100644 index 00000000..428a3ea4 --- /dev/null +++ b/packages/stats/markdown/stats.stats.sparkline.md @@ -0,0 +1,14 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [Stats](./stats.stats.md) > [sparkLine](./stats.stats.sparkline.md) + +## Stats.sparkLine property + +Signature: + +```typescript +readonly sparkLine: { + control: string; + experiment: string; + }; +``` diff --git a/packages/stats/markdown/stats.tonearesthundreth.md b/packages/stats/markdown/stats.tonearesthundreth.md new file mode 100644 index 00000000..b46a1fb4 --- /dev/null +++ b/packages/stats/markdown/stats.tonearesthundreth.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [@tracerbench/stats](./stats.md) > [toNearestHundreth](./stats.tonearesthundreth.md) + +## toNearestHundreth() function + +Round a float to hundreth decimal place + +Signature: + +```typescript +export declare function toNearestHundreth(n: number): number; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| n | number | Float as a number | + +Returns: + +number + diff --git a/packages/stats/package.json b/packages/stats/package.json index 3daa1c05..75423dd0 100644 --- a/packages/stats/package.json +++ b/packages/stats/package.json @@ -25,7 +25,8 @@ "test": "yarn lint && yarn nyc --extension .ts mocha \"test/*.test.ts\"", "build": "rm -rf ./dist && yarn tsc -b && yarn lint", "watch": "yarn tsc -b -w", - "prepare": "yarn build" + "prepare": "yarn build", + "api-docs": "yarn build && rm -rf ./etc && mkdir ./etc && yarn api-extractor run --local --verbose && yarn api-documenter markdown -i temp" }, "dependencies": { "d3-array": "2.12.1", diff --git a/packages/stats/src/stats.ts b/packages/stats/src/stats.ts index a242dfe9..711480c7 100644 --- a/packages/stats/src/stats.ts +++ b/packages/stats/src/stats.ts @@ -55,6 +55,14 @@ export type IConfidenceInterval = { U: number; asPercent: IAsPercentage; }; + +/** + * Statistics class which powers the TracerBench statistical reporter + * + * + * @param options - IStatsOptions + * @param unitConverterFn - Optional unit converter function which takes a number and returns a number + */ export class Stats { public readonly name: string; public estimator: number; @@ -296,7 +304,7 @@ export class Stats { private getConfidenceInterval( control: number[], experiment: number[], - confidenceLevel: 0.8 | 0.85 | 0.9 | 0.95 | 0.99 | 0.995 | 0.999 = 0.95 + confidenceLevel: IStatsOptions['confidenceLevel'] = 0.95 ): IConfidenceInterval { const ci = confidenceInterval(control, experiment, confidenceLevel); const isCISig = @@ -307,6 +315,7 @@ export class Stats { : true; // ci sign must match on lower and upper bounds and pValue < 5% const isSig = isCISig && ci.pValue < 0.05; + return { min: Math.round(Math.ceil(ci.min * 100) / 100), max: Math.round(Math.ceil(ci.max * 100) / 100), diff --git a/packages/stats/src/utils.ts b/packages/stats/src/utils.ts index 46c67021..4a79c3d5 100644 --- a/packages/stats/src/utils.ts +++ b/packages/stats/src/utils.ts @@ -1,17 +1,37 @@ +/** + * Convert microseconds to milliseconds + * + * @param ms - Microseconds as either string or number + */ export function convertMicrosecondsToMS(ms: string | number): number { ms = typeof ms === 'string' ? parseInt(ms, 10) : ms; return Math.floor(ms * 100) / 100000; } +/** + * Convert milliseconds to microseconds + * + * @param ms - Milliseconds as either string or number + */ export function convertMSToMicroseconds(ms: string | number): number { ms = typeof ms === 'string' ? parseInt(ms, 10) : ms; return Math.floor(ms * 1000); } +/** + * Round a float to hundreth decimal place + * + * @param n - Float as a number + */ export function toNearestHundreth(n: number): number { return Math.round(n * 100) / 100; } +/** + * Round a float in microseconds and convert it to milliseconds + * + * @param ms - Microseconds float as a string or number + */ export function roundFloatAndConvertMicrosecondsToMS( ms: string | number ): number { @@ -19,15 +39,3 @@ export function roundFloatAndConvertMicrosecondsToMS( ms = Math.floor(ms * 100) / 100000; return Math.round(ms); } - -export function fillArray(arrLngth: number, incr = 1, strt = 0): number[] { - const a = []; - while (a.length < arrLngth) { - if (a.length < 1) { - a.push(strt); - } - a.push(strt + incr); - strt = strt + incr; - } - return a; -} diff --git a/packages/stats/src/wilcoxon-rank-sum.ts b/packages/stats/src/wilcoxon-rank-sum.ts index 02919aed..3295daed 100644 --- a/packages/stats/src/wilcoxon-rank-sum.ts +++ b/packages/stats/src/wilcoxon-rank-sum.ts @@ -67,8 +67,14 @@ export function getSampleUStat(rankSum: number, N: number): number { return rankSum - (N * (N + 1)) / 2; } -// independent test 2 groups tested once -// un-paired two-tailed test alpha 0.05 critical values +/** + * Wilcoxon Rank Sum Test + * independent test of 2 groups tested once + * un-paired two-tailed test alpha 0.05 critical values + * + * @param control - Control as array of numbers + * @param experiment - Experiment as array of numbers + */ export function getWilcoxonRankSumTest( control: number[], experiment: number[] diff --git a/packages/stats/src/wilcoxon-signed-rank.ts b/packages/stats/src/wilcoxon-signed-rank.ts index ad098469..30d02258 100644 --- a/packages/stats/src/wilcoxon-signed-rank.ts +++ b/packages/stats/src/wilcoxon-signed-rank.ts @@ -61,7 +61,13 @@ export function getTPlusVal(rankedSamples: ISample[]): number { }, 0); } -// paired two-tailed test alpha 0.05 critical values +/** + * Wilcoxon Signed Rank Test + * paired two-tailed test alpha 0.05 critical values + * + * @param control - Control as array of numbers + * @param listTwo - Experiment as array of numbers + */ export function getWilcoxonSignedRankTest( control: number[], experiment: number[] diff --git a/packages/stats/temp/stats.api.json b/packages/stats/temp/stats.api.json new file mode 100644 index 00000000..b00eb77b --- /dev/null +++ b/packages/stats/temp/stats.api.json @@ -0,0 +1,1470 @@ +{ + "metadata": { + "toolPackage": "@microsoft/api-extractor", + "toolVersion": "7.18.11", + "schemaVersion": 1004, + "oldestForwardsCompatibleVersion": 1001, + "tsdocConfig": { + "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", + "noStandardTags": true, + "tagDefinitions": [ + { + "tagName": "@alpha", + "syntaxKind": "modifier" + }, + { + "tagName": "@beta", + "syntaxKind": "modifier" + }, + { + "tagName": "@defaultValue", + "syntaxKind": "block" + }, + { + "tagName": "@decorator", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@deprecated", + "syntaxKind": "block" + }, + { + "tagName": "@eventProperty", + "syntaxKind": "modifier" + }, + { + "tagName": "@example", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@experimental", + "syntaxKind": "modifier" + }, + { + "tagName": "@inheritDoc", + "syntaxKind": "inline" + }, + { + "tagName": "@internal", + "syntaxKind": "modifier" + }, + { + "tagName": "@label", + "syntaxKind": "inline" + }, + { + "tagName": "@link", + "syntaxKind": "inline", + "allowMultiple": true + }, + { + "tagName": "@override", + "syntaxKind": "modifier" + }, + { + "tagName": "@packageDocumentation", + "syntaxKind": "modifier" + }, + { + "tagName": "@param", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@privateRemarks", + "syntaxKind": "block" + }, + { + "tagName": "@public", + "syntaxKind": "modifier" + }, + { + "tagName": "@readonly", + "syntaxKind": "modifier" + }, + { + "tagName": "@remarks", + "syntaxKind": "block" + }, + { + "tagName": "@returns", + "syntaxKind": "block" + }, + { + "tagName": "@sealed", + "syntaxKind": "modifier" + }, + { + "tagName": "@see", + "syntaxKind": "block" + }, + { + "tagName": "@throws", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@typeParam", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@virtual", + "syntaxKind": "modifier" + }, + { + "tagName": "@betaDocumentation", + "syntaxKind": "modifier" + }, + { + "tagName": "@internalRemarks", + "syntaxKind": "block" + }, + { + "tagName": "@preapproved", + "syntaxKind": "modifier" + } + ], + "supportForTags": { + "@alpha": true, + "@beta": true, + "@defaultValue": true, + "@decorator": true, + "@deprecated": true, + "@eventProperty": true, + "@example": true, + "@experimental": true, + "@inheritDoc": true, + "@internal": true, + "@label": true, + "@link": true, + "@override": true, + "@packageDocumentation": true, + "@param": true, + "@privateRemarks": true, + "@public": true, + "@readonly": true, + "@remarks": true, + "@returns": true, + "@sealed": true, + "@see": true, + "@throws": true, + "@typeParam": true, + "@virtual": true, + "@betaDocumentation": true, + "@internalRemarks": true, + "@preapproved": true + } + } + }, + "kind": "Package", + "canonicalReference": "@tracerbench/stats!", + "docComment": "", + "name": "@tracerbench/stats", + "members": [ + { + "kind": "EntryPoint", + "canonicalReference": "@tracerbench/stats!", + "name": "", + "members": [ + { + "kind": "Function", + "canonicalReference": "@tracerbench/stats!cartesianProduct:function(1)", + "docComment": "/**\n * Apply the passed \"func\" to the permutations of the items in listOne and listTwo\n *\n * @param listOne - Array of numbers\n *\n * @param listTwo - Array of numbers\n *\n * @param func - Function used to do something with x and y\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function cartesianProduct(listOne: " + }, + { + "kind": "Content", + "text": "number[]" + }, + { + "kind": "Content", + "text": ", listTwo: " + }, + { + "kind": "Content", + "text": "number[]" + }, + { + "kind": "Content", + "text": ", func?: " + }, + { + "kind": "Content", + "text": "typeof " + }, + { + "kind": "Reference", + "text": "_defaultModifier", + "canonicalReference": "@tracerbench/stats!~_defaultModifier:function" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "listOne", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "parameterName": "listTwo", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + }, + { + "parameterName": "func", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + } + } + ], + "name": "cartesianProduct" + }, + { + "kind": "Function", + "canonicalReference": "@tracerbench/stats!confidenceInterval:function(1)", + "docComment": "/**\n * Calculate the confidence interval of the delta between the two distributions\n *\n * @param distributionOne - Expected to be array of numbers\n *\n * @param distributionTwo - Expected to be array of numbers\n *\n * @param interval - Float between 0 and 1\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function confidenceInterval(a: " + }, + { + "kind": "Content", + "text": "number[]" + }, + { + "kind": "Content", + "text": ", b: " + }, + { + "kind": "Content", + "text": "number[]" + }, + { + "kind": "Content", + "text": ", confidence: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Omit", + "canonicalReference": "!Omit:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "IConfidenceInterval", + "canonicalReference": "@tracerbench/stats!IConfidenceInterval:type" + }, + { + "kind": "Content", + "text": ", 'isSig'>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 11 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "a", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "parameterName": "b", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + }, + { + "parameterName": "confidence", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + } + } + ], + "name": "confidenceInterval" + }, + { + "kind": "Function", + "canonicalReference": "@tracerbench/stats!convertMicrosecondsToMS:function(1)", + "docComment": "/**\n * Convert microseconds to milliseconds\n *\n * @param ms - Microseconds as either string or number\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function convertMicrosecondsToMS(ms: " + }, + { + "kind": "Content", + "text": "string | number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "ms", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "name": "convertMicrosecondsToMS" + }, + { + "kind": "Function", + "canonicalReference": "@tracerbench/stats!convertMSToMicroseconds:function(1)", + "docComment": "/**\n * Convert milliseconds to microseconds\n *\n * @param ms - Milliseconds as either string or number\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function convertMSToMicroseconds(ms: " + }, + { + "kind": "Content", + "text": "string | number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "ms", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "name": "convertMSToMicroseconds" + }, + { + "kind": "Function", + "canonicalReference": "@tracerbench/stats!getWilcoxonRankSumTest:function(1)", + "docComment": "/**\n * Wilcoxon Rank Sum Test independent test of 2 groups tested once un-paired two-tailed test alpha 0.05 critical values\n *\n * @param control - Control as array of numbers\n *\n * @param experiment - Experiment as array of numbers\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function getWilcoxonRankSumTest(control: " + }, + { + "kind": "Content", + "text": "number[]" + }, + { + "kind": "Content", + "text": ", experiment: " + }, + { + "kind": "Content", + "text": "number[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "control", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "parameterName": "experiment", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "name": "getWilcoxonRankSumTest" + }, + { + "kind": "Function", + "canonicalReference": "@tracerbench/stats!getWilcoxonSignedRankTest:function(1)", + "docComment": "/**\n * Wilcoxon Signed Rank Test paired two-tailed test alpha 0.05 critical values\n *\n * @param control - Control as array of numbers\n *\n * @param listTwo - Experiment as array of numbers\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function getWilcoxonSignedRankTest(control: " + }, + { + "kind": "Content", + "text": "number[]" + }, + { + "kind": "Content", + "text": ", experiment: " + }, + { + "kind": "Content", + "text": "number[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "control", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "parameterName": "experiment", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "name": "getWilcoxonSignedRankTest" + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tracerbench/stats!IAsPercentage:type", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare type IAsPercentage = " + }, + { + "kind": "Content", + "text": "{\n percentMin: number;\n percentMedian: number;\n percentMax: number;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "IAsPercentage", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tracerbench/stats!IConfidenceInterval:type", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare type IConfidenceInterval = " + }, + { + "kind": "Content", + "text": "{\n min: number;\n median: number;\n max: number;\n zScore: number;\n isSig: boolean;\n pValue: number;\n U: number;\n asPercent: " + }, + { + "kind": "Reference", + "text": "IAsPercentage", + "canonicalReference": "@tracerbench/stats!IAsPercentage:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "IConfidenceInterval", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tracerbench/stats!IOutliers:interface", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface IOutliers " + } + ], + "releaseTag": "Public", + "name": "IOutliers", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tracerbench/stats!IOutliers#IQR:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "IQR: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "IQR", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tracerbench/stats!IOutliers#lowerOutlier:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "lowerOutlier: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "lowerOutlier", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tracerbench/stats!IOutliers#outliers:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "outliers: " + }, + { + "kind": "Content", + "text": "number[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "outliers", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tracerbench/stats!IOutliers#upperOutlier:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "upperOutlier: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "upperOutlier", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@tracerbench/stats!ISevenFigureSummary:type", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare type ISevenFigureSummary = " + }, + { + "kind": "Content", + "text": "{\n [key in string | number]: number;\n} & {\n min: number;\n max: number;\n 10: number;\n 25: number;\n 50: number;\n 75: number;\n 90: number;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "ISevenFigureSummary", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Interface", + "canonicalReference": "@tracerbench/stats!IStatsOptions:interface", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface IStatsOptions " + } + ], + "releaseTag": "Public", + "name": "IStatsOptions", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@tracerbench/stats!IStatsOptions#confidenceLevel:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "confidenceLevel?: " + }, + { + "kind": "Content", + "text": "0.8 | 0.85 | 0.9 | 0.95 | 0.99 | 0.995 | 0.999" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "confidenceLevel", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tracerbench/stats!IStatsOptions#control:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "control: " + }, + { + "kind": "Content", + "text": "number[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "control", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tracerbench/stats!IStatsOptions#experiment:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "experiment: " + }, + { + "kind": "Content", + "text": "number[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "experiment", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@tracerbench/stats!IStatsOptions#name:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "name", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "@tracerbench/stats!roundFloatAndConvertMicrosecondsToMS:function(1)", + "docComment": "/**\n * Round a float in microseconds and convert it to milliseconds\n *\n * @param ms - Microseconds float as a string or number\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function roundFloatAndConvertMicrosecondsToMS(ms: " + }, + { + "kind": "Content", + "text": "string | number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "ms", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "name": "roundFloatAndConvertMicrosecondsToMS" + }, + { + "kind": "Class", + "canonicalReference": "@tracerbench/stats!Stats:class", + "docComment": "/**\n * Statistics class which powers the TracerBench statistical reporter\n *\n * @param options - IStatsOptions\n *\n * @param unitConverterFn - Optional unit converter function which takes a number and returns a number\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Stats " + } + ], + "releaseTag": "Public", + "name": "Stats", + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@tracerbench/stats!Stats:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `Stats` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(options: " + }, + { + "kind": "Reference", + "text": "IStatsOptions", + "canonicalReference": "@tracerbench/stats!IStatsOptions:interface" + }, + { + "kind": "Content", + "text": ", unitConverterFn?: " + }, + { + "kind": "Content", + "text": "(n: number) => number" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "parameterName": "unitConverterFn", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ] + }, + { + "kind": "Property", + "canonicalReference": "@tracerbench/stats!Stats#buckets:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "buckets: " + }, + { + "kind": "Reference", + "text": "Bucket", + "canonicalReference": "@tracerbench/stats!Bucket:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "buckets", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "@tracerbench/stats!Stats#confidenceInterval:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "confidenceInterval: " + }, + { + "kind": "Reference", + "text": "IConfidenceInterval", + "canonicalReference": "@tracerbench/stats!IConfidenceInterval:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "confidenceInterval", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "@tracerbench/stats!Stats#confidenceIntervals:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "confidenceIntervals: " + }, + { + "kind": "Content", + "text": "{\n [key: number]: " + }, + { + "kind": "Reference", + "text": "IConfidenceInterval", + "canonicalReference": "@tracerbench/stats!IConfidenceInterval:type" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "confidenceIntervals", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "@tracerbench/stats!Stats#control:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "control: " + }, + { + "kind": "Content", + "text": "number[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "control", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "@tracerbench/stats!Stats#controlSorted:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "controlSorted: " + }, + { + "kind": "Content", + "text": "number[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "controlSorted", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "@tracerbench/stats!Stats#estimator:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "estimator: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "estimator", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "@tracerbench/stats!Stats#experiment:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "experiment: " + }, + { + "kind": "Content", + "text": "number[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "experiment", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "@tracerbench/stats!Stats#experimentSorted:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "experimentSorted: " + }, + { + "kind": "Content", + "text": "number[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "experimentSorted", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "@tracerbench/stats!Stats#name:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "name", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "@tracerbench/stats!Stats#outliers:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "outliers: " + }, + { + "kind": "Content", + "text": "{\n control: " + }, + { + "kind": "Reference", + "text": "IOutliers", + "canonicalReference": "@tracerbench/stats!IOutliers:interface" + }, + { + "kind": "Content", + "text": ";\n experiment: " + }, + { + "kind": "Reference", + "text": "IOutliers", + "canonicalReference": "@tracerbench/stats!IOutliers:interface" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "outliers", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "@tracerbench/stats!Stats#populationVariance:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "populationVariance: " + }, + { + "kind": "Content", + "text": "{\n control: number;\n experiment: number;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "populationVariance", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "@tracerbench/stats!Stats#range:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "range: " + }, + { + "kind": "Content", + "text": "{\n min: number;\n max: number;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "range", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "@tracerbench/stats!Stats#sampleCount:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly sampleCount: " + }, + { + "kind": "Content", + "text": "{\n control: number;\n experiment: number;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "sampleCount", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "@tracerbench/stats!Stats#sevenFigureSummary:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "sevenFigureSummary: " + }, + { + "kind": "Content", + "text": "{\n control: " + }, + { + "kind": "Reference", + "text": "ISevenFigureSummary", + "canonicalReference": "@tracerbench/stats!ISevenFigureSummary:type" + }, + { + "kind": "Content", + "text": ";\n experiment: " + }, + { + "kind": "Reference", + "text": "ISevenFigureSummary", + "canonicalReference": "@tracerbench/stats!ISevenFigureSummary:type" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "sevenFigureSummary", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isStatic": false + }, + { + "kind": "Property", + "canonicalReference": "@tracerbench/stats!Stats#sparkLine:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly sparkLine: " + }, + { + "kind": "Content", + "text": "{\n control: string;\n experiment: string;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "sparkLine", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "@tracerbench/stats!toNearestHundreth:function(1)", + "docComment": "/**\n * Round a float to hundreth decimal place\n *\n * @param n - Float as a number\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function toNearestHundreth(n: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "n", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "name": "toNearestHundreth" + } + ] + } + ] +} diff --git a/packages/stats/temp/stats.api.md b/packages/stats/temp/stats.api.md new file mode 100644 index 00000000..0c188901 --- /dev/null +++ b/packages/stats/temp/stats.api.md @@ -0,0 +1,148 @@ +## API Report File for "@tracerbench/stats" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +// Warning: (ae-forgotten-export) The symbol "_defaultModifier" needs to be exported by the entry point index.d.ts +// +// @public +export function cartesianProduct(listOne: number[], listTwo: number[], func?: typeof _defaultModifier): number[]; + +// @public +export function confidenceInterval(a: number[], b: number[], confidence: number): Omit; + +// @public +export function convertMicrosecondsToMS(ms: string | number): number; + +// @public +export function convertMSToMicroseconds(ms: string | number): number; + +// @public +export function getWilcoxonRankSumTest(control: number[], experiment: number[]): boolean; + +// @public +export function getWilcoxonSignedRankTest(control: number[], experiment: number[]): boolean; + +// @public (undocumented) +export type IAsPercentage = { + percentMin: number; + percentMedian: number; + percentMax: number; +}; + +// @public (undocumented) +export type IConfidenceInterval = { + min: number; + median: number; + max: number; + zScore: number; + isSig: boolean; + pValue: number; + U: number; + asPercent: IAsPercentage; +}; + +// @public (undocumented) +export interface IOutliers { + // (undocumented) + IQR: number; + // (undocumented) + lowerOutlier: number; + // (undocumented) + outliers: number[]; + // (undocumented) + upperOutlier: number; +} + +// @public (undocumented) +export type ISevenFigureSummary = { + [key in string | number]: number; +} & { + min: number; + max: number; + 10: number; + 25: number; + 50: number; + 75: number; + 90: number; +}; + +// @public (undocumented) +export interface IStatsOptions { + // (undocumented) + confidenceLevel?: 0.8 | 0.85 | 0.9 | 0.95 | 0.99 | 0.995 | 0.999; + // (undocumented) + control: number[]; + // (undocumented) + experiment: number[]; + // (undocumented) + name: string; +} + +// @public +export function roundFloatAndConvertMicrosecondsToMS(ms: string | number): number; + +// @public +export class Stats { + constructor(options: IStatsOptions, unitConverterFn?: (n: number) => number); + // Warning: (ae-forgotten-export) The symbol "Bucket" needs to be exported by the entry point index.d.ts + // + // (undocumented) + buckets: Bucket[]; + // (undocumented) + confidenceInterval: IConfidenceInterval; + // (undocumented) + confidenceIntervals: { + [key: number]: IConfidenceInterval; + }; + // (undocumented) + control: number[]; + // (undocumented) + controlSorted: number[]; + // (undocumented) + estimator: number; + // (undocumented) + experiment: number[]; + // (undocumented) + experimentSorted: number[]; + // (undocumented) + readonly name: string; + // (undocumented) + outliers: { + control: IOutliers; + experiment: IOutliers; + }; + // (undocumented) + populationVariance: { + control: number; + experiment: number; + }; + // (undocumented) + range: { + min: number; + max: number; + }; + // (undocumented) + readonly sampleCount: { + control: number; + experiment: number; + }; + // (undocumented) + sevenFigureSummary: { + control: ISevenFigureSummary; + experiment: ISevenFigureSummary; + }; + // (undocumented) + readonly sparkLine: { + control: string; + experiment: string; + }; +} + +// @public +export function toNearestHundreth(n: number): number; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/yarn.lock b/yarn.lock index b5ad5493..162e386e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1087,6 +1087,61 @@ npmlog "^4.1.2" write-file-atomic "^3.0.3" +"@microsoft/api-documenter@^7.13.54": + version "7.13.54" + resolved "https://registry.yarnpkg.com/@microsoft/api-documenter/-/api-documenter-7.13.54.tgz#d6eacf912250e57c36589650b84443868cdc2a09" + integrity sha512-Ar1e2xcQzGhl3W6z2I6a5cS+a5yXMbZP4cThzwrOR+Vc4rfgQnIQnuZWYPVKdU5UejCgLvUwc8LDMPisUleJQQ== + dependencies: + "@microsoft/api-extractor-model" "7.13.9" + "@microsoft/tsdoc" "0.13.2" + "@rushstack/node-core-library" "3.41.0" + "@rushstack/ts-command-line" "4.9.1" + colors "~1.2.1" + js-yaml "~3.13.1" + resolve "~1.17.0" + +"@microsoft/api-extractor-model@7.13.9": + version "7.13.9" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.13.9.tgz#018fb37ac0147595832e13db17509f6adafbad9c" + integrity sha512-t/XKTr8MlHRWgDr1fkyCzTQRR5XICf/WzIFs8yw1JLU8Olw99M3by4/dtpOZNskfqoW+J8NwOxovduU2csi4Ww== + dependencies: + "@microsoft/tsdoc" "0.13.2" + "@microsoft/tsdoc-config" "~0.15.2" + "@rushstack/node-core-library" "3.41.0" + +"@microsoft/api-extractor@^7.18.11": + version "7.18.11" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.18.11.tgz#24910c2432362b09900b493a0713919b662cdb0f" + integrity sha512-WfN5MZry4TrF60OOcGadFDsGECF9JNKNT+8P/8crYAumAYQRitI2cUiQRlCWrgmFgCWNezsNZeI/2BggdnUqcg== + dependencies: + "@microsoft/api-extractor-model" "7.13.9" + "@microsoft/tsdoc" "0.13.2" + "@microsoft/tsdoc-config" "~0.15.2" + "@rushstack/node-core-library" "3.41.0" + "@rushstack/rig-package" "0.3.1" + "@rushstack/ts-command-line" "4.9.1" + colors "~1.2.1" + lodash "~4.17.15" + resolve "~1.17.0" + semver "~7.3.0" + source-map "~0.6.1" + typescript "~4.4.2" + +"@microsoft/tsdoc-config@~0.15.2": + version "0.15.2" + resolved "https://registry.yarnpkg.com/@microsoft/tsdoc-config/-/tsdoc-config-0.15.2.tgz#eb353c93f3b62ab74bdc9ab6f4a82bcf80140f14" + integrity sha512-mK19b2wJHSdNf8znXSMYVShAHktVr/ib0Ck2FA3lsVBSEhSI/TfXT7DJQkAYgcztTuwazGcg58ZjYdk0hTCVrA== + dependencies: + "@microsoft/tsdoc" "0.13.2" + ajv "~6.12.6" + jju "~1.4.0" + resolve "~1.19.0" + +"@microsoft/tsdoc@0.13.2": + version "0.13.2" + resolved "https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.13.2.tgz#3b0efb6d3903bd49edb073696f60e90df08efb26" + integrity sha512-WrHvO8PDL8wd8T2+zBGKrMwVL5IyzR3ryWUsl0PXgEV0QHup4mTLi0QcATefGI6Gx9Anu7vthPyyyLpY0EpiQg== + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -1384,6 +1439,39 @@ dependencies: "@octokit/openapi-types" "^8.3.0" +"@rushstack/node-core-library@3.41.0": + version "3.41.0" + resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.41.0.tgz#36f79ecf1a3c9b417690d95bbfcdf40390bf5f51" + integrity sha512-JxdmqR+SHU04jTDaZhltMZL3/XTz2ZZM47DTN+FSPUGUVp6WmxLlvJnT5FoHrOZWUjL/FoIlZUdUPTSXjTjIcg== + dependencies: + "@types/node" "12.20.24" + colors "~1.2.1" + fs-extra "~7.0.1" + import-lazy "~4.0.0" + jju "~1.4.0" + resolve "~1.17.0" + semver "~7.3.0" + timsort "~0.3.0" + z-schema "~3.18.3" + +"@rushstack/rig-package@0.3.1": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.3.1.tgz#b70ab9ffe3b6347eb799f5c6c5b6f5882039a60f" + integrity sha512-DXQmrPWOCNoE2zPzHCShE1y47FlgbAg48wpaY058Qo/yKDzL0GlEGf5Ra2NIt22pMcp0R/HHh+kZGbqTnF4CrA== + dependencies: + resolve "~1.17.0" + strip-json-comments "~3.1.1" + +"@rushstack/ts-command-line@4.9.1": + version "4.9.1" + resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.9.1.tgz#9fe594a408c7ef1b67f57b41ba931ecd3f420e92" + integrity sha512-zzoWB6OqVbMjnxlxbAUqbZqDWITUSHqwFCx7JbH5CVrjR9kcsB4NeWkN1I8GcR92beiOGvO3yPlB2NRo5Ugh+A== + dependencies: + "@types/argparse" "1.0.38" + argparse "~1.0.9" + colors "~1.2.1" + string-argv "~0.3.1" + "@samverschueren/stream-to-observable@^0.3.0": version "0.3.1" resolved "https://registry.yarnpkg.com/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.1.tgz#a21117b19ee9be70c379ec1877537ef2e1c63301" @@ -1487,6 +1575,11 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.1.tgz#a6ca6a9a0ff366af433f42f5f0e124794ff6b8f1" integrity sha512-FTgBI767POY/lKNDNbIzgAX6miIDBs6NTCbdlDb8TrWovHsSvaVIZDlTqym29C6UqhzwcJx4CYr+AlrMywA0cA== +"@types/argparse@1.0.38": + version "1.0.38" + resolved "https://registry.yarnpkg.com/@types/argparse/-/argparse-1.0.38.tgz#a81fd8606d481f873a3800c6ebae4f1d768a56a9" + integrity sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA== + "@types/chai@*", "@types/chai@^4.2.17", "@types/chai@^4.2.21": version "4.2.21" resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.21.tgz#9f35a5643129df132cf3b5c1ec64046ea1af0650" @@ -1622,6 +1715,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-16.3.3.tgz#0c30adff37bbbc7a50eb9b58fae2a504d0d88038" integrity sha512-8h7k1YgQKxKXWckzFCMfsIwn0Y61UK6tlD6y2lOb3hTOIMlK3t9/QwHOhc81TwU+RMf0As5fj7NPjroERCnejQ== +"@types/node@12.20.24": + version "12.20.24" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.24.tgz#c37ac69cb2948afb4cef95f424fa0037971a9a5c" + integrity sha512-yxDeaQIAJlMav7fH5AQqPH1u8YIuhYJXYBzxaQ4PifsU0GDO38MSdmEDeRlIxrKbC6NbEaaEHDanWb+y30U8SQ== + "@types/node@^14.14.33": version "14.17.5" resolved "https://registry.yarnpkg.com/@types/node/-/node-14.17.5.tgz#b59daf6a7ffa461b5648456ca59050ba8e40ed54" @@ -1816,7 +1914,7 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" -ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4: +ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4, ajv@~6.12.6: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -1974,7 +2072,7 @@ arg@^4.1.0: resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== -argparse@^1.0.7: +argparse@^1.0.7, argparse@~1.0.9: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== @@ -2598,6 +2696,11 @@ colors@^1.1.2: resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== +colors@~1.2.1: + version "1.2.5" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.2.5.tgz#89c7ad9a374bc030df8013241f68136ed8835afc" + integrity sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg== + columnify@^1.5.4: version "1.5.4" resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb" @@ -2613,7 +2716,7 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -commander@^2.20.0: +commander@^2.20.0, commander@^2.7.1: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -3839,7 +3942,7 @@ fs-extra@^6.0.1: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@^7.0.0: +fs-extra@^7.0.0, fs-extra@~7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== @@ -4363,6 +4466,11 @@ import-fresh@^3.0.0, import-fresh@^3.2.1: parent-module "^1.0.0" resolve-from "^4.0.0" +import-lazy@~4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-4.0.0.tgz#e8eb627483a0a43da3c03f3e35548be5cb0cc153" + integrity sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw== + import-local@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.0.2.tgz#a8cfd0431d1de4a2199703d003e3e62364fa6db6" @@ -4493,6 +4601,13 @@ is-ci@^2.0.0: dependencies: ci-info "^2.0.0" +is-core-module@^2.1.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.7.0.tgz#3c0ef7d31b4acfc574f80c58409d568a836848e3" + integrity sha512-ByY+tjCciCr+9nLryBYcSD50EOGWt95c7tIsKTG1J2ixKKXPvF7Ej3AVd+UfDydAJom3biBGDBALaO79ktwgEQ== + dependencies: + has "^1.0.3" + is-core-module@^2.2.0, is-core-module@^2.4.0: version "2.5.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.5.0.tgz#f754843617c70bfd29b7bd87327400cda5c18491" @@ -4755,6 +4870,11 @@ istanbul-reports@^3.0.2: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" +jju@~1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/jju/-/jju-1.4.0.tgz#a3abe2718af241a2b2904f84a625970f389ae32a" + integrity sha1-o6vicYryQaKykE+EpiWXDzia4yo= + jquery@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.6.0.tgz#c72a09f15c1bdce142f49dbf1170bdf8adac2470" @@ -4787,6 +4907,14 @@ js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@~3.13.1: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" @@ -5119,6 +5247,16 @@ lodash.flattendeep@^4.4.0: resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" integrity sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI= +lodash.get@^4.0.0: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" + integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= + +lodash.isequal@^4.0.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA= + lodash.ismatch@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37" @@ -5179,7 +5317,7 @@ lodash.upperfirst@4.3.1: resolved "https://registry.yarnpkg.com/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce" integrity sha1-E2Xt9DFIBIHvDRxolXpe2Z1J984= -lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.7.0: +lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.7.0, lodash@~4.17.15: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -6804,6 +6942,21 @@ resolve@^1.10.0, resolve@^1.13.1, resolve@^1.20.0: is-core-module "^2.2.0" path-parse "^1.0.6" +resolve@~1.17.0: + version "1.17.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== + dependencies: + path-parse "^1.0.6" + +resolve@~1.19.0: + version "1.19.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" + integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== + dependencies: + is-core-module "^2.1.0" + path-parse "^1.0.6" + restore-cursor@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" @@ -6883,7 +7036,7 @@ safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@7.3.5, semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5: +semver@7.3.5, semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@~7.3.0: version "7.3.5" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== @@ -7141,6 +7294,11 @@ strict-uri-encode@^2.0.0: resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" integrity sha1-ucczDHBChi9rFC3CdLvMWGbONUY= +string-argv@~0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" + integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== + string-width@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" @@ -7245,7 +7403,7 @@ strip-indent@^3.0.0: dependencies: min-indent "^1.0.0" -strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.1, strip-json-comments@~3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -7455,6 +7613,11 @@ timers-ext@^0.1.7: es5-ext "~0.10.46" next-tick "1" +timsort@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" + integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q= + tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -7680,6 +7843,11 @@ typescript@~4.2.3: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.4.tgz#8610b59747de028fda898a8aef0e103f156d0961" integrity sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg== +typescript@~4.4.2: + version "4.4.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.3.tgz#bdc5407caa2b109efd4f82fe130656f977a29324" + integrity sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA== + uglify-js@^3.1.4: version "3.13.10" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.13.10.tgz#a6bd0d28d38f592c3adb6b180ea6e07e1e540a8d" @@ -7790,6 +7958,11 @@ validate-npm-package-name@^3.0.0: dependencies: builtins "^1.0.3" +validator@^8.0.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/validator/-/validator-8.2.0.tgz#3c1237290e37092355344fef78c231249dab77b9" + integrity sha512-Yw5wW34fSv5spzTXNkokD6S6/Oq92d8q/t14TqsS3fAiA1RYnxSFSIZ+CY3n6PGGRCq5HhJTSepQvFUS2QUDxA== + verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" @@ -8092,6 +8265,17 @@ yocto-queue@^0.1.0: resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== +z-schema@~3.18.3: + version "3.18.4" + resolved "https://registry.yarnpkg.com/z-schema/-/z-schema-3.18.4.tgz#ea8132b279533ee60be2485a02f7e3e42541a9a2" + integrity sha512-DUOKC/IhbkdLKKiV89gw9DUauTV8U/8yJl1sjf6MtDmzevLKOF2duNJ495S3MFVjqZarr+qNGCPbkg4mu4PpLw== + dependencies: + lodash.get "^4.0.0" + lodash.isequal "^4.0.0" + validator "^8.0.0" + optionalDependencies: + commander "^2.7.1" + zip-stream@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/zip-stream/-/zip-stream-4.1.0.tgz#51dd326571544e36aa3f756430b313576dc8fc79"