Code Review
/
yardstick.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Separate out test_parse_to_value_exception()"
[yardstick.git]
/
yardstick
/
benchmark
/
scenarios
/
storage
/
storagecapacity.bash
diff --git
a/yardstick/benchmark/scenarios/storage/storagecapacity.bash
b/yardstick/benchmark/scenarios/storage/storagecapacity.bash
index
6ed4b28
..
96db6e1
100644
(file)
--- a/
yardstick/benchmark/scenarios/storage/storagecapacity.bash
+++ b/
yardstick/benchmark/scenarios/storage/storagecapacity.bash
@@
-17,7
+17,7
@@
OUTPUT_FILE=/tmp/storagecapacity-out.log
# run disk_size test
run_disk_size()
{
# run disk_size test
run_disk_size()
{
- fdisk -l | grep '^Disk.*bytes
$
' | awk -F [:,\ ] '{print $2,$7}' > $OUTPUT_FILE
+ fdisk -l | grep '^Disk.*bytes' | awk -F [:,\ ] '{print $2,$7}' > $OUTPUT_FILE
}
# write the disk size to stdout in json format
}
# write the disk size to stdout in json format
@@
-27,7
+27,7
@@
output_disk_size()
DISKSIZE=`awk 'BEGIN{cnt=0;} {cnt=cnt+$2} END{print cnt}' $OUTPUT_FILE`
echo -e "{\
\"Number of devices\":\"$DEVICENUM\", \
DISKSIZE=`awk 'BEGIN{cnt=0;} {cnt=cnt+$2} END{print cnt}' $OUTPUT_FILE`
echo -e "{\
\"Number of devices\":\"$DEVICENUM\", \
- \"Total disk size
\":\"$DISKSIZE bytes
\" \
+ \"Total disk size
in bytes\":\"$DISKSIZE
\" \
}"
}
}"
}
@@
-35,7
+35,7
@@
output_disk_size()
run_block_size()
{
echo -n "" > $OUTPUT_FILE
run_block_size()
{
echo -n "" > $OUTPUT_FILE
- blkdevices=`fdisk -l | grep '^Disk.*bytes
$
' | awk -F [:,\ ] '{print $2}'`
+ blkdevices=`fdisk -l | grep '^Disk.*bytes' | awk -F [:,\ ] '{print $2}'`
blkdevices=($blkdevices)
for bd in "${blkdevices[@]}";do
blk_size=`blockdev --getbsz $bd`
blkdevices=($blkdevices)
for bd in "${blkdevices[@]}";do
blk_size=`blockdev --getbsz $bd`