print total models

This commit is contained in:
reusedname 2025-02-16 20:57:04 +05:00
parent ae2a026ad1
commit a72ca1e677
1 changed files with 4 additions and 0 deletions

View File

@ -88,13 +88,17 @@ public class DebugServlet extends AbstractCtbrecServlet {
text += "\nRecording stats:\n<table>";
text = text.replace("\n", "<br>");
int totalModels = 0;
for (var rec : recorder.getRecordings()) {
var proc = rec.getRecordingProcess();
if (proc == null) continue;
text += String.format("<tr><td>%s</td><td>%s</td></tr>\n", proc.getModel().getDisplayName(), proc.getStats().replace(" ", "&nbsp;"));
totalModels++;
}
text += "</table>";
text += String.format("<br>Total: %d", totalModels);
text += "</body></html>";
log.debug("Stats Request");