summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndriy Naborskyy <andriyn@google.com>2015-10-15 19:09:50 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-10-15 19:09:50 +0000
commit1f55c074400d01d24a03e9154fb2613f1ad8daf3 (patch)
treef6f3584cc0ea0a607053415312ebb5f0e122ed7f
parent241ffafa8ef52a503e7aaee31ead8c898c1b4126 (diff)
parentd258e0fd390ac8536d0405589bd0519327721da3 (diff)
downloadextras-1f55c074400d01d24a03e9154fb2613f1ad8daf3.tar.gz
am d258e0fd: am 83eeed92: emmc test: fix counter overflow
* commit 'd258e0fd390ac8536d0405589bd0519327721da3': emmc test: fix counter overflow
-rw-r--r--tests/ext4/rand_emmc_perf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ext4/rand_emmc_perf.c b/tests/ext4/rand_emmc_perf.c
index ed6a05cc..ebd10c89 100644
--- a/tests/ext4/rand_emmc_perf.c
+++ b/tests/ext4/rand_emmc_perf.c
@@ -147,7 +147,7 @@ static void perf_test(int fd, int write_mode, off64_t max_blocks)
{
struct timeval start, end, res;
char buf[TST_BLK_SIZE] = { 0 };
- int iops = 0;
+ long long iops = 0;
int msecs;
res.tv_sec = 0;
@@ -177,7 +177,7 @@ static void perf_test(int fd, int write_mode, off64_t max_blocks)
timersub(&end, &start, &res);
msecs = (res.tv_sec * 1000) + (res.tv_usec / 1000);
- printf("%d %dbyte iops/sec\n", iops * 1000 / msecs, TST_BLK_SIZE);
+ printf("%.0f %dbyte iops/sec\n", (float)iops * 1000 / msecs, TST_BLK_SIZE);
}
int main(int argc, char *argv[])