Skip to content

refactor(cdp): split browser core and cdp scheduler - #231

Open
ldm0 wants to merge 15 commits into
mainfrom
browser-cdp-split2
Open

refactor(cdp): split browser core and cdp scheduler#231
ldm0 wants to merge 15 commits into
mainfrom
browser-cdp-split2

Conversation

@ldm0

@ldm0 ldm0 commented Aug 26, 2026

Copy link
Copy Markdown
Member

No description provided.

@github-actions

Copy link
Copy Markdown

Spider Bench A/B

✅ All benchmark browser service runs completed; results are informational.

Public HEAD: 184 / 240 rows; 38 / 48 sites produced rows; 10 unexpected empty sites.

✅ Deterministic fixture diagnostic is clean.

Common ancestor dda59858b575 → HEAD 37f78255eaee; benchmark order: base-first; workflow: success.

Public 48-site run · informational

Metric Base HEAD Δ
Run status success success
Extracted rows / contract 179 / 240 184 / 240 +5 (+2.79%)
Contract fill 74.58% 76.67% +2.09 pp (+2.80%)
Sites with rows 37 / 48 38 / 48 +1 (+2.70%)
Sites meeting row contract 35 / 48 36 / 48 +1 (+2.86%)
Unexpected empty sites 11 10 -1 (-9.09%)
Partial-row sites 2 2 0 (0.00%)
Site outcomes extracted: 35; HTTP error + rows: 2; empty: 7; HTTP error + empty: 1; snapshot error + empty: 3 extracted: 37; HTTP error + rows: 1; empty: 8; HTTP error + empty: 1; snapshot error + empty: 1
Observed duration 36.34 s 40.58 s +4.24 s (+11.68%)
Estimated CPU 28.55 s 35.47 s +6.92 s (+24.23%)
Peak PSS 277.56 MiB 358.90 MiB +81.34 MiB (+29.31%)
Peak RSS 279.70 MiB 361.25 MiB +81.56 MiB (+29.16%)
Peak threads 27 27 0 (0.00%)
Mismatched sites 0 0 0
Timeout with items 0 0 0
Category rows Base HEAD Δ
news 35 / 40 35 / 40 0
stocks 20 / 40 20 / 40 0
tech 35 / 40 35 / 40 0
sports 27 / 40 32 / 40 +5
games 37 / 40 37 / 40 0
life 25 / 40 25 / 40 0

Public-site content, timing, and memory are noisy. This single A/B run reports evidence only; site outcome counts explain missing rows without treating them as a deterministic regression.

CPU and memory timelines

These are bounded 40-point views of the same complete process-tree samples used by the HTML report. CPU uses 100% per occupied logical core; memory lines are RSS first and PSS second when complete PSS samples are available.

Base

xychart-beta
    title "Base CPU"
    x-axis "Elapsed seconds" [1.038, 2.039, 3.041, 3.542, 4.043, 4.544, 5.045, 6.046, 7.048, 8.047, 9.048, 10.049, 11.05, 11.55, 12.051, 13.053, 14.054, 15.055, 16.056, 17.057, 18.559, 19.56, 20.562, 21.563, 22.564, 23.564, 24.564, 25.566, 26.567, 27.567, 28.569, 29.571, 30.572, 31.573, 32.574, 33.576, 34.578, 35.578]
    y-axis "CPU percent" 0 --> 200
    line [21.92, 115.88, 95.79, 85.82, 143.65, 127.83, 135.66, 121.86, 161.71, 48.02, 119.8, 141.89, 73.88, 2, 2, 51.89, 53.95, 10, 37.97, 107.89, 111.87, 111.85, 111.8, 109.84, 115.84, 118, 16, 59.83, 97.91, 16.01, 47.92, 75.87, 87.92, 3.99, 4, 137.76, 49.85, 115.97]
