diff options
| author | Sandeep Patil <sspatil@google.com> | 2018-12-11 09:28:38 -0800 |
|---|---|---|
| committer | Sandeep Patil <sspatil@google.com> | 2018-12-11 10:38:33 -0800 |
| commit | 2f0b6ebfbe1a7fef4dabcf6040e1c4377cddf601 (patch) | |
| tree | eeddd286d2b93bf166f98d3186c60daacb26f8eb /trusty/coverage/coverage.cpp | |
| parent | d768a0c13dc7e419bb9b4b59e8c12884231fe902 (diff) | |
libmeminfo: Add ReadSysMemInfo variants
The new variant is primarily used in framework. See: go/ag/5780400
for usage. Also add tests, benchmarks and fix several issues found in SysMemInfo
class.
New benchmark results are:
--------------------------------------------------------------
Benchmark Time CPU Iterations
--------------------------------------------------------------
BM_ReadMemInfo_old 7726 ns 7696 ns 90201
BM_ReadMemInfo_new 7554 ns 7525 ns 90358
BM_ZramTotal_old 6446 ns 6406 ns 108361
BM_ZramTotal_new 6529 ns 6488 ns 106545
BM_MemInfoWithZram_old 14485 ns 14412 ns 48492
BM_MemInfoWithZram_new 20572 ns 20459 ns 33438
--------------------------------------------------------------
The reason for BM_MemInfoWithZram_new shows worse numbers is because
the new API also tries to find more than 1 zram device (if it exists).
The old implementation hard coded everything to "/sys/block/zram0/"
Test: libmeminfo_test 1
Bug: 114325007
Bug: 111694435
Change-Id: I246d9e9a54986ee9b2542d1eaac79ecf7310b23a
Signed-off-by: Sandeep Patil <sspatil@google.com>
Diffstat (limited to 'trusty/coverage/coverage.cpp')
0 files changed, 0 insertions, 0 deletions
