summaryrefslogtreecommitdiff
path: root/dynamic_partition_test_utils.h
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2019-08-14 13:00:23 -0700
committerTianjie Xu <xunchang@google.com>2019-08-26 23:46:20 +0000
commit21030c18fc636a8887c76824ffb68ef41a3ebdd3 (patch)
treeaa15c8aab39072c5b2d28b85127608978ee4f247 /dynamic_partition_test_utils.h
parent72d512c227264fcd7f5156dd64ec09316aa77f8b (diff)
Use the payload size as the base to calculate download overhead
The download_overhead_percentage was calculated based on the bytes downloaded during the current update attempt. This may leads to large number when the update is interrupted; and the resumed update attempt only downloads a small portion of the payload. For example, for a 10M payload; if we download 9M, interrupt, and resume to download the remaining 1M; the current code will report the overhead as (10-1)/1*100% as 900. We should switch to use the payload size as it was the intention of the metrics. Test: run update engine, interrupt and check the metrics Change-Id: Ic3e1c0a0a4671ee6e7751d53fc40fd2dc8072d63
Diffstat (limited to 'dynamic_partition_test_utils.h')
0 files changed, 0 insertions, 0 deletions