The current code was running sequentially two ceph-dencoder calls.
This process is executed pretty fast but adding sequentiality and by the number
of loops to execute, it have a cost.
This patch is just making this two calls being run in parallel.
As a result, the test/encoding/readable.sh test is running in 4m50 instead of 6.
The associate loadavg isn't impacted as it stays at 6 while being run with
nproc=8.
This patch save 1/6th of building time without impact the loadavg.
Signed-off-by: Erwan Velu <erwan@redhat.com>
continue
fi;
+ ./ceph-dencoder type $type import $vdir/objects/$type/$f decode dump_json > $tmp1 &
+ pid1="$!"
+ ./ceph-dencoder type $type import $vdir/objects/$type/$f decode encode decode dump_json > $tmp2 &
+ pid2="$!"
#echo "\t$vdir/$type/$f"
- if ! ./ceph-dencoder type $type import $vdir/objects/$type/$f decode dump_json > $tmp1; then
+ if ! wait $pid1; then
echo "**** failed to decode $vdir/objects/$type/$f ****"
failed=$(($failed + 1))
rm -f $tmp1 $tmp2
continue
fi
- if ! ./ceph-dencoder type $type import $vdir/objects/$type/$f decode encode decode dump_json > $tmp2; then
+ if ! wait $pid2; then
echo "**** failed to decode+encode+decode $vdir/objects/$type/$f ****"
failed=$(($failed + 1))
rm -f $tmp1 $tmp2