Skip to main content
Version: v0.1

Interface IExecutionStage

Description

The implementation will be invoked when running the compiled source code with specific test data.

Methods

Execute test point

Signature

Task<ExecutionResult> ExecuteAsync(string directory, TestPointData testPoint);

Parameters

  • directory: string: The path to the directory where the record should be processed in.
  • testPoint: TestPointData: The test point data.
TestPointData
TestPointData(
long Order,
string Input,
string ExpectedOutput,
long TimeLimitMilliseconds,
long MemoryLimitBytes
);

Returns

ExecutionResult: The execution result.

ExecutionResult
ExecutionResult(
long recordId,
long order,
ExecutionResultType type,
string output,
long timeMilliseconds,
long peakMemoryBytes
);

recordId and order are set by Executor internally, the plugin should only set other properties, which are required by the constructor.

Usage

Executes the stage asynchronously.

Set logger

Signature

void SetLogger(ILogger logger);

Parameters

  • logger: ILogger: The logger for the plugin generated by Executor.

Usage

Invoked once the implementation instance being created.