dd-sdk-android icon indicating copy to clipboard operation
dd-sdk-android copied to clipboard

RUM-4098: Add TLVFormat DataStore persistence

Open jonathanmos opened this issue 1 year ago • 1 comments

What does this PR do?

Adds the capability to write/read files in TLVformat, and defines a DataStore type that features can use to persist data between sessions.

Motivation

Part of the effort to persist bitmap hashes between sessions. Integrating the datastore with SR will be in a second PR.

Additional Notes

Anything else we should know when reviewing?

Review checklist (to be filled by reviewers)

  • [ ] Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • [ ] Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • [ ] Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

jonathanmos avatar May 16 '24 21:05 jonathanmos

Codecov Report

Attention: Patch coverage is 90.62500% with 24 lines in your changes missing coverage. Please review.

Project coverage is 83.23%. Comparing base (d3f69b6) to head (d25e520). Report is 3 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2038      +/-   ##
===========================================
+ Coverage    83.19%   83.23%   +0.04%     
===========================================
  Files          495      508      +13     
  Lines        17773    18004     +231     
  Branches      2685     2699      +14     
===========================================
+ Hits         14785    14985     +200     
- Misses        2256     2274      +18     
- Partials       732      745      +13     
Files Coverage Δ
...in/com/datadog/android/api/feature/FeatureScope.kt 0.00% <ø> (ø)
...in/com/datadog/android/core/internal/SdkFeature.kt 90.86% <100.00%> (+1.76%) :arrow_up:
...rnal/persistence/datastore/DataStoreFileHandler.kt 100.00% <100.00%> (ø)
...rnal/persistence/datastore/NoOpDataStoreHandler.kt 100.00% <100.00%> (ø)
.../core/internal/persistence/datastore/ext/IntExt.kt 100.00% <100.00%> (ø)
...id/core/internal/persistence/tlvformat/TLVBlock.kt 100.00% <100.00%> (ø)
...ternal/persistence/tlvformat/TLVBlockFileReader.kt 100.00% <100.00%> (ø)
...ore/internal/persistence/tlvformat/TLVBlockType.kt 100.00% <100.00%> (ø)
...oid/core/persistence/datastore/DataStoreContent.kt 100.00% <100.00%> (ø)
...ernal/persistence/datastore/DatastoreFileWriter.kt 97.87% <97.87%> (ø)
... and 5 more

... and 31 files with indirect coverage changes

codecov-commenter avatar May 21 '24 08:05 codecov-commenter