summaryrefslogtreecommitdiff
path: root/scripts/update_payload/test_utils.py
diff options
context:
space:
mode:
authorColin Howes <chowes@google.com>2018-11-02 13:18:44 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-11-06 20:19:28 -0800
commit0e452c92bf5fd1a8737170cfd333e50db8cd7f1d (patch)
tree5806dc5c6f8dcb6144dbc9545cc1e9d751140547 /scripts/update_payload/test_utils.py
parent9c9158805f159ac9a8eefa3880f75911e3757112 (diff)
update_engine: Reduce prefs writes during update
Currently we checkpoint after every operation during an update in order to allow us to resume if an update is interrupted for some reason. In addition, we write the current uptime duration every time we receive data over the network in order to collect total uptime metrics when an update finishes, even if it was interrupted by a restart. In practice, this results in a massive number of writes to prefs files during an update (~70000 calls to creat on the samus build I tested). This change introduces rate limiting to both of these mechanisms, such that checkpoints and changes in uptime are persisted at most once per second. This reduces the number of calls to creat to around 650. BUG=chromium:898648 TEST=Perform an update while running strace: strace -p <pidof update_engine> -f -e '!read,write,sendto,recvfrom' Change-Id: Icadc8de4efdebf480ef37c6ef69603e250212102 Reviewed-on: https://chromium-review.googlesource.com/1316467 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Amin Hassani <ahassani@chromium.org>
Diffstat (limited to 'scripts/update_payload/test_utils.py')
0 files changed, 0 insertions, 0 deletions