mirror of
https://github.com/ceph/ceph
synced 2025-02-20 17:37:29 +00:00
tests: Reducing commands in get_num_active_clean()
get_num_active_clean() is called very often but spawn 1 useless process. The current "grep -v | wc -l" can be easily replaced by "grep -cv" which do the same while spawning one process less. Signed-off-by: Erwan Velu <erwan@redhat.com>
This commit is contained in:
parent
d8f07c3ff6
commit
b3f7392d9d
@ -940,7 +940,7 @@ function get_num_active_clean() {
|
||||
# grep -v '^$'
|
||||
ceph --format xml pg dump pgs 2>/dev/null | \
|
||||
$XMLSTARLET sel -t -m "//pg_stat/state[$expression]" -v . -n | \
|
||||
grep -v '^$' | wc -l
|
||||
grep -cv '^$'
|
||||
}
|
||||
|
||||
function test_get_num_active_clean() {
|
||||
|
Loading…
Reference in New Issue
Block a user