Documentation
    Preparing search index...

    Properties of the master program.

    interface IMasterProps {
        count: number;
        filter?: (file: string) => boolean;
        memory?: () => Promise<MemoryUsage>;
        progress?: (complete: number) => void;
        servant: string;
        simultaneous: number;
        stdio?: "overlapped" | "pipe" | "ignore" | "inherit";
        threads: number;
    }
    Index

    Properties

    count: number

    Total count of the requests.

    filter?: (file: string) => boolean

    Filter function.

    The filter function is called with the file name (basename) of each benchmark function module, not with the function name. When it returns false, the file would never be imported in the servant, so that every function defined in the file would never be executed either.

    Type Declaration

      • (file: string): boolean
      • Parameters

        • file: string

          File name (basename) of the benchmark functions

        Returns boolean

        Whether to execute the function or not.

    memory?: () => Promise<MemoryUsage>

    Get memory usage.

    Get the memory usage of the master program.

    Specify this property only when your backend server is running on a different process, so that need to measure the memory usage of the backend server from other process.

    progress?: (complete: number) => void

    Progress callback function.

    Type Declaration

      • (complete: number): void
      • Parameters

        • complete: number

          The number of completed requests.

        Returns void

    servant: string

    Path of the servant program.

    The path of the servant program executing the DynamicBenchmarker.servant function.

    simultaneous: number

    Number of simultaneous requests.

    The number of requests to be executed simultaneously.

    This property value would be divided by the threads in the servants.

    stdio?: "overlapped" | "pipe" | "ignore" | "inherit"

    Standard I/O option.

    The standard I/O option for the servant programs.

    threads: number

    Number of threads.

    The number of threads to be executed as parallel servant.