@types/benchmark

  • Version 2.1.0
  • Published
  • 9.01 kB
  • No dependencies
  • MIT license

Install

npm i @types/benchmark
yarn add @types/benchmark
pnpm add @types/benchmark

Overview

TypeScript definitions for Benchmark

Index

Classes

class Benchmark

class Benchmark {}

    constructor

    constructor(fn: string | Function, options?: Benchmark.Options);

      constructor

      constructor(name: string, fn: string | Function, options?: Benchmark.Options);

        constructor

        constructor(name: string, options?: Benchmark.Options);

          constructor

          constructor(options: Benchmark.Options);

            property aborted

            aborted: boolean;

              property compiled

              compiled: string | Function;

                property count

                count: number;

                  property cycles

                  cycles: number;

                    property error

                    error: Error;

                      property fn

                      fn: string | Function;

                        property hz

                        hz: number;

                          property id

                          id: number;

                            property name

                            name: string;

                              property options

                              static options: Benchmark.Options;

                                property platform

                                static platform: Benchmark.Platform;

                                  property running

                                  running: boolean;

                                    property setup

                                    setup: string | Function;

                                      property stats

                                      stats: Benchmark.Stats;

                                        property support

                                        static support: Benchmark.Support;

                                          property teardown

                                          teardown: string | Function;

                                            property times

                                            times: Benchmark.Times;

                                              property version

                                              static version: string;

                                                method abort

                                                abort: () => Benchmark;

                                                  method clone

                                                  clone: (options: Benchmark.Options) => Benchmark;

                                                    method compare

                                                    compare: (benchmark: Benchmark) => number;

                                                      method each

                                                      static each: (obj: Object | any[], callback: Function, thisArg?: any) => void;

                                                        method emit

                                                        emit: (type: string | Object) => any;

                                                          method filter

                                                          static filter: {
                                                          <T>(arr: T[], callback: (value: T) => any, thisArg?: any): T[];
                                                          <T>(arr: T[], filter: string, thisArg?: any): T[];
                                                          };

                                                            method forEach

                                                            static forEach: <T>(
                                                            arr: T[],
                                                            callback: (value: T) => any,
                                                            thisArg?: any
                                                            ) => void;

                                                              method formatNumber

                                                              static formatNumber: (num: number) => string;

                                                                method forOwn

                                                                static forOwn: (obj: Object, callback: Function, thisArg?: any) => void;

                                                                  method has

                                                                  static has: (obj: Object, path: any[] | string) => boolean;

                                                                    method indexOf

                                                                    static indexOf: <T>(arr: T[], value: T, fromIndex?: number) => number;

                                                                      method invoke

                                                                      static invoke: (
                                                                      benches: Benchmark[],
                                                                      name: string | Object,
                                                                      ...args: any[]
                                                                      ) => any[];

                                                                        method join

                                                                        static join: (obj: Object, separator1?: string, separator2?: string) => string;

                                                                          method listeners

                                                                          listeners: (type: string) => Function[];

                                                                            method map

                                                                            static map: <T, K>(arr: T[], callback: (value: T) => K, thisArg?: any) => K[];

                                                                              method off

                                                                              off: {
                                                                              (type?: string, listener?: Function): Benchmark;
                                                                              (types: string[]): Benchmark;
                                                                              };

                                                                                method on

                                                                                on: {
                                                                                (type?: string, listener?: Function): Benchmark;
                                                                                (types: string[]): Benchmark;
                                                                                };

                                                                                  method reduce

                                                                                  static reduce: <T, K>(
                                                                                  arr: T[],
                                                                                  callback: (accumulator: K, value: T) => K,
                                                                                  thisArg?: any
                                                                                  ) => K;

                                                                                    method reset

                                                                                    reset: () => Benchmark;

                                                                                      method run

                                                                                      run: (options?: Benchmark.Options) => Benchmark;

                                                                                        method runInContext

                                                                                        static runInContext: (context: Object) => Function;

                                                                                          method toString

                                                                                          toString: () => string;

                                                                                            class Deferred

                                                                                            class Deferred {}

                                                                                              constructor

                                                                                              constructor(clone: Benchmark);

                                                                                                property benchmark

                                                                                                benchmark: Benchmark;

                                                                                                  property cycles

                                                                                                  cycles: number;

                                                                                                    property elapsed

                                                                                                    elapsed: number;

                                                                                                      property timeStamp

                                                                                                      timeStamp: number;

                                                                                                        method resolve

                                                                                                        resolve: () => void;

                                                                                                          class Event

                                                                                                          class Event {}

                                                                                                            constructor

                                                                                                            constructor(type: string | Object);

                                                                                                              property aborted

                                                                                                              aborted: boolean;

                                                                                                                property cancelled

                                                                                                                cancelled: boolean;

                                                                                                                  property currentTarget

                                                                                                                  currentTarget: Object;

                                                                                                                    property result

                                                                                                                    result: any;

                                                                                                                      property target

                                                                                                                      target: Target;

                                                                                                                        property timeStamp

                                                                                                                        timeStamp: number;

                                                                                                                          property type

                                                                                                                          type: string;

                                                                                                                            class Suite

                                                                                                                            class Suite {}

                                                                                                                              constructor

                                                                                                                              constructor(name?: string, options?: Options);

                                                                                                                                property aborted

                                                                                                                                aborted: boolean;

                                                                                                                                  property length

                                                                                                                                  length: number;

                                                                                                                                    property options

                                                                                                                                    static options: { name: string };

                                                                                                                                      property running

                                                                                                                                      running: boolean;

                                                                                                                                        method abort

                                                                                                                                        abort: () => Suite;

                                                                                                                                          method add

                                                                                                                                          add: {
                                                                                                                                          (name: string, fn: Function | string, options?: Options): Suite;
                                                                                                                                          (fn: string | Function, options?: Options): Suite;
                                                                                                                                          (name: string, options?: Options): Suite;
                                                                                                                                          (options: Options): Suite;
                                                                                                                                          };

                                                                                                                                            method clone

                                                                                                                                            clone: (options: Options) => Suite;

                                                                                                                                              method each

                                                                                                                                              each: (callback: Function) => Suite;

                                                                                                                                                method emit

                                                                                                                                                emit: (type: string | Object) => any;

                                                                                                                                                  method filter

                                                                                                                                                  filter: (callback: Function | string) => Suite;

                                                                                                                                                    method forEach

                                                                                                                                                    forEach: (callback: Function) => Suite;

                                                                                                                                                      method indexOf

                                                                                                                                                      indexOf: (value: any) => number;

                                                                                                                                                        method join

                                                                                                                                                        join: (separator?: string) => string;

                                                                                                                                                          method listeners

                                                                                                                                                          listeners: (type: string) => Function[];

                                                                                                                                                            method map

                                                                                                                                                            map: (callback: Function | string) => any[];

                                                                                                                                                              method off

                                                                                                                                                              off: { (type?: string, callback?: Function): Suite; (types: string[]): Suite };

                                                                                                                                                                method on

                                                                                                                                                                on: { (type?: string, callback?: Function): Suite; (types: string[]): Suite };

                                                                                                                                                                  method pop

                                                                                                                                                                  pop: () => Function;

                                                                                                                                                                    method push

                                                                                                                                                                    push: (benchmark: Benchmark) => number;

                                                                                                                                                                      method reduce

                                                                                                                                                                      reduce: <T>(callback: Function, accumulator: T) => T;

                                                                                                                                                                        method reset

                                                                                                                                                                        reset: () => Suite;

                                                                                                                                                                          method reverse

                                                                                                                                                                          reverse: () => any[];

                                                                                                                                                                            method run

                                                                                                                                                                            run: (options?: Options) => Suite;

                                                                                                                                                                              method shift

                                                                                                                                                                              shift: () => Benchmark;

                                                                                                                                                                                method slice

                                                                                                                                                                                slice: {
                                                                                                                                                                                (start: number, end: number): any[];
                                                                                                                                                                                (start: number, deleteCount: number, ...values: any[]): any[];
                                                                                                                                                                                };

                                                                                                                                                                                  method sort

                                                                                                                                                                                  sort: (compareFn: (a: any, b: any) => number) => any[];

                                                                                                                                                                                    method splice

                                                                                                                                                                                    splice: (start: number, deleteCount?: number) => any[];

                                                                                                                                                                                      method unshift

                                                                                                                                                                                      unshift: (benchmark: Benchmark) => number;

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        interface Options

                                                                                                                                                                                        interface Options {}

                                                                                                                                                                                          property async

                                                                                                                                                                                          async?: boolean;

                                                                                                                                                                                            property defer

                                                                                                                                                                                            defer?: boolean;

                                                                                                                                                                                              property delay

                                                                                                                                                                                              delay?: number;

                                                                                                                                                                                                property fn

                                                                                                                                                                                                fn?: Function | string;

                                                                                                                                                                                                  property id

                                                                                                                                                                                                  id?: string;

                                                                                                                                                                                                    property initCount

                                                                                                                                                                                                    initCount?: number;

                                                                                                                                                                                                      property maxTime

                                                                                                                                                                                                      maxTime?: number;

                                                                                                                                                                                                        property minSamples

                                                                                                                                                                                                        minSamples?: number;

                                                                                                                                                                                                          property minTime

                                                                                                                                                                                                          minTime?: number;

                                                                                                                                                                                                            property name

                                                                                                                                                                                                            name?: string;

                                                                                                                                                                                                              property onAbort

                                                                                                                                                                                                              onAbort?: Function;

                                                                                                                                                                                                                property onComplete

                                                                                                                                                                                                                onComplete?: Function;

                                                                                                                                                                                                                  property onCycle

                                                                                                                                                                                                                  onCycle?: Function;

                                                                                                                                                                                                                    property onError

                                                                                                                                                                                                                    onError?: Function;

                                                                                                                                                                                                                      property onReset

                                                                                                                                                                                                                      onReset?: Function;

                                                                                                                                                                                                                        property onStart

                                                                                                                                                                                                                        onStart?: Function;

                                                                                                                                                                                                                          property queued

                                                                                                                                                                                                                          queued?: boolean;

                                                                                                                                                                                                                            property setup

                                                                                                                                                                                                                            setup?: Function | string;

                                                                                                                                                                                                                              property teardown

                                                                                                                                                                                                                              teardown?: Function | string;

                                                                                                                                                                                                                                interface Platform

                                                                                                                                                                                                                                interface Platform {}

                                                                                                                                                                                                                                  property description

                                                                                                                                                                                                                                  description: string;

                                                                                                                                                                                                                                    property layout

                                                                                                                                                                                                                                    layout: string;

                                                                                                                                                                                                                                      property manufacturer

                                                                                                                                                                                                                                      manufacturer: string;

                                                                                                                                                                                                                                        property name

                                                                                                                                                                                                                                        name: string;

                                                                                                                                                                                                                                          property os

                                                                                                                                                                                                                                          os: string;

                                                                                                                                                                                                                                            property prerelease

                                                                                                                                                                                                                                            prerelease: string;

                                                                                                                                                                                                                                              property product

                                                                                                                                                                                                                                              product: string;

                                                                                                                                                                                                                                                property version

                                                                                                                                                                                                                                                version: string;

                                                                                                                                                                                                                                                  method toString

                                                                                                                                                                                                                                                  toString: () => string;

                                                                                                                                                                                                                                                    interface Stats

                                                                                                                                                                                                                                                    interface Stats {}

                                                                                                                                                                                                                                                      property deviation

                                                                                                                                                                                                                                                      deviation: number;

                                                                                                                                                                                                                                                        property mean

                                                                                                                                                                                                                                                        mean: number;

                                                                                                                                                                                                                                                          property moe

                                                                                                                                                                                                                                                          moe: number;

                                                                                                                                                                                                                                                            property rme

                                                                                                                                                                                                                                                            rme: number;

                                                                                                                                                                                                                                                              property sample

                                                                                                                                                                                                                                                              sample: any[];

                                                                                                                                                                                                                                                                property sem

                                                                                                                                                                                                                                                                sem: number;

                                                                                                                                                                                                                                                                  property variance

                                                                                                                                                                                                                                                                  variance: number;

                                                                                                                                                                                                                                                                    interface Support

                                                                                                                                                                                                                                                                    interface Support {}

                                                                                                                                                                                                                                                                      property browser

                                                                                                                                                                                                                                                                      browser: boolean;

                                                                                                                                                                                                                                                                        property decompilation

                                                                                                                                                                                                                                                                        decompilation: boolean;

                                                                                                                                                                                                                                                                          property timeout

                                                                                                                                                                                                                                                                          timeout: boolean;

                                                                                                                                                                                                                                                                            interface Target

                                                                                                                                                                                                                                                                            interface Target {}

                                                                                                                                                                                                                                                                              property async

                                                                                                                                                                                                                                                                              async?: boolean;

                                                                                                                                                                                                                                                                                property compiled

                                                                                                                                                                                                                                                                                compiled?: Function;

                                                                                                                                                                                                                                                                                  property count

                                                                                                                                                                                                                                                                                  count?: number;

                                                                                                                                                                                                                                                                                    property cycles

                                                                                                                                                                                                                                                                                    cycles?: number;

                                                                                                                                                                                                                                                                                      property defer

                                                                                                                                                                                                                                                                                      defer?: boolean;

                                                                                                                                                                                                                                                                                        property delay

                                                                                                                                                                                                                                                                                        delay?: number;

                                                                                                                                                                                                                                                                                          property fn

                                                                                                                                                                                                                                                                                          fn?: Function;

                                                                                                                                                                                                                                                                                            property hz

                                                                                                                                                                                                                                                                                            hz?: number;

                                                                                                                                                                                                                                                                                              property id

                                                                                                                                                                                                                                                                                              id: number;

                                                                                                                                                                                                                                                                                                property initCount

                                                                                                                                                                                                                                                                                                initCount?: number;

                                                                                                                                                                                                                                                                                                  property maxTime

                                                                                                                                                                                                                                                                                                  maxTime?: number;

                                                                                                                                                                                                                                                                                                    property minSamples

                                                                                                                                                                                                                                                                                                    minSamples?: number;

                                                                                                                                                                                                                                                                                                      property minTime

                                                                                                                                                                                                                                                                                                      minTime?: number;

                                                                                                                                                                                                                                                                                                        property name

                                                                                                                                                                                                                                                                                                        name?: string;

                                                                                                                                                                                                                                                                                                          property options

                                                                                                                                                                                                                                                                                                          options: Options;

                                                                                                                                                                                                                                                                                                            property running

                                                                                                                                                                                                                                                                                                            running: boolean;

                                                                                                                                                                                                                                                                                                              property stats

                                                                                                                                                                                                                                                                                                              stats?: Stats;

                                                                                                                                                                                                                                                                                                                property times

                                                                                                                                                                                                                                                                                                                times?: Times;

                                                                                                                                                                                                                                                                                                                  interface Times

                                                                                                                                                                                                                                                                                                                  interface Times {}

                                                                                                                                                                                                                                                                                                                    property cycle

                                                                                                                                                                                                                                                                                                                    cycle: number;

                                                                                                                                                                                                                                                                                                                      property elapsed

                                                                                                                                                                                                                                                                                                                      elapsed: number;

                                                                                                                                                                                                                                                                                                                        property period

                                                                                                                                                                                                                                                                                                                        period: number;

                                                                                                                                                                                                                                                                                                                          property timeStamp

                                                                                                                                                                                                                                                                                                                          timeStamp: number;

                                                                                                                                                                                                                                                                                                                            Package Files (1)

                                                                                                                                                                                                                                                                                                                            Dependencies (0)

                                                                                                                                                                                                                                                                                                                            No dependencies.

                                                                                                                                                                                                                                                                                                                            Dev Dependencies (0)

                                                                                                                                                                                                                                                                                                                            No dev dependencies.

                                                                                                                                                                                                                                                                                                                            Peer Dependencies (0)

                                                                                                                                                                                                                                                                                                                            No peer dependencies.

                                                                                                                                                                                                                                                                                                                            Badge

                                                                                                                                                                                                                                                                                                                            To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                                                                                                                                                                                                            You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/benchmark.

                                                                                                                                                                                                                                                                                                                            • Markdown
                                                                                                                                                                                                                                                                                                                              [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/benchmark)
                                                                                                                                                                                                                                                                                                                            • HTML
                                                                                                                                                                                                                                                                                                                              <a href="https://www.jsdocs.io/package/@types/benchmark"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>