react-native-benchmark
Version:
React Native benchmarking library inspired by benchmark.js
86 lines (85 loc) • 1.93 kB
TypeScript
/**
* The default options copied by benchmark instances.
*
*/
export declare type Options = {
/**
* A flag to indicate that benchmark cycles will execute asynchronously
* by default.
*
*/
async?: boolean;
/**
* A flag to indicate that the benchmark clock is deferred.
*
*/
defer?: boolean;
/**
* The delay between test cycles (secs).
*/
delay?: number;
/**
* Displayed by `Benchmark#toString` when a `name` is not available
* (auto-generated if absent).
*
*/
id?: string;
/**
* The default number of times to execute a test on a benchmark's first cycle.
*
*/
initCount?: number;
/**
* The maximum time a benchmark is allowed to run before finishing (secs).
*
* Note: Cycle delays aren't counted toward the maximum time.
*
*/
maxTime?: number;
/**
* The minimum sample size required to perform statistical analysis.
*
*/
minSamples?: number;
/**
* The time needed to reduce the percent uncertainty of measurement to 1% (secs).
*
*/
minTime?: number;
/**
* The name of the benchmark.
*
*/
name?: string;
/**
* An event listener called when the benchmark is aborted.
*
*/
onAbort?: Function;
/**
* An event listener called when the benchmark completes running.
*
*/
onComplete?: Function;
/**
* An event listener called after each run cycle.
*
*/
onCycle?: Function;
/**
* An event listener called when a test errors.
*
*/
onError?: Function;
/**
* An event listener called when the benchmark is reset.
*
*/
onReset?: Function;
/**
* An event listener called when the benchmark starts running.
*
*/
onStart?: Function;
};
export declare const defaultOptions: Options;