add memory limit
This commit is contained in:
@@ -11,6 +11,7 @@ const (
|
||||
StatusPass Status = iota
|
||||
StatusFail
|
||||
StatusTLE
|
||||
StatusMLE
|
||||
StatusBuildError
|
||||
StatusRuntimeError
|
||||
)
|
||||
@@ -23,6 +24,8 @@ func (s Status) String() string {
|
||||
return "FAIL"
|
||||
case StatusTLE:
|
||||
return "TLE"
|
||||
case StatusMLE:
|
||||
return "MLE"
|
||||
case StatusBuildError:
|
||||
return "BUILD_ERROR"
|
||||
case StatusRuntimeError:
|
||||
@@ -37,6 +40,9 @@ type TestResult struct {
|
||||
Status Status
|
||||
Elapsed time.Duration
|
||||
|
||||
PeakMemory int64 // bytes; 0 if not measured
|
||||
MemoryLimit int64 // bytes; 0 if unlimited
|
||||
|
||||
Failures []string
|
||||
|
||||
ActualStdout string
|
||||
|
||||
Reference in New Issue
Block a user