Documentation
    Preparing search index...

    Interface IServantProps<Parameters>

    Properties of the servant program.

    interface IServantProps<Parameters extends any[]> {
        connection: IConnection;
        location: string;
        parameters: (connection: IConnection, name: string) => Parameters;
        prefix: string;
    }

    Type Parameters

    • Parameters extends any[]
    Index

    Properties

    connection: IConnection

    Default connection.

    Default connection to be used in the servant.

    location: string

    Location of the benchmark functions.

    parameters: (connection: IConnection, name: string) => Parameters

    Get parameters of a function.

    When composing the parameters, never forget to copy the IConnection.logger property of default connection to the returning parameters.

    Type Declaration

    prefix: string

    Prefix of the benchmark functions.

    Every prefixed function will be executed in the servant.

    In other words, if a function name doesn't start with the prefix, then it would never be executed.