rplot: add total job time in the plots

This commit is contained in:
Rodrigo Arias 2021-03-30 15:49:40 +02:00
parent 872ad1a289
commit ec056d97e5

View File

@ -3,6 +3,7 @@
, rWrapper
, rPackages
, fontconfig
, jq
}:
{
@ -21,7 +22,7 @@ let
in stdenv.mkDerivation {
name = "plot";
buildInputs = [ customR ];
buildInputs = [ customR jq ];
preferLocalBuild = true;
dontPatchShebangs = true;
phases = [ "installPhase" ];
@ -32,5 +33,7 @@ in stdenv.mkDerivation {
cd $out
ln -s ${dataset} input
Rscript --vanilla ${script} ${dataset}
jq -c .total_time input |\
awk '{s+=$1} END {printf "%f\n", s/60}' > total_job_time_minutes
'';
}