Move the parsing of the output of sacct to a separate function, so it can be unit-tested.
I also found out that by adding -X I can limit the output to only the cumulative statistics of each job, omitting the intermediate results (*.batch, etc.) which were skipped in the parsing anyway.
Note: I started this as I initially thought parsing of the sacct output would need to get more complex in order to address #87, so I wanted to be able to add unit tests. It turned out that there is a better, much easier fix for that issue but I think testability of the parsing is good to have anyway, so I'm still submitting this PR.
Move the parsing of the output of sacct to a separate function, so it can be unit-tested.
I also found out that by adding
-X
I can limit the output to only the cumulative statistics of each job, omitting the intermediate results (*.batch, etc.) which were skipped in the parsing anyway.Note: I started this as I initially thought parsing of the sacct output would need to get more complex in order to address #87, so I wanted to be able to add unit tests. It turned out that there is a better, much easier fix for that issue but I think testability of the parsing is good to have anyway, so I'm still submitting this PR.