Merge "storaged: Avoid divide-by-zero in performance measurement" into tm-dev am: 190e2bc6e1

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/18620177

Change-Id: I4489ef2286a2bb197056a0eb922a75ac3e4eadbd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
TreeHugger Robot 2022-05-31 17:06:16 +00:00 committed by Automerger Merge Worker
commit 10eb36887f
1 changed files with 1 additions and 1 deletions

View File

@ -333,7 +333,7 @@ void storaged_t::flush_proto_data(userid_t user_id,
first_write = false; first_write = false;
} }
if (benchmark_size) { if (benchmark_size && benchmark_time_ns) {
int perf = benchmark_size * 1000000LLU / benchmark_time_ns; int perf = benchmark_size * 1000000LLU / benchmark_time_ns;
storage_info->update_perf_history(perf, system_clock::now()); storage_info->update_perf_history(perf, system_clock::now());
} }