From 5c8d224bb4709c6fa65731901cf9956da544cc1f Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 24 Mar 2011 13:17:15 +0100 Subject: 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 --- flashbench.c | 10 +++++----- 1 file 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}, -- cgit v1.2.3