ceph/qa
Erwan Velu 84197f1641 tests: Optimizing wait_for_clean()
wait_for_clean() is a very common call when running the make check.
It does wait the cluster to be stable before continuing.

This script was doing the same calls twice and could be optimized by
making the useful calls only once.

is_clean() function was checking num_pgs & get_num_active_clean()
The main loop itself was also calling get_num_active_clean()

This patch is inlining the is_clean() inside this loop to benefit from a
single get_num_active_clean() call. This avoid a useless call of (ceph +
xmlstarlet).

This patch does move all the 'timer reset' conditions into an else
avoiding spawning other ceph+xmlstarlet call while we already know we
should reset the timer.

The last modification is to reduce the sleeping time as the state of the
cluster is changing very fast.

This whole patch could looks like almost not a big win but for a test
like test/osd/osd-scrub-repair.sh, we drop from 9m56 to 9m30 while
reducing the number system calls.

At the scale of make check, that's a lot of saving.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-04-05 09:36:25 +02:00
..
btrfs
client
fs
libceph
mds
mon/bootstrap
qa_scripts
rbd
workunits tests: Optimizing wait_for_clean() 2016-04-05 09:36:25 +02:00
loopall.sh
Makefile
run_xfstests_krbd.sh qa/krbd: Expunge generic/247 2015-12-07 09:24:33 -08:00
run_xfstests_qemu.sh qa: https://ceph.com/git -> https://git.ceph.com 2015-09-24 18:36:57 -04:00
run_xfstests-obsolete.sh
run_xfstests.sh qa: https://ceph.com/git -> https://git.ceph.com 2015-09-24 18:36:57 -04:00
runallonce.sh
runoncfuse.sh
runonkclient.sh
setup-chroot.sh