mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-23 21:12:28 +08:00
test(perf): add proxy scroll scene to the perf adapter (#8718)
Adds a proxy page scenario to the measurement adapter: a core-module shim serves synthetic proxy/clash/run-state data at the invoke seam (active only for the proxy scenario; other scenarios stay byte-identical), and a sawtooth scroll driver keeps the virtualizer measuring and the throttled scroll-position save running. Running the scene additionally requires the harness-side scenario contract and schema v10 from the clash-verge-rev-harness repository.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { startReplay } from './replay'
|
||||
|
||||
// Thin loader: error handlers must precede scene module evaluation so any
|
||||
// startup failure surfaces in perfError.
|
||||
const data = document.documentElement.dataset
|
||||
window.addEventListener('error', (event) => {
|
||||
data.perfError = event.message
|
||||
})
|
||||
window.addEventListener('unhandledrejection', (event) => {
|
||||
data.perfError = String(event.reason)
|
||||
})
|
||||
|
||||
data.perfStage = 'loader'
|
||||
await import('./proxy-scene')
|
||||
data.perfStage = 'scene'
|
||||
startReplay()
|
||||
data.perfStage = 'replay'
|
||||
Reference in New Issue
Block a user