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(sanity): add release layering support to groq2024 search strategy #8251

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

juice49
Copy link
Contributor

@juice49 juice49 commented Jan 13, 2025

Description

This branch adds release layering support to the groq2024 search strategy, matching the changes we've already made to the current default search strategy to support release layering.

What to review

  • The perspective parameter is set correctly.

Testing

  • Added unit tests.
  • Open a document list while release layering is in effect and the groq2024 search strategy is active (e.g. using Test Studio). The GROQ query with the pragma findability-source: list should include a perspective parameter consisting of a CSV of release ids to layer.

Copy link

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

Copy link
Contributor

No changes to documentation

Copy link
Contributor

github-actions bot commented Jan 13, 2025

Component Testing Report Updated Jan 15, 2025 12:16 AM (UTC)

✅ All Tests Passed -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 1m 4s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 12s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 38s 6 0 0
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 29s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 40s 18 0 0
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 13, 2025

⚡️ Editor Performance Report

Updated Wed, 15 Jan 2025 00:18:18 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 23.8 efps (42ms) 27.8 efps (36ms) -6ms (-14.3%)
article (body) 63.5 efps (16ms) 67.3 efps (15ms) -1ms (-/-%)
article (string inside object) 27.0 efps (37ms) 29.4 efps (34ms) -3ms (-8.1%)
article (string inside array) 22.2 efps (45ms) 25.6 efps (39ms) -6ms (-13.3%)
recipe (name) 52.6 efps (19ms) 60.6 efps (17ms) -3ms (-13.2%)
recipe (description) 58.8 efps (17ms) 66.7 efps (15ms) -2ms (-11.8%)
recipe (instructions) 99.9+ efps (5ms) 99.9+ efps (6ms) +1ms (-/-%)
synthetic (title) 18.5 efps (54ms) 20.4 efps (49ms) -5ms (-9.3%)
synthetic (string inside object) 19.2 efps (52ms) 20.2 efps (50ms) -3ms (-4.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) 42ms 52ms 71ms 510ms 879ms 10.9s
article (body) 16ms 17ms 20ms 65ms 73ms 5.5s
article (string inside object) 37ms 40ms 42ms 86ms 146ms 6.6s
article (string inside array) 45ms 47ms 51ms 91ms 235ms 7.1s
recipe (name) 19ms 21ms 24ms 40ms 0ms 6.8s
recipe (description) 17ms 18ms 19ms 38ms 0ms 4.3s
recipe (instructions) 5ms 6ms 7ms 7ms 0ms 3.0s
synthetic (title) 54ms 55ms 58ms 310ms 856ms 13.1s
synthetic (string inside object) 52ms 57ms 74ms 450ms 1185ms 8.6s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 36ms 59ms 67ms 474ms 782ms 10.7s
article (body) 15ms 17ms 19ms 73ms 84ms 5.2s
article (string inside object) 34ms 37ms 45ms 263ms 280ms 7.2s
article (string inside array) 39ms 45ms 52ms 94ms 303ms 7.0s
recipe (name) 17ms 18ms 25ms 47ms 0ms 6.5s
recipe (description) 15ms 17ms 18ms 34ms 0ms 4.4s
recipe (instructions) 6ms 7ms 8ms 9ms 0ms 3.4s
synthetic (title) 49ms 51ms 59ms 91ms 390ms 12.8s
synthetic (string inside object) 50ms 53ms 64ms 260ms 1067ms 8.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.

@juice49 juice49 force-pushed the feat/corel/groq-2024-perspectives branch 3 times, most recently from 3918f8e to 1bf9f56 Compare January 13, 2025 16:55
@juice49 juice49 marked this pull request as ready for review January 14, 2025 13:07
@juice49 juice49 requested a review from a team as a code owner January 14, 2025 13:07
@juice49 juice49 requested review from ricokahler and jordanl17 and removed request for a team and ricokahler January 14, 2025 13:07
@juice49 juice49 force-pushed the feat/corel/groq-2024-perspectives branch from 98e9a5f to 183a542 Compare January 14, 2025 23:50
@juice49 juice49 force-pushed the feat/corel/groq-2024-perspectives branch from 183a542 to 8226ef8 Compare January 15, 2025 00:03
@@ -127,11 +130,27 @@ export function createSearchQuery(
.map((s) => `// ${s}`)
.join('\n')

let activePerspective: string | string[] | undefined
Copy link
Member

Choose a reason for hiding this comment

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

COULD:

Suggested change
let activePerspective: string | string[] | undefined
let activePerspective: SearchOptions['perspective']

Or this does make me wonder if the type of SearchOptions.perspective could be somewhat more narrowly scoped than just string | string[]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's funny you mention that. I'm currently making some changes in another branch to try and unify this a bit. @sanity/client provides a dedicated ClientPerspective type, but we tend to simply use string[] in a lot of places.

IMO: not necessarily worth addressing in this branch, but something we should shore up across the codebase. Definitely a good point.

@juice49 juice49 merged commit 489120f into corel Jan 15, 2025
56 checks passed
@juice49 juice49 deleted the feat/corel/groq-2024-perspectives branch January 15, 2025 10:31
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