Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RUM-6195: Allow ResourcesLruCache to work with any key #2418

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

jonathanmos
Copy link
Member

@jonathanmos jonathanmos commented Nov 28, 2024

What does this PR do?

Modifies ResourcesLruCache to accept a caller-provided key as input rather than always generating the key from the resource. Add a parameter to ImageWireframeHelper so that the key can be passed from the outside.

Motivation

This is necessary to support resources passed from Jetpack Compose and React Native.

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 jonathanmos changed the title RUM-6195: Allow ResourceCache to work with any key RUM-6195: Allow ResourcesLruCache to work with any key Nov 28, 2024
@jonathanmos jonathanmos force-pushed the jmoskovich/rum-6195/caches-any-key branch 2 times, most recently from d4f5994 to 256a4aa Compare November 28, 2024 12:28
@jonathanmos jonathanmos force-pushed the jmoskovich/rum-6195/caches-any-key branch from 256a4aa to 8743eb1 Compare November 28, 2024 12:50
@codecov-commenter
Copy link

codecov-commenter commented Nov 28, 2024

Codecov Report

Attention: Patch coverage is 88.46154% with 3 lines in your changes missing coverage. Please review.

Project coverage is 70.20%. Comparing base (4590058) to head (e88d51f).
Report is 4 commits behind head on develop.

Files with missing lines Patch % Lines
...sessionreplay/internal/recorder/resources/Cache.kt 0.00% 2 Missing ⚠️
...internal/recorder/resources/BitmapCachesManager.kt 66.67% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2418      +/-   ##
===========================================
+ Coverage    70.12%   70.20%   +0.08%     
===========================================
  Files          767      767              
  Lines        28490    28503      +13     
  Branches      4778     4781       +3     
===========================================
+ Hits         19977    20008      +31     
+ Misses        7170     7155      -15     
+ Partials      1343     1340       -3     
Files with missing lines Coverage Δ
...onreplay/internal/recorder/resources/BitmapPool.kt 87.50% <100.00%> (ø)
.../recorder/resources/DefaultImageWireframeHelper.kt 95.14% <100.00%> (+0.03%) ⬆️
...ay/internal/recorder/resources/ResourceResolver.kt 92.59% <100.00%> (+0.72%) ⬆️
...y/internal/recorder/resources/ResourcesLRUCache.kt 67.57% <100.00%> (-6.12%) ⬇️
...ndroid/sessionreplay/utils/ImageWireframeHelper.kt 66.67% <100.00%> (+11.11%) ⬆️
...internal/recorder/resources/BitmapCachesManager.kt 95.65% <66.67%> (-4.35%) ⬇️
...sessionreplay/internal/recorder/resources/Cache.kt 25.00% <0.00%> (ø)

... and 32 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants