Repository navigation
Add dispatch totals to detector performance - #3234
Draft
GuiltyDolphin wants to merge 1 commit into
Draft
GuiltyDolphin wants to merge 1 commit into
GuiltyDolphin wants to merge 1 commit into
Conversation
Contributor
Build Branch
Static preview entry points
QR codes (mobile preview)
Integration commandsnpm (Android / Extension): Swift Package Manager (Apple): .package(url: "https://github.com/duckduckgo/content-scope-scripts.git", branch: "pr-releases/gd-c-web-detection-dispatch-totals")git submodule (Windows): git -C submodules/content-scope-scripts fetch origin pr-releases/gd-c-web-detection-dispatch-totals
git -C submodules/content-scope-scripts checkout origin/pr-releases/gd-c-web-detection-dispatch-totalsPin to exact commitnpm (Android / Extension): Swift Package Manager (Apple): .package(url: "https://github.com/duckduckgo/content-scope-scripts.git", revision: "fa910a07a7cea6caf092add2d008cd5c99c4058e")git submodule (Windows): git -C submodules/content-scope-scripts fetch origin pr-releases/gd-c-web-detection-dispatch-totals
git -C submodules/content-scope-scripts checkout fa910a07a7cea6caf092add2d008cd5c99c4058e |
Contributor
[Beta] Generated file diffTime updated: Mon, 30 Nov 2026 12:58:58 GMT Android
File has changed AppleFile has changed Chrome-mv3File has changed FirefoxFile has changed IntegrationFile has changed WindowsFile has changed |
This was referenced Nov 23, 2026
GuiltyDolphin
force-pushed
the
gd-c-web-detection-dispatch-totals
branch
2 times, most recently
from
November 25, 2026 13:28
0737474 to
0a22cc8
Compare
GuiltyDolphin
force-pushed
the
gd-c-web-detection-dispatch-totals
branch
from
November 25, 2026 17:46
0a22cc8 to
5f3fd48
Compare
GuiltyDolphin
force-pushed
the
gd-c-web-detection-dispatch-totals
branch
from
November 25, 2026 19:18
5f3fd48 to
ac01ac5
Compare
GuiltyDolphin
force-pushed
the
gd-c-web-detection-dispatch-totals
branch
from
November 25, 2026 20:50
ac01ac5 to
c2f8ff0
Compare
GuiltyDolphin
force-pushed
the
gd-c-web-detection-dispatch-totals
branch
from
November 25, 2026 21:54
c2f8ff0 to
1e12f15
Compare
GuiltyDolphin
force-pushed
the
gd-c-web-detection-dispatch-totals
branch
from
November 25, 2026 22:29
1e12f15 to
edf9c7c
Compare
GuiltyDolphin
force-pushed
the
gd-c-web-detection-dispatch-totals
branch
from
November 30, 2026 10:46
edf9c7c to
06d9af0
Compare
This adds the detector work in each call from the browser into web detection up as a dispatch total. Web detection passes a dispatch ID with each run, breakage reports get the frame's worst dispatch with each detector's share, and a dispatch going past the single-run severe cutoff fires detectorPerf_severe with kind dispatch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GuiltyDolphin
force-pushed
the
gd-c-web-detection-dispatch-totals
branch
from
November 30, 2026 12:57
06d9af0 to
3db8f21
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Asana Task/Github Issue: https://app.asana.com/1/137249556945/task/1220788961551324
Description
Builds on #3215.
detectorPerftimes each detector run on its own, but one call from the browser into web detection (anautotimer, or the breakage report's run) runs several detectors back to back in one task. This adds up the runs in each of those calls as a dispatch total, so we can see how long web detection held the main thread at once:runDetectorsincrements a dispatch ID, andtimeDetectorpasses it torecordwith each runrecordadds the run to its dispatch's total and to its detector's share. A run with a new ID starts a new dispatch, so there's no begin or end call to leave opengetStatsaddsworstDispatch: the frame's dispatch with the largest total, with each detector's share by full detector ID. It's left out when no run had a dispatch IDdetectorPerf_severeonce withkind: dispatch, attributed to the detector with the largest share at that point (a tie goes to the one that ran first). It uses the same per-frame dedup and cap as the other severe kindsThere are no new periodic events or settings, so EventHub config doesn't change. Native pixel definitions that list the
kindvalues ofdetectorPerf_severeneeddispatchadded.Event triggers add more entry points (arrivals,
synclisteners, resumed waits), and each of those PRs wires its own into the dispatch ID.Testing Steps
timeDetectorandrunDetectorsdetectorPerfintegration test for severe crossings now also expectskind: dispatchevents, since it sets the single-run cutoff to 0.0001 ms. Note that "breakage reports carry exact per-detector timing stats" fails now and then when tests run in parallel, when anautorun happens between its two reportsChecklist
Please tick all that apply:
🤖 Generated with Claude Code