ExecutionResult model represents the outcome of a code execution operation. It contains the program output, exit code, and execution time metrics.
Fields
The combined standard output (stdout) and standard error (stderr) from the executed code. This contains all text printed or logged by the program during execution.
The exit code from the Docker container execution. Currently, this value is always set to
0 in the implementation, regardless of whether the code compiled or executed successfully. Check the output field for compilation errors or runtime exceptions.The total time taken to execute the code, measured in milliseconds. This includes the time to start the Docker container, run the code, and capture the output.
Example
Successful execution
Execution with error
Java class
This model is defined in the backend as:Usage
TheExecutionResult is wrapped in an ApiResponse<ExecutionResult> when returned from the /api/execute endpoint. See the Execute Code endpoint documentation for complete response examples.
The execution time includes container startup overhead. Subsequent executions may be faster due to Docker image caching.