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

feat: propagate PairListenerOptions; add telemetry for OutOfSyncError #7595

Merged
merged 3 commits into from
Oct 8, 2024

Conversation

ricokahler
Copy link
Contributor

Description

The following builds off of #7576. This PR:

  • Propagates the PairListenerOptions through the document-store
  • Adds telemetry for when the onSyncErrorRecovery fires.

What to review

  • Did I cover all APIs that need to propagate this? Seemed best to add it to the document-store options instead of each individual method
  • Am I logging the telemetry event correctly?

Testing

  • There were no existing tests for the document-store so I just manually tested that this fired
  • I also went through all the types and ensured that the option was propagated correctly

Notes for release

N/A - this one builds off of #7576 but is mostly internal changes

@ricokahler ricokahler requested a review from bjoerge October 4, 2024 21:56
@ricokahler ricokahler requested review from a team as code owners October 4, 2024 21:56
@ricokahler ricokahler requested review from cngonzalez and removed request for a team October 4, 2024 21:56
Copy link

vercel bot commented Oct 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 Oct 8, 2024 10:32am
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 8, 2024 10:32am
test-compiled-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 8, 2024 10:32am
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 8, 2024 10:32am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 8, 2024 10:32am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Oct 8, 2024 10:32am

@ricokahler ricokahler removed the request for review from cngonzalez October 4, 2024 21:56
Copy link
Contributor

github-actions bot commented Oct 4, 2024

No changes to documentation

Copy link
Contributor

github-actions bot commented Oct 4, 2024

Component Testing Report Updated Oct 8, 2024 10:29 AM (UTC)

✅ All Tests Passed -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 43s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 8s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 32s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 38s 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) 10s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ✅ Passed (Inspect) 2m 33s 1 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 Oct 4, 2024

⚡️ Editor Performance Report

Updated Tue, 08 Oct 2024 10:41:17 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 17.5 efps (57ms) 16.9 efps (59ms) +2ms (+3.5%)
article (body) 56.3 efps (18ms) 58.1 efps (17ms) -1ms (-3.1%)
article (string inside object) 18.3 efps (55ms) 17.9 efps (56ms) +2ms (+2.8%)
article (string inside array) 14.9 efps (67ms) 14.3 efps (70ms) +3ms (+4.5%)
recipe (name) 30.3 efps (33ms) 31.3 efps (32ms) -1ms (-3.0%)
recipe (description) 34.5 efps (29ms) 34.5 efps (29ms) +0ms (-/-%)
recipe (instructions) 99.9+ efps (6ms) 99.9+ efps (6ms) +0ms (-/-%)
synthetic (title) 14.7 efps (68ms) 15.2 efps (66ms) -2ms (-2.9%)
synthetic (string inside object) 16.0 efps (63ms) 16.1 efps (62ms) -1ms (-0.8%)

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) 57ms 63ms 70ms 130ms 1323ms 15.3s
article (body) 18ms 21ms 31ms 85ms 232ms 5.9s
article (string inside object) 55ms 59ms 71ms 219ms 1035ms 9.0s
article (string inside array) 67ms 71ms 81ms 126ms 1766ms 9.8s
recipe (name) 33ms 36ms 47ms 75ms 37ms 9.3s
recipe (description) 29ms 30ms 34ms 61ms 36ms 6.2s
recipe (instructions) 6ms 8ms 10ms 25ms 0ms 3.3s
synthetic (title) 68ms 77ms 88ms 154ms 2265ms 17.8s
synthetic (string inside object) 63ms 65ms 72ms 315ms 1892ms 10.3s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 59ms 65ms 83ms 197ms 1467ms 14.9s
article (body) 17ms 19ms 50ms 115ms 238ms 6.1s
article (string inside object) 56ms 59ms 68ms 187ms 1183ms 9.4s
article (string inside array) 70ms 76ms 94ms 261ms 2195ms 10.5s
recipe (name) 32ms 34ms 37ms 61ms 55ms 9.0s
recipe (description) 29ms 31ms 39ms 65ms 42ms 6.5s
recipe (instructions) 6ms 8ms 9ms 10ms 0ms 3.2s
synthetic (title) 66ms 70ms 77ms 392ms 2270ms 15.8s
synthetic (string inside object) 62ms 65ms 80ms 291ms 2099ms 10.5s

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

bjoerge
bjoerge previously approved these changes Oct 7, 2024
Copy link
Member

@bjoerge bjoerge left a comment

Choose a reason for hiding this comment

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

Looks good from my side. Would like a review from @sanity-io/growth on the event name.

@bjoerge bjoerge added this pull request to the merge queue Oct 8, 2024
Merged via the queue into next with commit d96f890 Oct 8, 2024
63 checks passed
@bjoerge bjoerge deleted the sdk-5 branch October 8, 2024 10:42
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