mirror of
https://github.com/QingdaoU/JudgeServer.git
synced 2025-11-04 14:50:01 +08:00
优化部分逻辑
This commit is contained in:
parent
eb5785d58f
commit
56a7907ad8
@ -12,14 +12,13 @@ c_lang_config = {
|
|||||||
},
|
},
|
||||||
"run": {
|
"run": {
|
||||||
"command": "{exe_path}",
|
"command": "{exe_path}",
|
||||||
"seccomp_rule": None,
|
"seccomp_rule": None
|
||||||
"max_process_number": -1
|
|
||||||
},
|
},
|
||||||
"spj_compile": {
|
"spj_compile": {
|
||||||
"src_name": "spj-{spj_version}.c",
|
"src_name": "spj-{spj_version}.c",
|
||||||
"exe_name": "spj-{spj_version}",
|
"exe_name": "spj-{spj_version}",
|
||||||
"max_cpu_time": 10000,
|
"max_cpu_time": 3000,
|
||||||
"max_real_time": 20000,
|
"max_real_time": 5000,
|
||||||
"max_memory": 1024 * 1024 * 1024,
|
"max_memory": 1024 * 1024 * 1024,
|
||||||
"compile_command": "/usr/bin/gcc -DONLINE_JUDGE -O2 -w -fmax-errors=3 -std=c99 {src_path} -lm -o {exe_path}"
|
"compile_command": "/usr/bin/gcc -DONLINE_JUDGE -O2 -w -fmax-errors=3 -std=c99 {src_path} -lm -o {exe_path}"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -72,7 +72,7 @@ class JudgeClient(object):
|
|||||||
max_real_time=self._max_cpu_time * 9,
|
max_real_time=self._max_cpu_time * 9,
|
||||||
max_memory=self._max_memory * 3,
|
max_memory=self._max_memory * 3,
|
||||||
max_output_size=1024 * 1024 * 1024,
|
max_output_size=1024 * 1024 * 1024,
|
||||||
max_process_number=self._run_config["max_process_number"],
|
max_process_number=_judger.UNLIMITED,
|
||||||
exe_path=command[0].encode("utf-8"),
|
exe_path=command[0].encode("utf-8"),
|
||||||
input_path=in_file_path.encode("utf-8"),
|
input_path=in_file_path.encode("utf-8"),
|
||||||
output_path="/tmp/spj.out".encode("utf-8"),
|
output_path="/tmp/spj.out".encode("utf-8"),
|
||||||
@ -102,7 +102,7 @@ class JudgeClient(object):
|
|||||||
max_real_time=self._max_real_time,
|
max_real_time=self._max_real_time,
|
||||||
max_memory=self._max_memory,
|
max_memory=self._max_memory,
|
||||||
max_output_size=1024 * 1024 * 1024,
|
max_output_size=1024 * 1024 * 1024,
|
||||||
max_process_number=self._run_config["max_process_number"],
|
max_process_number=_judger.UNLIMITED,
|
||||||
exe_path=command[0].encode("utf-8"),
|
exe_path=command[0].encode("utf-8"),
|
||||||
input_path=in_file,
|
input_path=in_file,
|
||||||
output_path=out_file,
|
output_path=out_file,
|
||||||
|
|||||||
@ -76,7 +76,7 @@ class JudgeServer(object):
|
|||||||
max_memory=max_memory,
|
max_memory=max_memory,
|
||||||
test_case_id=str(test_case_id),
|
test_case_id=str(test_case_id),
|
||||||
submission_dir=submission_dir,
|
submission_dir=submission_dir,
|
||||||
spj_version=str(spj_version),
|
spj_version=spj_version,
|
||||||
spj_config=spj_config)
|
spj_config=spj_config)
|
||||||
run_result = judge_client.run()
|
run_result = judge_client.run()
|
||||||
return run_result
|
return run_result
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user