commit | 7067a7092b703cd747163eb4ae432160583f4e70 | [log] [tgz] |
---|---|---|
author | Alice Wang <aliceywang@google.com> | Tue Nov 15 09:49:57 2022 +0000 |
committer | Alice Wang <aliceywang@google.com> | Tue Nov 15 09:49:57 2022 +0000 |
tree | 3a178e7acc968fb3cf83b1e730eb6525ef236fb6 | |
parent | b28124b02b2de9d0864e4deb53f755023df2c4ef [diff] |
[benchmark] Fix virtio-blk read rate error Test: atest MicrodroidBenchmarks Change-Id: Ic2cd9db15e499d9aabd381b596ff40b659968320
diff --git a/tests/benchmark/src/native/benchmarkbinary.cpp b/tests/benchmark/src/native/benchmarkbinary.cpp index 6321c25..70c6884 100644 --- a/tests/benchmark/src/native/benchmarkbinary.cpp +++ b/tests/benchmark/src/native/benchmarkbinary.cpp
@@ -96,7 +96,7 @@ const int64_t block_count = fileSizeBytes / kBlockSizeBytes; std::vector<uint64_t> offsets(block_count); for (auto i = 0; i < block_count; ++i) { - offsets.push_back(i * kBlockSizeBytes); + offsets[i] = i * kBlockSizeBytes; } if (is_rand) { std::mt19937 rd{std::random_device{}()};