From 8e873b80c8fc3a92f994648397729645109f5711 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 21 Feb 2025 16:21:59 +0100 Subject: Track is_active in players table. Improve SQL triggers for time control. Use triggers to update is_active and time control data and move time statistics. Show median and interquartile range move times on profile. --- views/user.pug | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'views/user.pug') diff --git a/views/user.pug b/views/user.pug index 4aecb0b..c3e8925 100644 --- a/views/user.pug +++ b/views/user.pug @@ -42,8 +42,13 @@ html br a(href="/contacts/add-enemy/"+who.name) Add to blacklist - h3 Response time - div Average response time: #{(who.move_time_avg * 24).toFixed(2)} hours + if (who.move_time_mean !== null) + h3 Response time + div Average response time: #{format_minutes(who.move_time_mean)} + if (who.move_time_q2 !== null) + div Median response time: #{format_minutes(who.move_time_q2)} + if (who.move_time_q1 !== null && who.move_time_q2 !== null) + div Middle half of response times: #{format_minutes(who.move_time_q1)} to #{format_minutes(who.move_time_q3)} h3 Timeouts div Total number of timeouts: #{who.timeout_total} -- cgit v1.2.3