aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharlie Blake2018-08-17 17:31:20 +0100
committerGitHub2018-08-17 17:31:20 +0100
commit03de9d8e52535ed0f82c13b8e9f671d11c045f81 (patch)
tree89742974168f2c6b00f0d00e5777d9176efac958
parentMerge pull request #86 from thecharlesblake/ipg (diff)
parentAdd linux time command results to output (diff)
downloadmetasol-03de9d8e52535ed0f82c13b8e9f671d11c045f81.tar.gz
metasol-03de9d8e52535ed0f82c13b8e9f671d11c045f81.zip

Merge pull request #87 from thecharlesblake/add_linux_time

Add linux time command results to output

-rwxr-xr-xsolvability.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/solvability.sh b/solvability.sh
index 1770fc0..6f423b5 100755
--- a/solvability.sh
+++ b/solvability.sh
@@ -12,10 +12,11 @@ cores="$2"
sol_command="$3"
minramfree="100G"
out="$4"
+time_command="/usr/bin/time -f \" %e, %U, %S\""
+combine_command="sed -e 'H;\${x;s/\n/,/g;s/^,//;p;};d'"
+echo "Attempted Seed, Outcome, Time Taken(ms), States Searched, Unique States Searched, Backtracks, Dominance Moves, States Removed From Cache, Final States In Cache, Final Buckets In Cache, Maximum Search Depth, Final Search Depth, real (time), user (time), sys (time) " > "$out.csv"
-echo "Attempted Seed, Outcome, Time Taken(ms), States Searched, Unique States Searched, Backtracks, Dominance Moves, States Removed From Cache, Final States In Cache, Final Buckets In Cache, Maximum Search Depth, Final Search Depth" > "$out.csv"
-
-seq "$seeds" | parallel --joblog $out.log --progress --memfree $minramfree -j"$cores" "$sol_command" --ra {} --class >> "$out.csv"
+seq "$seeds" | parallel --joblog $out.log --progress --memfree $minramfree -j"$cores" "exec $time_command $sol_command --ra {} --class 2>&1 | $combine_command >> $out.csv"