mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
tests: timing without /usr/bin/time
Use just 'date' so the 'time' package doesn't need to be installed just for this purpose.
This commit is contained in:
parent
c15ac326cc
commit
4db228b907
@ -54,10 +54,15 @@ sleep 9
|
||||
# new thin-pool registration.
|
||||
for i in $(seq 11 15)
|
||||
do
|
||||
/usr/bin/time -o TM -f %e lvcreate --errorwhenfull y -Zn -T -L4M -V4M $vg/pool_${i} -n $lv${i}
|
||||
read -r t < TM
|
||||
test ${t%%.*} -lt 8 || die "Creation of thin pool took more then 8 second! ($t seconds)"
|
||||
# Fill thin-pool to some capacity >50%
|
||||
#/usr/bin/time -o TM -f %e lvcreate --errorwhenfull y -Zn -T -L4M -V4M $vg/pool_${i} -n $lv${i}
|
||||
#read -r t < TM
|
||||
#test ${t%%.*} -lt 8 || die "Creation of thin pool took more then 8 second! ($t seconds)"
|
||||
START=$(date +%s)
|
||||
lvcreate --errorwhenfull y -Zn -T -L4M -V4M $vg/pool_${i} -n $lv${i}
|
||||
END=$(date +%s)
|
||||
DIFF=$(( END - START ))
|
||||
test "$DIFF" -lt 8 || die "Creation of thin pool took more then 8 second! ($DIFF seconds)"
|
||||
# Fill thin-pool to some capacity >50%
|
||||
dd if=/dev/zero of="$DM_DEV_DIR/$vg/$lv${i}" bs=256K count=9 conv=fdatasync
|
||||
done
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user