Properties of the servant progrma.

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

Type Parameters

  • Parameters extends any[]

Properties

connection: IConnection<undefined | object>

Default connection.

Default connection to be used in the servant.

location: string

Location of the benchmark functions.

parameters: (
    connection: IConnection<undefined | object>,
    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

    • (connection: IConnection<undefined | object>, name: string): Parameters
    • Parameters

      • connection: IConnection<undefined | object>

        Default connection instance

      • name: string

        Function name

      Returns Parameters

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.