示例#1
0
    def populate_result(self, stderr: bytes, result: Result,
                        process: TracedPopen) -> None:
        # Translate status codes/process results into Result object for status codes
        result.max_memory = process.max_memory or 0.0
        result.execution_time = process.execution_time or 0.0
        result.wall_clock_time = process.wall_clock_time or 0.0

        if process.is_ir:
            result.result_flag |= Result.IR
        if process.is_rte:
            result.result_flag |= Result.RTE
        if process.is_ole:
            result.result_flag |= Result.OLE
        if process.is_tle:
            result.result_flag |= Result.TLE
        if process.is_mle:
            result.result_flag |= Result.MLE

        result.update_feedback(stderr, process, self)
示例#2
0
    def populate_result(self, stderr: bytes, result: Result,
                        process: TracedPopen) -> None:
        # Translate status codes/process results into Result object for status codes
        result.max_memory = process.max_memory or 0.0
        result.execution_time = process.execution_time or 0.0
        result.wall_clock_time = process.wall_clock_time or 0.0
        result.context_switches = process.context_switches or (0, 0)
        result.runtime_version = ', '.join(
            f'{runtime} {".".join(map(str, version))}'
            for runtime, version in self.get_runtime_versions())

        if process.is_ir:
            result.result_flag |= Result.IR
        if process.is_rte:
            result.result_flag |= Result.RTE
        if process.is_ole:
            result.result_flag |= Result.OLE
        if process.is_tle:
            result.result_flag |= Result.TLE
        if process.is_mle:
            result.result_flag |= Result.MLE

        result.update_feedback(stderr, process, self)