From 18faad5510f49e49014d0b9e3393ecffd01307bf Mon Sep 17 00:00:00 2001 From: undefined Date: Wed, 3 Apr 2024 18:16:05 +0800 Subject: [PATCH] ui: fix peak time --- packages/ui-default/templates/record_detail_summary.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/ui-default/templates/record_detail_summary.html b/packages/ui-default/templates/record_detail_summary.html index 58675a225..bf995f286 100644 --- a/packages/ui-default/templates/record_detail_summary.html +++ b/packages/ui-default/templates/record_detail_summary.html @@ -6,9 +6,9 @@ {% set _ge = rdoc['status'] == STATUS.STATUS_TIME_LIMIT_EXCEEDED or rdoc['status'] == STATUS.STATUS_MEMORY_LIMIT_EXCEEDED or rdoc['status'] == STATUS.STATUS_OUTPUT_LIMIT_EXCEEDED %} {% if rdoc['time'] %}
{{ _('Total Time') }}
-
{% if _ge %}≥{% endif %}{{ rdoc.time|round|int }}ms
+
{% if _ge %}≥{% endif %}{{ rdoc.time|round(0) }}ms
{{ _('Peak Time') }}
-
{% if _ge %}≥{% endif %}{{ (rdoc.testCases|sort(attr="time")|first())["time"]|round(0) }}ms
+
{% if _ge %}≥{% endif %}{{ (rdoc.testCases|sort(true, true, "time")|first)["time"]|round(0) }}ms
{% endif %} {% if rdoc['memory'] %}
{{ _('Peak Memory') }}