joint-online-judge / cb4

Joint Online Judge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature] Custom features for VE482 p2

tc-imba opened this issue · comments

In order to bring the final test of VE482 Project 2 to JOJ, we must add some features on JOJ:

multi-threading support

We never considered about multi-threading in JOJ, now we need to have custom multi-threading judgers

  • Set the cpu / thread in docker
  • Add an attribute "min_threads" in config.yaml, and each judger will have a thread attribute as well. Only judgers with threads number larger than min_threads can accept the record

compile / runtime

Now we simply copy these files into the sandboxes, which can be very inefficient. The goal is to cache the unzipped files (instead of the zip file) into a temp directory, and map these files into the sandboxes.

Also, now we have a compile time limit, which is too short. The lemondb can compiles for a long time, so we can set the time longer.

  • Cache the unzipped files
  • auto-clean the out-dated caches
  • Map compile / runtime files into sandboxes
  • Extend the compile time limit

custom score calculation

  • Add an attribute "base_time" in config.yaml
  • Add the score formula in config.yaml
  • Show the score of each test case in records detail page