core: problemStat: 支持重算分段人数

This commit is contained in:
undefined committed 2021-06-13 11:49:35 +08:00
1 parent 6e06a27f2f
commit 382dd53c0c
3 files changed
+12 -16

No files matched your search

@@ -126,12 +126,6 @@ export const judge = async (ctx) => {
await Promise.all(tasks);
ctx.stat.done = new Date();
if (process.env.DEV) ctx.next({ message: JSON.stringify(ctx.stat) });
console.log({
status: ctx.total_status,
score: ctx.total_score,
time_ms: ctx.total_time_usage_ms,
memory_kb: ctx.total_memory_usage_kb,
});
ctx.end({
status: ctx.total_status,
score: ctx.total_score,
+11 -9
View File
@@ -111,16 +111,18 @@ export async function pdoc(report) {
const $set = {
nSubmit: adoc.nSubmit,
nAccept: adoc.nAccept,
'stats.AC': adoc.AC,
'stats.WA': adoc.WA,
'stats.TLE': adoc.TLE,
'stats.MLE': adoc.MLE,
'stats.RE': adoc.RE,
'stats.SE': adoc.SE,
'stats.IGN': adoc.IGN,
'stats.CE': adoc.CE,
stats: {
AC: adoc.AC,
WA: adoc.WA,
TLE: adoc.TLE,
MLE: adoc.MLE,
RE: adoc.RE,
SE: adoc.SE,
IGN: adoc.IGN,
CE: adoc.CE,
},
};
for (let i = 0; i <= 100; i++) if (adoc[`s${i}`]) $set[`stats.s${i}`] = adoc[`s${i}`];
for (let i = 0; i <= 100; i++) if (adoc[`s${i}`]) $set.stats[`s${i}`] = adoc[`s${i}`];
bulk.find({
domainId: adoc._id.domainId,
docType: document.TYPE_PROBLEM,
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/ui-default",
"version": "4.11.18",
"version": "4.11.19",
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0",
"main": "hydro.js",