2011-08-21 23:01:57 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# -L1 will join lines ending in ' '
|
2014-07-15 00:40:38 +00:00
|
|
|
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | parallel -vj10 -k -L1
|
2013-07-03 22:50:08 +00:00
|
|
|
echo "### Test memory consumption stays (almost) the same for 30 and 300 jobs"
|
|
|
|
out30=$( stdout memusg parallel -j2 true :::: <(perl -e '$a="x"x100000;for(1..30){print $a,"\n"}') );
|
|
|
|
out300=$( stdout memusg parallel -j2 true :::: <(perl -e '$a="x"x100000;for(1..300){print $a,"\n"}') );
|
|
|
|
mem30=$(echo $out30 | tr -cd 0-9);
|
|
|
|
mem300=$(echo $out300 | tr -cd 0-9);
|
|
|
|
echo "Test if memory consumption(300 jobs) < memory consumption(30 jobs) * 150% ";
|
|
|
|
echo $(($mem300*100 < $mem30 * 150))
|
2012-01-10 20:58:39 +00:00
|
|
|
|
2013-07-03 22:50:08 +00:00
|
|
|
EOF
|
2012-01-10 23:08:23 +00:00
|
|
|
|
|
|
|
|
2012-01-22 03:42:05 +00:00
|
|
|
|
2011-09-09 19:15:00 +00:00
|
|
|
echo '### Test --shellquote'
|
|
|
|
cat <<'_EOF' | parallel --shellquote
|
|
|
|
awk -v FS="\",\"" '{print $1, $3, $4, $5, $9, $14}' | grep -v "#" | sed -e '1d' -e 's/\"//g' -e 's/\/\/\//\t/g' | cut -f1-6,11 | sed -e 's/\/\//\t/g' -e 's/ /\t/g
|
|
|
|
_EOF
|