pp: remove unused derivations and helpers

This commit is contained in:
Rodrigo Arias 2021-03-01 11:39:24 +01:00
parent 6dd41fd96f
commit 2f7032aca6
2 changed files with 2 additions and 49 deletions

View File

@ -103,22 +103,12 @@
sshHost = "mn1";
};
# Post processing tools
pp = with bsc.garlicTools; rec {
# Post processing
pp = {
store = callPackage ./pp/store.nix { };
resultFromTrebuchet = trebuchetStage: (store {
experimentStage = getExperimentStage trebuchetStage;
inherit trebuchetStage;
});
timetable = callPackage ./pp/timetable.nix { };
osu-latency = callPackage ./pp/osu-latency.nix { };
rPlot = callPackage ./pp/rplot.nix { };
timetableFromTrebuchet = tre: timetable (resultFromTrebuchet tre);
mergeDatasets = callPackage ./pp/merge.nix { };
# Takes a list of experiments and returns a file that contains
# all timetable results from the experiments.
merge = exps: mergeDatasets (map timetableFromTrebuchet exps);
};
garlicd = callPackage ./garlicd/default.nix {

View File

@ -1,37 +0,0 @@
{
stdenv
, jq
}:
inputResult:
stdenv.mkDerivation {
name = "timetable.json";
preferLocalBuild = true;
phases = [ "installPhase" ];
buildInputs = [ jq ];
installPhase = ''
touch $out
cd ${inputResult}
for exp in *-experiment; do
cd ${inputResult}/$exp
for unit in *-unit; do
cd ${inputResult}/$exp/$unit
conf=garlic_config.json
for run in $(ls -d [0-9]* | sort -n); do
echo "processing unit=$unit run=$run"
time=$(awk '/^ ?time /{print $2}' $run/stdout.log)
if [ -z "$time" ]; then
echo "error: cannot match \"time\" line"
echo "check stdout log file: ${inputResult}/$exp/$unit/$run/stdout.log"
exit 1
fi
start_time=$(cat $run/.garlic/total_time_start)
end_time=$(cat $run/.garlic/total_time_end)
total_time=$(($end_time - $start_time))
jq -cn "{ exp:\"$exp\", unit:\"$unit\", config:inputs, time:$time, run:$run, total_time:$total_time }" $conf >> $out
done
done
done
'';
}