Documentation
    Preparing search index...

    Interface IServantProps<Parameters>

    Properties of the servant program.

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

    Type Parameters

    • Parameters extends any[]
    Index
    connection: IConnection

    Default connection.

    Default connection to be used in the servant.

    extension?: string

    Extension of the benchmark function files to load, without the leading dot.

    The servant reads location and imports every file ending with this extension. Set it to match how the feature files are actually run: "js" when they are built JavaScript, or "ts" when they are executed from TypeScript source (for example under ttsx).

    "js"
    
    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. Also, when a file name (basename) does not start with the prefix, the file would never be imported either, so that every function defined in the file would never be executed.