Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ judge result #69

Merged
merged 2 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions judge-control-app/src/models.rs
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
pub mod judge_recipe;
pub mod judge_result;
24 changes: 24 additions & 0 deletions judge-control-app/src/models/judge_result.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
pub enum JudgeStatus {
Accepted,
WrongAnswer,
TimeLimitExceeded,
MemoryLimitExceeded,
OutputLimitExceeded,
RuntimeError,
CompileError,
InternalError,
}

pub struct SubmitResult {
pub judge_id: uuid::Uuid,
pub test_results: Vec<TestResult>,
pub total_result: TestResult,
}

pub struct TestResult {
pub status: JudgeStatus,
pub text: Option<String>,
pub score: f64,
pub exec_time: f64,
pub memory_size: f64,
}