diff options
author | Andriy Naborskyy <andriyn@google.com> | 2015-10-15 10:33:52 -0700 |
---|---|---|
committer | Andriy Naborskyy <andriyn@google.com> | 2015-10-15 10:33:52 -0700 |
commit | 83eeed92430fc3f14c21cfc43d11fcecef6e8285 (patch) | |
tree | e0bca55177fd50af848a10879a24cbbf17497e72 | |
parent | 79e1e6bf42638eade36ea6ce95240b74af19487a (diff) | |
download | extras-android-6.0.1_r58.tar.gz |
emmc test: fix counter overflowandroid-6.0.1_r9android-6.0.1_r81android-6.0.1_r80android-6.0.1_r8android-6.0.1_r79android-6.0.1_r78android-6.0.1_r77android-6.0.1_r74android-6.0.1_r73android-6.0.1_r72android-6.0.1_r70android-6.0.1_r7android-6.0.1_r69android-6.0.1_r66android-6.0.1_r65android-6.0.1_r61android-6.0.1_r60android-6.0.1_r59android-6.0.1_r58android-6.0.1_r57android-6.0.1_r56android-6.0.1_r52android-6.0.1_r51android-6.0.1_r50android-6.0.1_r49android-6.0.1_r48android-6.0.1_r47android-6.0.1_r46android-6.0.1_r43android-6.0.1_r42android-6.0.1_r41android-6.0.1_r40android-6.0.1_r30android-6.0.1_r3android-6.0.1_r28android-6.0.1_r27android-6.0.1_r26android-6.0.1_r20android-6.0.1_r17android-6.0.1_r13android-6.0.1_r12android-6.0.1_r11android-6.0.1_r10android-6.0.1_r1android-6.0.0_r41marshmallow-mr3-releasemarshmallow-mr2-releasemarshmallow-mr1-releasemarshmallow-mr1-dev
Fix iops counter overflow that is observed with smaller write size
Bug: 24099467
Change-Id: Ibb1001bde4b68cabf4d0bced6df553f4f772685a
-rw-r--r-- | tests/ext4/rand_emmc_perf.c | 4 |
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[]) |