Default connection.
Default connection to be used in the servant.
OptionalextensionExtension 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).
Location of the benchmark functions.
A relative path is resolved against the current working directory of the servant, the same base that lists the directory.
Get parameters of a function.
When composing the parameters, never forget to copy the IConnection.logger property of default connection to the returning parameters.
Default connection instance
Function name
contracts/common.md#principled-implementation A function from the per-request connection and the function name to the argument tuple lets each execution receive a connection whose logger records its events.
contracts/common.md#clear-and-simple-design One callback, called per execution, with the two inputs a caller needs to build arguments.
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.
When no function matches, no request is executed and the report carries no events.
Properties of the servant program.
Platform boundary: The feature location and extension describe native files separately from the connection's protocol address; relative paths use the servant's working directory.
Evidence
contracts/common.md#principled-implementation The fields define how a servant finds benchmark functions (location, extension, prefix) and how it builds their arguments (connection and parameters), which is everything discovery and invocation need.
Evidence
contracts/common.md#clear-and-simple-design A generic property record parameterized by the tuple of function arguments, with the optional extension defaulting to the built JavaScript.
Evidence
contracts/common.md#prohibited-implementation-shortcuts The extension is declared rather than inferred from the servant's own module, which once loaded no feature at all when the library was built and the features ran from TypeScript source.
Evidence
contracts/common.md#meaningful-documentation Each property documents its role, the default extension, the file-name and function-name prefix rules, and what happens when nothing matches.