Loading
xychart-beta
    title "Base memory: RSS then PSS"
    x-axis "Elapsed seconds" [0.036, 1.038, 2.039, 3.041, 3.542, 4.043, 4.544, 5.045, 6.046, 7.048, 8.047, 9.048, 10.049, 11.05, 11.55, 12.051, 13.053, 14.054, 15.055, 16.056, 17.057, 18.559, 19.56, 20.562, 21.563, 22.564, 23.564, 24.564, 25.566, 26.567, 27.567, 28.569, 29.571, 30.572, 31.573, 32.574, 33.576, 34.578, 35.578, 36.337]
    y-axis "Memory MiB" 0 --> 500
    line [23.33, 117.41, 147.95, 188.4, 193.04, 235.79, 245.65, 238.53, 217.2, 250.57, 225.76, 236.4, 242.86, 219.41, 209.08, 208.35, 189.81, 202.48, 188.73, 184, 229, 209.84, 236.7, 279.7, 211.63, 221.24, 221.8, 178.67, 188.36, 197.68, 202.5, 183.48, 192.91, 204.6, 186.74, 206.82, 211.18, 191.7, 231.86, 0]
    line [21.5, 115.25, 145.79, 186.73, 191, 233.67, 243.45, 236.34, 215.02, 248.08, 223.57, 234.22, 240.67, 217.23, 206.89, 206.17, 187.53, 200.32, 186.55, 182.98, 226.81, 207.21, 234.52, 277.56, 209.46, 219.08, 219.75, 176.48, 186.21, 195.5, 200.34, 181.29, 190.73, 202.41, 184.55, 204.63, 208.99, 189.51, 229.67, 0]
Loading

HEAD

xychart-beta
    title "HEAD CPU"
    x-axis "Elapsed seconds" [1.038, 2.039, 3.041, 3.541, 4.045, 4.546, 5.547, 6.549, 8.054, 9.054, 10.055, 11.057, 12.057, 13.558, 14.558, 15.558, 16.559, 18.062, 19.063, 20.081, 21.081, 22.083, 23.585, 24.587, 25.587, 26.642, 28.519, 29.725, 30.341, 30.842, 31.845, 32.847, 34.514, 35.517, 36.518, 37.52, 39.022, 40.026]
    y-axis "CPU percent" 0 --> 200
    line [55.92, 115.85, 87.76, 153.84, 160.81, 141.84, 133.78, 105.72, 115.81, 134.02, 141.79, 71.87, 34, 49.94, 12.01, 49.95, 99.94, 115.82, 123.84, 102.78, 109.99, 115.71, 113.82, 119.89, 65.98, 44, 91.91, 49.93, 1.62, 39.93, 113.69, 103.86, 71.82, 11.97, 31.99, 115.76, 110.02, 129.72]
Loading
xychart-beta
    title "HEAD memory: RSS then PSS"
    x-axis "Elapsed seconds" [0.036, 1.038, 2.039, 3.041, 3.541, 4.045, 4.546, 5.547, 6.549, 8.054, 9.054, 10.055, 11.057, 12.057, 13.558, 14.558, 15.558, 16.559, 18.062, 19.063, 20.081, 21.081, 22.083, 23.585, 24.587, 25.587, 26.642, 28.519, 29.725, 30.341, 30.842, 31.845, 32.847, 34.514, 35.517, 36.518, 37.52, 39.022, 40.026, 40.581]
    y-axis "Memory MiB" 0 --> 500
    line [23.27, 123.81, 168.79, 187.64, 210.71, 228.18, 257.96, 224.81, 234.46, 253.64, 277.93, 279.78, 258.17, 254.72, 230.26, 231.79, 226.43, 254.78, 242.98, 259.56, 279.88, 276.36, 248.73, 285.75, 250.7, 241.36, 237.17, 239.32, 249.77, 239.45, 245.66, 299.53, 361.25, 268.46, 235, 267.27, 252.29, 241.33, 284.91, 0]
    line [21.34, 121.65, 166.78, 185.79, 208.47, 225.88, 255.72, 222.59, 232.52, 251.37, 275.31, 277.92, 255.89, 252.44, 227.99, 229.51, 224.15, 252.49, 240.69, 257.3, 277.96, 274.09, 246.46, 283.48, 248.5, 239.08, 234.89, 237.05, 247.44, 237.16, 243.37, 297.38, 358.9, 266.19, 232.73, 265.03, 250.02, 239.11, 282.68, 0]
Loading

Deterministic fixture · diagnostic

The fixture exercises 15 routes: 8 are expected to emit rows and 7 intentionally exercise empty, loading, or timeout behavior.

