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(codegen): migrate codegen tests to vitest #7741

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

binoy14
Copy link
Contributor

@binoy14 binoy14 commented Nov 4, 2024

Description

Migrates codegen tests to vitest

What to review

Changes makes sense

Testing

Existing tests should pass

Notes for release

N/A

Copy link

vercel bot commented Nov 4, 2024

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 Nov 4, 2024 5:15pm
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 4, 2024 5:15pm
test-compiled-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 4, 2024 5:15pm
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 4, 2024 5:15pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 4, 2024 5:15pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Nov 4, 2024 5:15pm

Copy link
Contributor Author

binoy14 commented Nov 4, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @binoy14 and the rest of your teammates on Graphite Graphite

@binoy14 binoy14 force-pushed the 11-04-test_codegen_migrate_codegen_tests_to_vitest branch from 3862728 to ace764f Compare November 4, 2024 17:03
Copy link
Contributor

github-actions bot commented Nov 4, 2024

No changes to documentation

Copy link
Contributor

github-actions bot commented Nov 4, 2024

Component Testing Report Updated Nov 4, 2024 5:12 PM (UTC)

✅ All Tests Passed -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 47s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 9s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 33s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 39s 11 7 0
formBuilder/inputs/PortableText/copyPaste/CopyPasteFields.spec.tsx ✅ Passed (Inspect) 0s 0 12 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 19s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 10s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ✅ Passed (Inspect) 3m 0s 0 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 46s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 42s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 17s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 8s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 27s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 18s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 36s 12 0 0
formBuilder/tree-editing/TreeEditing.spec.tsx ✅ Passed (Inspect) 0s 0 3 0
formBuilder/tree-editing/TreeEditingNestedObjects.spec.tsx ✅ Passed (Inspect) 0s 0 3 0

Copy link
Contributor

github-actions bot commented Nov 4, 2024

⚡️ Editor Performance Report

Updated Mon, 04 Nov 2024 17:15:02 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 16.1 efps (62ms) 17.5 efps (57ms) -5ms (-8.1%)
article (body) 51.8 efps (19ms) 56.0 efps (18ms) -1ms (-7.5%)
article (string inside object) 17.7 efps (57ms) 17.1 efps (59ms) +2ms (+3.5%)
article (string inside array) 15.5 efps (65ms) 15.9 efps (63ms) -2ms (-2.3%)
recipe (name) 28.6 efps (35ms) 28.6 efps (35ms) +0ms (-/-%)
recipe (description) 32.3 efps (31ms) 33.3 efps (30ms) -1ms (-3.2%)
recipe (instructions) 99.9+ efps (7ms) 99.9+ efps (7ms) +0ms (-/-%)
synthetic (title) 13.5 efps (74ms) 14.8 efps (68ms) -7ms (-8.8%)
synthetic (string inside object) 14.3 efps (70ms) 14.5 efps (69ms) -1ms (-1.4%)

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) 62ms 67ms 80ms 228ms 426ms 14.4s
article (body) 19ms 22ms 40ms 209ms 282ms 6.2s
article (string inside object) 57ms 60ms 66ms 213ms 318ms 8.7s
article (string inside array) 65ms 68ms 86ms 227ms 785ms 9.2s
recipe (name) 35ms 38ms 51ms 99ms 0ms 9.5s
recipe (description) 31ms 32ms 36ms 97ms 0ms 6.1s
recipe (instructions) 7ms 9ms 10ms 23ms 6ms 3.4s
synthetic (title) 74ms 77ms 102ms 410ms 1837ms 16.4s
synthetic (string inside object) 70ms 74ms 85ms 428ms 1099ms 10.4s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 57ms 62ms 70ms 106ms 405ms 13.7s
article (body) 18ms 22ms 38ms 265ms 338ms 6.2s
article (string inside object) 59ms 62ms 71ms 307ms 538ms 9.2s
article (string inside array) 63ms 68ms 72ms 189ms 716ms 9.0s
recipe (name) 35ms 37ms 63ms 89ms 16ms 9.5s
recipe (description) 30ms 32ms 40ms 145ms 0ms 6.3s
recipe (instructions) 7ms 9ms 11ms 12ms 0ms 3.5s
synthetic (title) 68ms 72ms 84ms 313ms 1473ms 16.2s
synthetic (string inside object) 69ms 74ms 98ms 359ms 1548ms 9.9s

