diff --git a/csp/contests/priv_server_info_page.csp b/csp/contests/priv_server_info_page.csp index ef7603fa2..3f00e0393 100644 --- a/csp/contests/priv_server_info_page.csp +++ b/csp/contests/priv_server_info_page.csp @@ -81,6 +81,10 @@ Submitted runs: + + Submitted submits: + + Time spent on compilation (ms): @@ -161,12 +165,26 @@ if (mcd->append_run_count > 0) { %> - Average INSERT time (μs): + Average INSERT INTO runs time (μs): <% } %> + + 'INSERT INTO submits' operations: + + +<% + if (mcd->append_submit_count > 0) { +%> + + Average INSERT INTO submits time (μs): + + +<% + } +%> diff --git a/include/ejudge/metrics_contest.h b/include/ejudge/metrics_contest.h index ec9bc456a..a7c04a12c 100644 --- a/include/ejudge/metrics_contest.h +++ b/include/ejudge/metrics_contest.h @@ -2,7 +2,7 @@ #ifndef __METRICS_CONTEST_H__ #define __METRICS_CONTEST_H__ -/* Copyright (C) 2022-2023 Alexander Chernov */ +/* Copyright (C) 2022-2024 Alexander Chernov */ /* * This program is free software; you can redistribute it and/or modify @@ -42,6 +42,9 @@ struct metrics_contest_data long long key_cache_size; long long append_run_us; long long append_run_count; + int submits_submitted; + long long append_submit_us; + long long append_submit_count; }; struct metrics_desc diff --git a/lib/new_server_html.c b/lib/new_server_html.c index 791a2eeae..087286ac6 100644 --- a/lib/new_server_html.c +++ b/lib/new_server_html.c @@ -15299,6 +15299,9 @@ ns_submit_run_input( err_num = NEW_SRV_ERR_RUNLOG_UPDATE_FAILED; goto done; } + if (metrics.data) { + ++metrics.data->submits_submitted; + } ej_uuid_generate(&se.judge_uuid); r = serve_compile_request(phr->config,