Documentation
¶
Index ¶
Constants ¶
View Source
const ErrorInvalidOiejqResults = "invalid oiejq results returned"
View Source
const ErrorPerfEventParanoid = "to use oiejq you have to run `sudo sysctl kernel.perf_event_paranoid=-1`"
Variables ¶
View Source
var Verdicts = []VerdictStatus{ OK, WA, TLE, MLE, OLE, RE, INT, }
Functions ¶
func ExtractTaskName ¶
func InstallSio2Jail ¶
func InstallSio2Jail() (err error)
func ParseMemory ¶ added in v0.11.1
Types ¶
type OiejqOptions ¶ added in v0.10.0
type ProcessInfo ¶
type ProcessInfo struct { Status VerdictStatus TimeInSeconds float64 MemoryInMegabytes float64 Output []byte Stderr []byte }
func RunProcess ¶
func RunProcessWithOiejq ¶
func RunProcessWithOiejq(command string, input io.Reader, oiejqOptions *OiejqOptions) (oiejqProcessInfo ProcessInfo, err error)
type Verdict ¶
type Verdict struct { Status VerdictStatus TimeInSeconds float64 MemoryInMegabytes float64 Message string Err error }
func GenerateVerdict ¶
func GenerateVerdict(testID, answer string, processInfo ProcessInfo) Verdict
func Judge ¶
func Judge(inPath, ansPath, sampleID, command string, oiejqOptions *OiejqOptions) Verdict
type VerdictStatus ¶ added in v0.11.1
type VerdictStatus string
const ( OK VerdictStatus = "OK" WA VerdictStatus = "WA" TLE VerdictStatus = "TLE" MLE VerdictStatus = "MLE" OLE VerdictStatus = "OLE" RE VerdictStatus = "RE" INT VerdictStatus = "INT" )
Click to show internal directories.
Click to hide internal directories.