-
Notifications
You must be signed in to change notification settings - Fork 32
i_1280 Fix max_run_time #1293
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
base: regionals2026
Are you sure you want to change the base?
i_1280 Fix max_run_time #1293
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| // Copyright (C) 1989-2025 PC2 Development Team: John Clevenger, Douglas Lane, Samir Ashoo, and Troy Boudreau. | ||
| // Copyright (C) 1989-2026 PC2 Development Team: John Clevenger, Douglas Lane, Samir Ashoo, and Troy Boudreau. | ||
| package edu.csus.ecs.pc2.core.execute; | ||
|
|
||
| import java.io.Serializable; | ||
|
|
@@ -55,6 +55,8 @@ public class ExecutionData implements Serializable { | |
|
|
||
| private long executeTimeMS = 0; | ||
|
|
||
| private long maxExecuteTimeMS = 0; | ||
|
|
||
| private long validateTimeMS = 0; | ||
|
|
||
| private Exception executionException = null; | ||
|
|
@@ -66,7 +68,7 @@ public class ExecutionData implements Serializable { | |
| private boolean failedToCompile = false; | ||
|
|
||
| private String additionalInformation = ""; | ||
|
|
||
| //fields associated with "point-scoring" contests | ||
| private double score ; | ||
| private CLICS_JUDGEMENT_ACRONYM judgementAcronym ; | ||
|
|
@@ -293,12 +295,20 @@ public long getCompileTimeMS() { | |
|
|
||
| public void setExecuteTimeMS(long inExecuteTime){ | ||
| executeTimeMS = inExecuteTime; | ||
| // Keep track of longest execution time | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I recall correctly how the code works, there is a separate
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Recall I wrote up a document explaining how ExecutionData is used. Here is a link: PC2 Execution Data Class |
||
| if(executeTimeMS > maxExecuteTimeMS) { | ||
| maxExecuteTimeMS = executeTimeMS; | ||
| } | ||
| } | ||
|
|
||
| public long getExecuteTimeMS(){ | ||
| return executeTimeMS; | ||
| } | ||
|
|
||
| public long getMaxExecuteTimeMS() { | ||
| return maxExecuteTimeMS; | ||
| } | ||
|
|
||
| public void setvalidateTimeMS(long validateTime){ | ||
| validateTimeMS = validateTime; | ||
| } | ||
|
|
@@ -415,7 +425,7 @@ public String toString() { | |
|
|
||
| return retStr; | ||
| } | ||
|
|
||
| /** | ||
| * When the same execute data is to be used between successive test cases, certain fields should be reset. | ||
| * Specifically, those related to the actual execution and validation of the test case run. | ||
|
|
@@ -439,7 +449,7 @@ public void ResetExecuteCallResults() { | |
| memoryLimitExceeded = false; | ||
| failedToCompile = false; | ||
| additionalInformation = ""; | ||
|
|
||
| //fields associated with "point-scoring" contests | ||
| double score = 0; | ||
| CLICS_JUDGEMENT_ACRONYM judgementAcronym = null; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| // Copyright (C) 1989-2025 PC2 Development Team: John Clevenger, Douglas Lane, Samir Ashoo, and Troy Boudreau. | ||
| // Copyright (C) 1989-2026 PC2 Development Team: John Clevenger, Douglas Lane, Samir Ashoo, and Troy Boudreau. | ||
| package edu.csus.ecs.pc2.ui; | ||
|
|
||
| import java.util.ArrayList; | ||
|
|
@@ -610,12 +610,12 @@ private void executeAndAutoJudgeRun() { | |
|
|
||
| judgementRecord = new JudgementRecord(elementId, contest.getClientId(), solved, true, true); | ||
| judgementRecord.setValidatorResultString(results); | ||
|
|
||
| //if it's a point-scoring contest, put the score and the judgement into the JudgementRecord | ||
| if (contest.getContestInformation().isScoreboardTypeScore()) { | ||
|
|
||
| judgementRecord.setScore(executionData.getScore()); | ||
|
|
||
| CLICS_JUDGEMENT_ACRONYM acronym = executionData.getJudgementAcronym(); | ||
| String judgementDescription ; | ||
| if (acronym != null) { | ||
|
|
@@ -668,7 +668,7 @@ private void executeAndAutoJudgeRun() { | |
| long milliDiff = cal.getTime().getTime() - startTimeCalendar.getTime().getTime(); | ||
| long totalSeconds = milliDiff / 1000; | ||
| judgementRecord.setHowLongToJudgeInSeconds(totalSeconds); | ||
| judgementRecord.setExecuteMS(executeTimeMS); | ||
| judgementRecord.setExecuteMS(executionData.getMaxExecuteTimeMS()); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The name of the setter now seems inappropriate; it's no longer setting an "execution time", it's setting a "maximum execution time over all the test cases".
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The comment in Keep in mind that |
||
| judgementRecord.setJudgeStartDate(fetchedRun.getJudgeStartDate()); | ||
|
|
||
| runResultFiles = new RunResultFiles(fetchedRun, fetchedRun.getProblemId(), judgementRecord, executable.getExecutionData()); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.