Script for recomputing task time limits.
Review Request #177 - Created Sept. 21, 2011 and updated
Information | |
---|---|
Bogdan-Cristian Tătăroiu | |
infoarena | |
Reviewers | |
hackers | |
What it does is for each task, divide the submitted jobs into buckets based on how many TLEs each job has received and try to select the most representative 5 jobs for each bucket (configurable JOBS_PER_TASK and BUCKETS constants). The jobs are selected in decresing order of score and increasing order of total execution time and are chosen such that no bucket will contain 2 jobs from the same user (this prevents rejudging a number of basically identical jobs with minor changes between them). After the jobs are selected, they are rejudged with a big time limit to determine the new execution times for each test. A new time limit is then computed that yields as close results to the original as possible. This script should NOT be run on a live database as it changes scores for some jobs. The script is supposed to be run on a full copy of the database hosted somewhere else, and then the recomputed time limits should be imported into the live database.
I feel that there are too many mysql queries. Isn't there a way to lower the number of queries?
-
trunk/scripts/recompute-time-limits (Diff revision 1) -
define("IA_TLE_MESSAGE", "Time limit exceeded").
-
trunk/scripts/recompute-time-limits (Diff revision 1) -
you can do a is_possible_tle($test, $time_limit, $eps).
-
trunk/scripts/recompute-time-limits (Diff revision 1) -
use constants goddamit. Who thaught how to code? :)
-
trunk/scripts/recompute-time-limits (Diff revision 1) -
why count(points) and not count(*). Aren't they the same thing?
-
trunk/scripts/recompute-time-limits (Diff revision 1) -
what is this for?
-
trunk/scripts/recompute-time-limits (Diff revision 1) -
2 instructions on the same line, ntz ntz ntz. Also do best_rating = get_time_rating(TIME_EPS), I don't like the use of 0x3f3f3f.