Add maximum mem usage in stats

This commit is contained in:
Всеволод 2024-03-10 11:11:24 +03:00
parent 78d65f799d
commit bf60f59802
2 changed files with 9 additions and 8 deletions

View File

@ -1 +1 @@
1. add time format line (https://www.man7.org/linux/man-pages/man1/time.1.html#top_of_page)
1. ~~add time format line (https://www.man7.org/linux/man-pages/man1/time.1.html#top_of_page)~~

View File

@ -155,7 +155,8 @@ class Job {
];
const time_format = [
'-p'
'-f',
'real %es\\nuser %Us\\nsys %Ss\\nmem %MKb',
]
if (memory_limit >= 0) {
@ -274,10 +275,10 @@ class Job {
this.close_cleanup();
if (stderr.length > 0) {
var stats = stderr.trim().split('\n').slice(-3).join('\n');
var stats = stderr.trim().split('\n').slice(-4).join('\n');
stderr = stderr.trim().split('\n').slice(0, -3).join('\n');
output = output.trim().split('\n').slice(0, -3).join('\n');
stderr = stderr.trim().split('\n').slice(0, -4).join('\n');
output = output.trim().split('\n').slice(0, -4).join('\n');
}
var end_time = new Date().getTime();
@ -292,10 +293,10 @@ class Job {
this.close_cleanup();
if (stderr.length > 0) {
var stats = stderr.trim().split('\n').slice(-3).join('\n');
var stats = stderr.trim().split('\n').slice(-4).join('\n');
stderr = stderr.trim().split('\n').slice(0, -3).join('\n');
output = output.trim().split('\n').slice(0, -3).join('\n');
stderr = stderr.trim().split('\n').slice(0, -4).join('\n');
output = output.trim().split('\n').slice(0, -4).join('\n');
}
var end_time = new Date().getTime();