Add maximum mem usage in stats
This commit is contained in:
parent
78d65f799d
commit
bf60f59802
2
TODO.md
2
TODO.md
|
@ -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)~~
|
|
@ -155,7 +155,8 @@ class Job {
|
||||||
];
|
];
|
||||||
|
|
||||||
const time_format = [
|
const time_format = [
|
||||||
'-p'
|
'-f',
|
||||||
|
'real %es\\nuser %Us\\nsys %Ss\\nmem %MKb',
|
||||||
]
|
]
|
||||||
|
|
||||||
if (memory_limit >= 0) {
|
if (memory_limit >= 0) {
|
||||||
|
@ -274,10 +275,10 @@ class Job {
|
||||||
this.close_cleanup();
|
this.close_cleanup();
|
||||||
|
|
||||||
if (stderr.length > 0) {
|
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');
|
stderr = stderr.trim().split('\n').slice(0, -4).join('\n');
|
||||||
output = output.trim().split('\n').slice(0, -3).join('\n');
|
output = output.trim().split('\n').slice(0, -4).join('\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
var end_time = new Date().getTime();
|
var end_time = new Date().getTime();
|
||||||
|
@ -292,10 +293,10 @@ class Job {
|
||||||
this.close_cleanup();
|
this.close_cleanup();
|
||||||
|
|
||||||
if (stderr.length > 0) {
|
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');
|
stderr = stderr.trim().split('\n').slice(0, -4).join('\n');
|
||||||
output = output.trim().split('\n').slice(0, -3).join('\n');
|
output = output.trim().split('\n').slice(0, -4).join('\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
var end_time = new Date().getTime();
|
var end_time = new Date().getTime();
|
||||||
|
|
Loading…
Reference in New Issue