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-260] Support bfcache restore for web vitals #3357

Closed
wants to merge 2 commits into from

Conversation

RomanGaignault
Copy link
Contributor

@RomanGaignault RomanGaignault commented Feb 20, 2025

Motivation

Users navigating back to a page via the browser’s back-forward cache do not experience a full page reload. Therefore, initial performance metrics may no longer accurately represent what the user sees upon restoration. By capturing metrics specifically for bfCache restores, we gain a more precise understanding of user-perceived performance.

Changes

This PR introduces support for detecting and handling the Back-Forward Cache (bfCache). When a page is restored from bfCache (i.e., a pageshow event with persisted = true)

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

@RomanGaignault RomanGaignault requested a review from a team as a code owner February 20, 2025 09:22
@RomanGaignault RomanGaignault marked this pull request as draft February 20, 2025 09:23
@codecov-commenter
Copy link

codecov-commenter commented Feb 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.04%. Comparing base (faa6d5e) to head (2a94df5).
Report is 14 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3357      +/-   ##
==========================================
+ Coverage   93.02%   93.04%   +0.02%     
==========================================
  Files         298      300       +2     
  Lines        7853     7883      +30     
  Branches     1789     1790       +1     
==========================================
+ Hits         7305     7335      +30     
  Misses        548      548              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

cit-pr-commenter bot commented Feb 20, 2025

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 147.69 KiB 148.36 KiB 688 B +0.45%
Logs 51.65 KiB 51.65 KiB 0 B 0.00%
Rum Slim 106.42 KiB 107.08 KiB 682 B +0.63%
Worker 24.50 KiB 24.50 KiB 0 B 0.00%
🚀 CPU Performance
Action Name Base Average Cpu Time (ms) Local Average Cpu Time (ms) 𝚫
addglobalcontext 0.002 0.003 0.001
addaction 0.038 0.058 0.020
addtiming 0.001 0.001 0.000
adderror 0.051 0.072 0.022
startstopsessionreplayrecording 0.007 0.011 0.004
startview 0.394 0.526 0.131
logmessage 0.023 0.027 0.004
🧠 Memory Performance
Action Name Base Consumption Memory (bytes) Local Consumption Memory (bytes) 𝚫 (bytes)
addglobalcontext 31.47 KiB 28.84 KiB -2697 B
addaction 58.93 KiB 55.51 KiB -3508 B
addtiming 32.09 KiB 26.42 KiB -5805 B
adderror 63.03 KiB 56.94 KiB -6239 B
startstopsessionreplayrecording 25.77 KiB 25.51 KiB -263 B
startview 423.91 KiB 424.02 KiB 108 B
logmessage 60.48 KiB 57.98 KiB -2562 B

🔗 RealWorld

@RomanGaignault RomanGaignault marked this pull request as ready for review February 20, 2025 19:51
@RomanGaignault
Copy link
Contributor Author

/to-staging

@dd-devflow
Copy link
Contributor

dd-devflow bot commented Feb 20, 2025

View all feedbacks in Devflow UI.
2025-02-20 21:11:27 UTC ℹ️ Start processing command /to-staging


2025-02-20 21:11:31 UTC ℹ️ Branch Integration: starting soon, median merge time is 13m38s

Commit 2a94df54cb will soon be integrated into staging-08.


2025-02-20 21:44:19 UTC ℹ️ Branch Integration: This commit was successfully integrated

Commit 2a94df54cb has been merged into staging-08 in merge commit 3291b7c64b.

Check out the triggered pipeline on Gitlab 🦊

If you need to revert this integration, you can use the following command: /code revert-integration -b staging-08

dd-mergequeue bot added a commit that referenced this pull request Feb 20, 2025
…r web vitals

Integrated commit sha: 2a94df5

Co-authored-by: roman.gaignault <[email protected]>
@RomanGaignault RomanGaignault marked this pull request as draft February 21, 2025 23:29
@RomanGaignault RomanGaignault reopened this Apr 2, 2025
@RomanGaignault RomanGaignault marked this pull request as ready for review April 2, 2025 09:24
@RomanGaignault RomanGaignault marked this pull request as draft April 2, 2025 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants