add memory limit

This commit is contained in:
2026-04-10 18:45:40 +03:00
parent 86b8d83643
commit a977d4d9f5
13 changed files with 662 additions and 37 deletions

View File

@@ -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