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

test(core): enhance tests for useActiveReleases and add ReleaseDocumentPreview tests #8944

Merged
merged 3 commits into from
Mar 14, 2025

Conversation

jordanl17
Copy link
Member

@jordanl17 jordanl17 commented Mar 14, 2025

Description

Further testing for releases

What to review

Testing

Just tests

Notes for release

N/A

…ntPreview tests
Copy link

vercel bot commented Mar 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
page-building-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 14, 2025 2:59pm
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 14, 2025 2:59pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 14, 2025 2:59pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Mar 14, 2025 2:59pm
test-next-studio ⬜️ Ignored (Inspect) Mar 14, 2025 2:59pm

Copy link
Contributor

No changes to documentation

Copy link
Contributor

github-actions bot commented Mar 14, 2025

⚡️ Editor Performance Report

Updated Fri, 14 Mar 2025 15:04:43 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 20.8 efps (48ms) 19.2 efps (52ms) +4ms (+8.3%)
article (body) 67.3 efps (15ms) 72.5 efps (14ms) -1ms (-/-%)
article (string inside object) 20.8 efps (48ms) 19.8 efps (51ms) +3ms (+5.2%)
article (string inside array) 17.9 efps (56ms) 17.9 efps (56ms) +0ms (-/-%)
recipe (name) 43.5 efps (23ms) 33.3 efps (30ms) +7ms (+30.4%) 🔴
recipe (description) 45.5 efps (22ms) 35.7 efps (28ms) +6ms (+27.3%) 🔴
recipe (instructions) 99.9+ efps (5ms) 99.9+ efps (5ms) +0ms (-/-%)
synthetic (title) 19.6 efps (51ms) 18.9 efps (53ms) +2ms (+3.9%)
synthetic (string inside object) 19.4 efps (52ms) 19.2 efps (52ms) +1ms (+1.0%)

efps — editor "frames per second". The number of updates assumed to be possible within a second.

Derived from input latency. efps = 1000 / input_latency

Detailed information

🏠 Reference result

The performance result of sanity@latest

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 48ms 52ms 64ms 256ms 1134ms 12.4s
article (body) 15ms 18ms 23ms 66ms 210ms 5.8s
article (string inside object) 48ms 50ms 53ms 62ms 773ms 8.2s
article (string inside array) 56ms 57ms 62ms 66ms 951ms 8.2s
recipe (name) 23ms 25ms 27ms 64ms 3ms 7.5s
recipe (description) 22ms 25ms 27ms 32ms 0ms 5.0s
recipe (instructions) 5ms 7ms 8ms 9ms 0ms 3.1s
synthetic (title) 51ms 54ms 56ms 218ms 745ms 13.5s
synthetic (string inside object) 52ms 54ms 62ms 98ms 475ms 7.8s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 52ms 72ms 89ms 401ms 1459ms 13.2s
article (body) 14ms 16ms 22ms 137ms 180ms 5.3s
article (string inside object) 51ms 53ms 57ms 231ms 869ms 8.2s
article (string inside array) 56ms 58ms 61ms 150ms 1137ms 8.5s
recipe (name) 30ms 32ms 37ms 52ms 0ms 7.6s
recipe (description) 28ms 30ms 31ms 38ms 0ms 4.9s
recipe (instructions) 5ms 7ms 9ms 34ms 0ms 3.1s
synthetic (title) 53ms 56ms 61ms 255ms 933ms 13.4s
synthetic (string inside object) 52ms 54ms 57ms 65ms 629ms 7.8s

📚 Glossary

column definitions

  • benchmark — the name of the test, e.g. "article", followed by the label of the field being measured, e.g. "(title)".
  • latency — the time between when a key was pressed and when it was rendered. derived from a set of samples. the median (p50) is shown to show the most common latency.
  • p75 — the 75th percentile of the input latency in the test run. 75% of the sampled inputs in this benchmark were processed faster than this value. this provides insight into the upper range of typical performance.
  • p90 — the 90th percentile of the input latency in the test run. 90% of the sampled inputs were faster than this. this metric helps identify slower interactions that occurred less frequently during the benchmark.
  • p99 — the 99th percentile of the input latency in the test run. only 1% of sampled inputs were slower than this. this represents the worst-case scenarios encountered during the benchmark, useful for identifying potential performance outliers.
  • blocking time — the total time during which the main thread was blocked, preventing user input and UI updates. this metric helps identify performance bottlenecks that may cause the interface to feel unresponsive.
  • test duration — how long the test run took to complete.

Copy link
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 42.2% 54656 / 129500
🔵 Statements 42.2% 54656 / 129500
🔵 Functions 47.12% 2745 / 5825
🔵 Branches 79.42% 10256 / 12912
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/sanity/src/core/releases/store/__tests__/__mocks/useActiveReleases.mock.ts 100% 100% 100% 100%
packages/sanity/src/core/releases/tool/components/ReleaseDocumentPreview.tsx 100% 95.65% 100% 100%
Generated in workflow #32368 for commit 0f56772 by the Vitest Coverage Report Action

@jordanl17
Copy link
Member Author

@RitaDias minor update here to the useActiveReleases.mock - turns out it already existed so I just amended it slightly

Copy link
Contributor

@RitaDias RitaDias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@jordanl17 jordanl17 merged commit 9109f0f into next Mar 14, 2025
61 checks passed
@jordanl17 jordanl17 deleted the test/ReleaeDocumentPreview-test branch March 14, 2025 23:01
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.

None yet

2 participants