summaryrefslogtreecommitdiff
path: root/startop/scripts/lib/cmd_utils.py
diff options
context:
space:
mode:
authorVarun Shah <varunshah@google.com>2019-10-07 14:41:12 -0700
committerVarun Shah <varunshah@google.com>2019-10-17 18:11:37 -0700
commit23033b0046709140355cf7062bc52611087a1b6c (patch)
tree0c12e7d0d4ba4c84afd24e1b37af15a2bab2ca89 /startop/scripts/lib/cmd_utils.py
parent358d5006234b1e5f0feb95f72ef42e592d28e661 (diff)
Do not retain UsageStats for uninstalled packages.
When packages are removed, remove their associated token mappings in the packages token data stored in UsageStats. When data is being persisted to disk, the data for removed packages will not be written to disk. Additionally, when any of the query APIs are called, data that is read from disk for which a mapping does not exist will not be returned. The data deletion uses a lazy techinque to avoid heavy costs of reading and writing all of the usage stats data on every package removal. Bug: 135484470 Test: atest IntervalStatsTests Test: atest UsageStatsDatabaseTest Change-Id: Ie32d65b47f86071c6a814a8b21e4be060519e598
Diffstat (limited to 'startop/scripts/lib/cmd_utils.py')
0 files changed, 0 insertions, 0 deletions