Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalcMaxScores ¶
func CalcMaxScores(userSubms []SubmJoinScoreInfo) map[string]MaxScore
returns a map of task short ids to the max received score the user has received on a subm for that task
Types ¶
type Eval ¶
type Eval struct {
UUID uuid.UUID
SubmUUID uuid.UUID
Stage EvalStage
ScoreUnit ScoreUnit
Error *EvalError
Subtasks []Subtask
Groups []TestGroup
Tests []Test
Checker *string
Interactor *string
CpuLimMs int
MemLimKiB int
CreatedAt time.Time
}
func (*Eval) CalculateScore ¶
CalculateScore calculates scoring information from an evaluation
type EvalError ¶
type EvalError struct {
Type EvalErrorType
Message *string
}
type EvalErrorType ¶
type EvalErrorType string
const ( ErrorTypeCompilation EvalErrorType = "compilation" ErrorTypeInternal EvalErrorType = "internal" )
type MaxScore ¶
type MaxScore struct {
SubmUuid uuid.UUID
Received int
Possible int
FirstTime time.Time // first time the user got a score this high
}
max score the user has received on a subm for a specific task
type ScoreBarInfo ¶
type ScoreBarInfo struct {
Green int // accepted tests
Red int // wrong/failed tests
Gray int // not reached tests
Yellow int // in progress tests
Purple int // evaluation error
}
ScoreBarInfo contains the percentage distribution of test results
type ScoreInfo ¶
type ScoreInfo struct {
ScoreBar ScoreBarInfo
ReceivedScore int
PossibleScore int
MaxCpuMs int
MaxMemKiB int
ExceededCpu bool
ExceededMem bool
}
ScoreInfo contains all scoring related information for an evaluation
type SubmJoinEvalOld ¶
type SubmJoinScoreInfo ¶
type Test ¶
type Test struct {
Ac bool // accepted
Wa bool // wrong answer
Tle bool // time limit exceeded
Mle bool // memory limit exceeded
Re bool // runtime error
Ig bool // ignored
Reached bool // reached by tester
Finished bool // has finished
InpSha256 string
AnsSha256 string
CpuMs *int // cpu exec 'user' time in milliseconds (nullable)
MemKiB *int // rss memory in kibibytes (nullable)
}
Click to show internal directories.
Click to hide internal directories.