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: add efps to CI #7556

Open
wants to merge 7 commits into
base: next
Choose a base branch
from
Open

test: add efps to CI #7556

wants to merge 7 commits into from

Conversation

ricokahler
Copy link
Contributor

@ricokahler ricokahler commented Sep 29, 2024

Description

The following PR:

  1. Revamps the eFPS performance suite to compare the results of the benchmark to a released tag on npm. This is set to latest by default.
  2. Adds a efps.yml workflow file that runs the eFPS suite and includes the results as a comment in PRs.

In addition to 1, the eFPS suite has also be updated to rerun the tests 3 times in CI and then the best performing value is taken. This is to mitigate against noisy neighbors. I've found that comparing the median performance between two different runs and re-running the tests 3 times yield relatively stable results for the relatively unstable environment. Hopefully this provides a good signal on performance without requiring the complex infrastructure.

What to review

  • Take a look at the output here and see if everything makes sense or if you have any suggestions
  • Take a look at the changes to the eFPS suite. Do they all make sense?
  • Take a look at the workflow file as well.

Testing

Tested many times in a different branch to see how it would look in CI.

Notes for release

N/A - internal only

Copy link

vercel bot commented Sep 29, 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 Sep 30, 2024 9:11pm
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 30, 2024 9:11pm
test-compiled-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 30, 2024 9:11pm
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 30, 2024 9:11pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 30, 2024 9:11pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Sep 30, 2024 9:11pm

Copy link
Contributor

No changes to documentation

Copy link
Contributor

github-actions bot commented Sep 29, 2024

Component Testing Report Updated Sep 30, 2024 9:15 PM (UTC)

✅ All Tests Passed -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 42s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 8s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 31s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 36s 11 7 0
formBuilder/inputs/PortableText/copyPaste/CopyPasteFields.spec.tsx ✅ Passed (Inspect) 0s 0 12 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 17s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 11s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ✅ Passed (Inspect) 3m 0s 0 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 45s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 43s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 16s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 9s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 26s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 18s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 35s 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 Sep 29, 2024

⚡️ Editor Performance Report

Updated Mon, 30 Sep 2024 21:21:06 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 16.7 efps (60ms) 15.6 efps (64ms) +4ms (+6.7%)
article (body) 53.5 efps (19ms) 56.2 efps (18ms) -1ms (-4.8%)
article (string inside object) 17.5 efps (57ms) 16.9 efps (59ms) +2ms (+3.5%)
article (string inside array) 14.1 efps (71ms) 13.2 efps (76ms) +5ms (+6.3%)
recipe (name) 29.4 efps (34ms) 29.4 efps (34ms) +0ms (-/-%)
recipe (description) 33.3 efps (30ms) 31.3 efps (32ms) +2ms (+6.7%)
recipe (instructions) 99.9+ efps (7ms) 99.9+ efps (7ms) +0ms (-/-%)
synthetic (title) 14.9 efps (67ms) 14.5 efps (69ms) +2ms (+3.0%)
synthetic (string inside object) 16.0 efps (63ms) 15.2 efps (66ms) +4ms (+5.6%)

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) 60ms 63ms 72ms 173ms 1299ms 13.9s
article (body) 19ms 21ms 29ms 149ms 225ms 6.0s
article (string inside object) 57ms 63ms 71ms 132ms 1085ms 9.7s
article (string inside array) 71ms 77ms 92ms 137ms 1824ms 10.3s
recipe (name) 34ms 38ms 41ms 58ms 35ms 8.8s
recipe (description) 30ms 32ms 36ms 66ms 25ms 6.4s
recipe (instructions) 7ms 8ms 9ms 27ms 0ms 3.2s
synthetic (title) 67ms 70ms 81ms 216ms 1877ms 16.8s
synthetic (string inside object) 63ms 67ms 80ms 306ms 1824ms 10.0s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 64ms 68ms 76ms 204ms 1440ms 15.5s
article (body) 18ms 19ms 22ms 108ms 174ms 5.9s
article (string inside object) 59ms 62ms 67ms 158ms 1205ms 9.5s
article (string inside array) 76ms 86ms 96ms 147ms 1885ms 10.7s
recipe (name) 34ms 36ms 40ms 61ms 81ms 9.1s
recipe (description) 32ms 35ms 37ms 83ms 22ms 6.5s
recipe (instructions) 7ms 9ms 10ms 22ms 0ms 3.4s
synthetic (title) 69ms 71ms 80ms 278ms 1967ms 17.2s
synthetic (string inside object) 66ms 68ms 73ms 265ms 1779ms 10.3s

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

@rexxars rexxars left a comment

Choose a reason for hiding this comment

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

Great work. See my comment on requestIdleCallback.

perf/efps/helpers/measureBlockingTime.ts Outdated Show resolved Hide resolved
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.

3 participants