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(core): update events api routes and config flags #8369

Open
wants to merge 3 commits into
base: corel
Choose a base branch
from

Conversation

pedrobonamin
Copy link
Contributor

@pedrobonamin pedrobonamin commented Jan 22, 2025

Description

This PR updates the events api routes that we were using.
The routes now will be:

  • Documents events: data/history/{datasetName}/events/documents/{ids}
  • Release events data/history/{datasetName}/events/releases/{id}

It also modifies the config flag we have added for the events api and enables it by default for documents events for all the studios.
It's kept as a flag in case we need to turn it off.

Releases events are not ready to be used by everyone yet, so a new flag has been added to handle this. It will be enabled by default in the playground studio.

It also updates the sort algorithm for the events, given the timestamp validation is not the only check necessary, because edit and publish events now have the same timestamp and the order was incorrect.

What to review

Testing

Notes for release

@pedrobonamin pedrobonamin requested a review from a team as a code owner January 22, 2025 15:50
@pedrobonamin pedrobonamin requested review from ricokahler and removed request for a team January 22, 2025 15:50
Copy link

vercel bot commented Jan 22, 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 Jan 23, 2025 2:47pm
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2025 2:47pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2025 2:47pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Jan 23, 2025 2:47pm
test-next-studio ⬜️ Ignored (Inspect) Jan 23, 2025 2:47pm

Copy link
Contributor

No changes to documentation

Copy link
Contributor

github-actions bot commented Jan 22, 2025

Component Testing Report Updated Jan 23, 2025 2:49 PM (UTC)

❌ Failed Tests (2) -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 1m 5s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 12s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ❌ Failed (Inspect) 1m 19s 5 0 1
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 51s 11 7 0
formBuilder/inputs/PortableText/copyPaste/CopyPasteFields.spec.tsx ✅ Passed (Inspect) 0s 0 12 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 26s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 14s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ✅ Passed (Inspect) 27s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 1m 7s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 32s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ❌ Failed (Inspect) 2m 42s 20 0 1
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 13s 3 9 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 26s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 1m 44s 21 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 Jan 22, 2025

⚡️ Editor Performance Report

Updated Thu, 23 Jan 2025 14:50:52 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 25.6 efps (39ms) 27.0 efps (37ms) -2ms (-5.1%)
article (body) 75.2 efps (13ms) 67.8 efps (15ms) +1ms (-/-%)
article (string inside object) 27.8 efps (36ms) 26.7 efps (38ms) +2ms (+4.2%)
article (string inside array) 23.5 efps (43ms) 23.3 efps (43ms) +1ms (+1.2%)
recipe (name) 50.0 efps (20ms) 62.5 efps (16ms) -4ms (-20.0%)
recipe (description) 55.6 efps (18ms) 60.6 efps (17ms) -2ms (-8.3%)
recipe (instructions) 99.9+ efps (5ms) 99.9+ efps (6ms) +1ms (-/-%)
synthetic (title) 19.2 efps (52ms) 20.8 efps (48ms) -4ms (-7.7%)
synthetic (string inside object) 19.4 efps (52ms) 21.3 efps (47ms) -5ms (-8.7%)

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) 39ms 41ms 52ms 257ms 174ms 9.8s
article (body) 13ms 15ms 26ms 147ms 213ms 5.2s
article (string inside object) 36ms 37ms 39ms 72ms 140ms 6.5s
article (string inside array) 43ms 46ms 52ms 190ms 245ms 7.0s
recipe (name) 20ms 22ms 24ms 44ms 0ms 7.4s
recipe (description) 18ms 19ms 21ms 23ms 0ms 4.4s
recipe (instructions) 5ms 7ms 8ms 12ms 0ms 3.1s
synthetic (title) 52ms 54ms 61ms 135ms 726ms 12.5s
synthetic (string inside object) 52ms 55ms 68ms 471ms 1084ms 8.6s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 37ms 43ms 48ms 529ms 316ms 13.0s
article (body) 15ms 17ms 21ms 75ms 61ms 5.0s
article (string inside object) 38ms 40ms 42ms 71ms 160ms 7.0s
article (string inside array) 43ms 45ms 51ms 63ms 229ms 7.1s
recipe (name) 16ms 19ms 21ms 39ms 0ms 7.4s
recipe (description) 17ms 17ms 20ms 28ms 0ms 4.5s
recipe (instructions) 6ms 7ms 9ms 19ms 0ms 3.1s
synthetic (title) 48ms 53ms 86ms 213ms 840ms 13.3s
synthetic (string inside object) 47ms 49ms 50ms 89ms 209ms 7.6s

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

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.

1 participant