Metric Base HEAD Δ
Run status success success
Extracted rows / contract 40 / 40 40 / 40 0 (0.00%)
Contract fill 100.00% 100.00% 0.00 pp (0.00%)
Sites with rows 8 / 15 8 / 15 0 (0.00%)
Sites meeting row contract 15 / 15 15 / 15 0 (0.00%)
Unexpected empty sites 0 0 0
Partial-row sites 0 0 0
Site outcomes extracted: 7; HTTP error + rows: 1; empty: 3; timeout + empty: 4 extracted: 7; HTTP error + rows: 1; empty: 3; timeout + empty: 4
Observed duration 19.93 s 19.94 s +0.01 s (+0.05%)
Estimated CPU 0.46 s 0.47 s +0.01 s (+2.16%)
Peak PSS 86.81 MiB 88.70 MiB +1.89 MiB (+2.18%)
Peak RSS 88.97 MiB 90.98 MiB +2.01 MiB (+2.26%)
Peak threads 18 18 0 (0.00%)
Mismatched sites 0 0 0
Timeout with items 0 0 0

Full HTML, JSON, CSV, logs, and page snapshots: workflow run and full spider-bench-results artifact.

Spider Bench is informational: site failures, missing benchmark reports, failed browser service runs, fixture diagnostics, timing, and performance deltas do not fail the workflow. Build, runner, and artifact infrastructure errors can still fail it.

@github-actions

Copy link
Copy Markdown

Sequential Navigation Soak A/B

✅ HEAD completed the 200-navigation resilience and memory observation.

One browser process, one target, and one CDP session navigate CSDN → SegmentFault → Huaban → example.com repeatedly. This run issued 200 Page.navigate commands per binary.

Common ancestor dda59858b5 → HEAD 37f78255ea; benchmark order: base-first; workflow: success.

Session resilience

Metric Base HEAD
Attempted / planned 200 / 200 200 / 200
Direct observable pass 200 / 200 199 / 200
Failures / recovered 0 / 0 1 / 1
Recovery failures 0 0
Lifecycle order violations 0 0
Network order violations 0 0
Wall time 279.8 s 287.5 s

A public-page failure is reported separately from an unrecoverable session. The soak requires all navigation attempts, zero failed recovery, zero lifecycle/network ordering violations, and complete resource evidence.

Process-tree memory

Metric Base HEAD Δ
Boundary samples 200 200 0
Boundary RSS samples 200 200 0
Boundary PSS samples 200 200 0
Periodic peak RSS 300.7 MiB 316.4 MiB +15.8 MiB
Periodic peak PSS 298.9 MiB 314.1 MiB +15.2 MiB
RSS · first 10 avg 223.9 MiB 238.4 MiB +14.6 MiB
RSS · last 10 avg 234.6 MiB 227.3 MiB -7.3 MiB
RSS · last − first window +10.7 MiB -11.1 MiB -21.8 MiB
RSS · warm slope / 100 nav +4.8 MiB +0.1 MiB -4.7 MiB
PSS · first 10 avg 221.7 MiB 236.4 MiB +14.7 MiB
PSS · last 10 avg 232.9 MiB 225.2 MiB -7.7 MiB
PSS · last − first window +11.1 MiB -11.3 MiB -22.4 MiB
PSS · warm slope / 100 nav +5.0 MiB +0.1 MiB -4.8 MiB
Peak file descriptors 55 54 -1
Peak threads 28 28 0

HEAD memory by 50-navigation quarter

HEAD range Avg RSS Final RSS Peak RSS Avg PSS Final PSS Peak FD
1–50 252.3 MiB 240.3 MiB 310.5 MiB 250.2 MiB 238.1 MiB 44
51–100 259.8 MiB 248.5 MiB 314.4 MiB 257.6 MiB 246.4 MiB 45
101–150 261.3 MiB 245.0 MiB 313.8 MiB 259.2 MiB 242.9 MiB 44
151–200 258.4 MiB 220.8 MiB 318.6 MiB 256.4 MiB 218.7 MiB 45

Raw reports and per-navigation boundary samples: workflow run and full sequential-navigation-soak-results artifact.

Public-site timing and memory are observational. Use the A/B deltas and trend shape as evidence, not as a deterministic performance threshold.

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