mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: add HYDRO_TIME_USAGE & HYDRO_MEMORY_USAGE env var
This commit is contained in:
1 file changed
+6
-1
@@ -44,7 +44,12 @@ function judgeCase(c: NormalizedCase) {
|
||||
user_stderr: fileIds.stderr ? { fileId: fileIds.stderr } : { content: '' },
|
||||
score: c.score,
|
||||
detail,
|
||||
env: { ...ctx.env, HYDRO_TESTCASE: c.id.toString() },
|
||||
env: {
|
||||
...ctx.env,
|
||||
HYDRO_TESTCASE: c.id.toString(),
|
||||
HYDRO_TIME_USAGE: time.toString(),
|
||||
HYDRO_MEMORY_USAGE: Math.floor(memory / 1024).toString(),
|
||||
},
|
||||
}));
|
||||
}
|
||||
} else if (status === STATUS.STATUS_RUNTIME_ERROR && code && detail) {
|
||||
|
||||
Reference in new issue
Block a user