From 382dd53c0c5a3e71647609a3a0245a96348ac420 Mon Sep 17 00:00:00 2001 From: undefined Date: Sun, 13 Jun 2021 11:49:35 +0800 Subject: [PATCH] =?UTF-8?q?core:=20problemStat:=20=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E9=87=8D=E7=AE=97=E5=88=86=E6=AE=B5=E4=BA=BA=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/hydrojudge/src/judge/interactive.ts | 6 ------ packages/hydrooj/src/script/problemStat.ts | 20 +++++++++++--------- packages/ui-default/package.json | 2 +- 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/packages/hydrojudge/src/judge/interactive.ts b/packages/hydrojudge/src/judge/interactive.ts index 42f31b0ad..836336813 100644 --- a/packages/hydrojudge/src/judge/interactive.ts +++ b/packages/hydrojudge/src/judge/interactive.ts @@ -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, diff --git a/packages/hydrooj/src/script/problemStat.ts b/packages/hydrooj/src/script/problemStat.ts index 363b614d0..2adffcadc 100644 --- a/packages/hydrooj/src/script/problemStat.ts +++ b/packages/hydrooj/src/script/problemStat.ts @@ -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, diff --git a/packages/ui-default/package.json b/packages/ui-default/package.json index ad862a7ce..800beaf6d 100644 --- a/packages/ui-default/package.json +++ b/packages/ui-default/package.json @@ -1,6 +1,6 @@ { "name": "@hydrooj/ui-default", - "version": "4.11.18", + "version": "4.11.19", "author": "undefined ", "license": "AGPL-3.0", "main": "hydro.js",