6 Commits

Author SHA1 Message Date
Sudheer Shanka
2a973ab626 Add CTS for BlobStoreManager.Session.openRead().
Bug: 152423769
Test: atest --test-mapping apex/blobstore
Change-Id: I517adb501bf6899dadd78c1b28c2135ae0b6f798
2020-03-25 12:49:30 -07:00
Sudheer Shanka
c0fd5fa650 Delete a blob after the last lease of it is released.
Also, avoid deleting it if it was committed recently
to allow app that contributed it to acquire a lease.

Bug: 151378266
Test: atest --test-mapping apex/blobstore
Change-Id: I32f9bc0d0e9d74e7a07c279b5057f53ccb610673
2020-03-18 20:56:29 -07:00
Sudheer Shanka
c6c7994c0f Add @TestApis getLeasedBlobs() and getLeaseInfo().
+ Rename AccessorInfo to LeaseInfo.

Bug: 150619869
Test: atest --test-mapping apex/blobstore
Change-Id: I257b784350aa8bcf39847a3fd1a91977e4ff174a
2020-03-12 22:32:49 -07:00
Sudheer Shanka
96b45378fa Add more blobstore related CTS tets.
Bug: 150619869
Test: atest --test-mapping apex/blobstore
Change-Id: I73ced7e340dc863a7b5895be23def1a8df87b74e
2020-03-02 11:32:11 -08:00
Sudheer Shanka
e9232d6d6f Update BlobStoreMS to augment storage stats with blobs data.
- Any pending sessions data is attributed to the apps
  which contributed them.
- Any commited blobs data is attributed to the app which
  has a lease on it. If multiple apps have lease on a blob, don't
  attribute the blob to those apps for now.
- Remove StorageStatsAugmenter.augmentStatsForUser as it
  is not used for anything currently.
- Fix an issue in how we override existing committers and leasees.

Bug: 148694869
Test: atest cts/tests/BlobStore/src/com/android/cts/blob/BlobStoreManagerTest.java
Test: atest tests/tests/os/src/android/os/storage/cts/StorageStatsManagerTest.java
Test: atest hostsidetests/appsecurity/src/android/appsecurity/cts/StorageHostTest.java
Test: manual
Change-Id: Ia4af0a2549c75db66741f2d1979de95d2d150bc8
2020-02-19 14:45:12 -08:00
Sudheer Shanka
d4ea5e142f Add perf test to measure duration of blob store digest computation.
+ Move BlobStoreTestUtils from cts/ to frameworks/base/tests/.

Bug: 148898557
Test: atest ./apct-tests/perftests/blobstore/src/com/android/perftests/blob/BlobStorePerfTests.java
Change-Id: I2de155d0c0c1fb602c57353ba4819bdc9cda8c0a
2020-02-05 16:30:44 -08:00