platform_system_core/storaged
Matthew Duggan 84b7ca8d81 storaged: Avoid divide-by-zero in performance measurement
The code previously assumed that write() took a non-zero number of clock
ticks.  This is mostly true, but can't be guaranteed.  Add a check to
avoid crashing if it's 0.

Bug: 233008287
Test: Compile
Change-Id: Idec0052f534dc4abb81a414ca76f6c11f4a4dded
(cherry picked from commit 5a02a9bab9)
Merged-In: Idec0052f534dc4abb81a414ca76f6c11f4a4dded
2022-05-27 01:51:34 +00:00
..
binder/android/os Provide Recent Disk Perf via IStoraged 2018-01-08 19:06:22 -08:00
include storaged: use health HAL 2021-12-06 23:09:37 -08:00
tests storaged: skip disk_stats test if not supported. 2021-12-08 07:33:09 +00:00
tools storaged: add parser for dumpsys storaged output 2017-08-09 15:25:19 -07:00
Android.bp storaged: skip disk_stats test if not supported. 2021-12-08 07:33:09 +00:00
EventLogTags.logtags storaged: change uid_io reporting 2017-01-30 14:22:49 -08:00
main.cpp storaged: ignore SIGPIPE 2020-03-18 13:53:15 -07:00
OWNERS storaged: update OWNERS 2018-04-11 18:50:14 -07:00
README.properties storaged: read emmc health data from sysfs 2017-04-03 16:48:14 +00:00
storaged.cpp storaged: Avoid divide-by-zero in performance measurement 2022-05-27 01:51:34 +00:00
storaged.proto storaged: align buffer address and size for direct_io 2017-12-13 15:54:55 -08:00
storaged.rc Replace writepid with task_profiles command for cgroup migration 2021-06-24 17:24:20 +00:00
storaged_diskstats.cpp storaged: use health HAL 2021-12-06 23:09:37 -08:00
storaged_info.cpp storaged: Fix bug in empty check 2021-12-08 10:15:04 -08:00
storaged_service.cpp Move system/core/ off NO_ERROR. 2018-10-08 11:15:52 -07:00
storaged_uid_monitor.cpp storaged: replace LOG_TO() macros with LOG() 2020-01-10 17:10:58 -08:00
storaged_utils.cpp storaged: split proto file into multiple CE areas 2017-10-31 14:31:13 -07:00
uid_info.cpp Move system/core/ off NO_ERROR. 2018-10-08 11:15:52 -07:00

ro.storaged.event.interval    # interval storaged scans for IO stats, in seconds
ro.storaged.event.perf_check  # check for time spent in event loop, in microseconds
ro.storaged.disk_stats_pub    # interval storaged publish disk stats, in seconds
ro.storaged.uid_io.interval   # interval storaged checks Per UID IO usage, in seconds
ro.storaged.uid_io.threshold  # Per UID IO usage limit, in bytes