📚 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.

@binoy14 binoy14 marked this pull request as ready for review November 4, 2024 17:24
@binoy14 binoy14 requested a review from a team as a code owner November 4, 2024 17:24
@binoy14 binoy14 requested review from a team and ryanbonial and removed request for a team November 4, 2024 17:26
@rexxars rexxars requested a review from sgulseth November 4, 2024 21:50
Copy link
Member

@sgulseth sgulseth left a comment

Choose a reason for hiding this comment

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

nice! 👍

@binoy14 binoy14 added this pull request to the merge queue Nov 5, 2024
Merged via the queue into next with commit c799d28 Nov 5, 2024
69 checks passed
@binoy14 binoy14 deleted the 11-04-test_codegen_migrate_codegen_tests_to_vitest branch November 5, 2024 06:47
bjoerge added a commit that referenced this pull request Nov 5, 2024
* next:
  chore(deps): dedupe pnpm-lock.yaml (#7752)
  chore(deps): update react monorepo (#7753)
  fix(deps): update dependency react-rx to ^4.1.3 (#7744)
  fix(deps): update dependency @sanity/ui to ^2.8.19 (#7742)
  fix(deps): update dependency @portabletext/editor to ^1.5.4 (#7737)
  fix(deps): update dependency @sanity/presentation to v1.17.8 (#7743)
  test(codegen): migrate codegen tests to vitest (#7741)
  fix: invalid locale namespace specified for create (#7732)
  chore(deps): update dependency @sanity/prettier-config to ^1.0.3 (#7733)
  fix(deps): update dependency react-rx to ^4.1.1 (#7739)
  fix(deps): update dependency groq-js to ^1.14.0 (#7738)
  test(cli): migrate cli tests to vitest (#7731)
  fix(core): export BetaFeatures and ScheduledPublishing types (#7659)
  chore(test-studio): update dependency @portabletext/editor to ^1.4.1 (#7734)
  fix(deps): update dependency @portabletext/editor to ^1.4.1 (#7735)
  fix(deps): update dependency @portabletext/editor to ^1.4.0 (#7729)
  fix(deps): update dependency @sanity/ui to ^2.8.18 (#7730)
  fix(deps): Update dev-non-major (#7724)
  fix(deps): update dependency @sanity/ui to ^2.8.17 (#7725)
  fix(deps): update dependency @portabletext/editor to ^1.3.0 (#7727)
bjoerge added a commit that referenced this pull request Nov 5, 2024
* next: (49 commits)
  v3.63.0
  chore(scripts): reordering blocks in release notes template script (#7758)
  chore(deps): update dependency babel-plugin-react-compiler to v19 (#7755)
  fix(deps): Update dev-non-major (#7736)
  chore(deps): dedupe pnpm-lock.yaml (#7752)
  chore(deps): update react monorepo (#7753)
  fix(deps): update dependency react-rx to ^4.1.3 (#7744)
  fix(deps): update dependency @sanity/ui to ^2.8.19 (#7742)
  fix(deps): update dependency @portabletext/editor to ^1.5.4 (#7737)
  fix(deps): update dependency @sanity/presentation to v1.17.8 (#7743)
  test(codegen): migrate codegen tests to vitest (#7741)
  fix: invalid locale namespace specified for create (#7732)
  chore(deps): update dependency @sanity/prettier-config to ^1.0.3 (#7733)
  fix(deps): update dependency react-rx to ^4.1.1 (#7739)
  fix(deps): update dependency groq-js to ^1.14.0 (#7738)
  test(cli): migrate cli tests to vitest (#7731)
  fix(core): export BetaFeatures and ScheduledPublishing types (#7659)
  chore(test-studio): update dependency @portabletext/editor to ^1.4.1 (#7734)
  fix(deps): update dependency @portabletext/editor to ^1.4.1 (#7735)
  fix(deps): update dependency @portabletext/editor to ^1.4.0 (#7729)
  ...
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