aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2011-03-24 13:17:15 +0100
committerArnd Bergmann <arnd@arndb.de>2011-03-24 13:18:30 +0100
commit5c8d224bb4709c6fa65731901cf9956da544cc1f (patch)
tree3ef26b362ad9fefe6020dab2aed4d68321bc7e23
parent29bdc9c97c5e27e35ea0b98400af33c54fb2d31e (diff)
downloadflashbench-5c8d224bb4709c6fa65731901cf9956da544cc1f.tar.gz
flashbench: compute proper average
We want to compute the bytes per second from the average of the times it takes to read many sectors, not compute the average of the throughput, which is somewhat different and less interesting. Also, use only one try for the --open-au test, instead of the maximum of three. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r--flashbench.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/flashbench.c b/flashbench.c
index 60980d7..f545ea6 100644
--- a/flashbench.c
+++ b/flashbench.c
@@ -485,13 +485,13 @@ static int try_open_au(struct device *dev, unsigned int erasesize,
{O_OFF_FIXED, .val = 1024 * 1024 * 16}, {O_DROP},
/* print one line of aggregated
per second results */
- {O_PRINTF}, {O_FORMAT},
+ {O_PRINTF}, {O_FORMAT}, {O_BPS},
/* linear write 0x5a */
- {O_REDUCE, .aggregate = A_MAXIMUM}, {O_REPEAT, 3},
+ {O_REDUCE, .aggregate = A_MAXIMUM}, {O_REPEAT, 1},
{O_REDUCE, .aggregate = A_AVERAGE},
{ (random ? O_OFF_RAND : O_OFF_LIN),
erasesize / blocksize, -1},
- {O_REDUCE, .aggregate = A_AVERAGE}, {O_BPS},
+ {O_REDUCE, .aggregate = A_AVERAGE},
{O_OFF_RAND, count, 2 * erasesize}, {O_WRITE_RAND},
{O_NEWLINE},
{O_END},
@@ -523,9 +523,9 @@ static int try_find_fat(struct device *dev, unsigned int erasesize,
{O_OFF_LIN, count, erasesize},
/* linear write 0x5a */
{O_REDUCE, .aggregate = A_MAXIMUM}, {O_REPEAT, 1},
- {O_REDUCE, .aggregate = A_AVERAGE},
+ {O_BPS}, {O_REDUCE, .aggregate = A_AVERAGE},
{random ? O_OFF_RAND : O_OFF_LIN, erasesize / blocksize, -1},
- {O_BPS},{O_WRITE_RAND},
+ {O_WRITE_RAND},
{O_NEWLINE},
{O_END},
{O_END},