QVAC-13715 feat: Profiler Operation Transport + Load/Download Metrics + Stream Profiling#899
Merged
opaninakuffo merged 14 commits intoMar 17, 2026
Conversation
f2c5c6e to
9446fe0
Compare
ea5edd6 to
99bd579
Compare
NamelsKing
previously approved these changes
Mar 16, 2026
NamelsKing
previously approved these changes
Mar 17, 2026
simon-iribarren
approved these changes
Mar 17, 2026
NamelsKing
approved these changes
Mar 17, 2026
Contributor
Author
|
/review |
Contributor
Tier-based Approval Status |
Proletter
pushed a commit
that referenced
this pull request
May 24, 2026
… + Stream Profiling (#899) * feat: transport operation-level handler events via __profiling envelope * feat: propagate provider operation events across delegated loadModel * feat: add source-aware load/download metrics and checksum/cache hooks * feat: emit load/download operation metrics and forward per-call RPC options * feat: aggregate gauge stats and format table metrics by value type * test: add export-contract and operation-transport coverage * refactor: replace raw Error with typed QvacError * chore: fix build errors & correctlinting * refactor: reorder send/stream params * feat: add stream trailer frame for server metrics and delegated breakdown propagation * refactor: extract shared utilities and add trailer key constant
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.
🎯 What problem does this PR solve?
RPCOptions) forloadModel/downloadAssetclientOverheadvalues possible due to clock skew📝 How does it solve it?
Operation Event Transport
OPERATION_EVENT_KEY+operationEventSchemain profiling schema__profilingenvelope (survives response parsing)serverMeta.operationeventsDelegated loadModel Propagation
ResponseWithDelegationto carryOPERATION_EVENT_KEYStream Profiling (Trailer Frame)
__profilingTrailermarkerclientOverheadclamped toMath.max(0, ...)to prevent negative valuesLoad/Download Metrics
DownloadStats,ResolveResult,DownloadMetricsHookstypesresolveModelPathWithStats()withbase/statsmodedownload-stats.tswrappers (HTTP/Registry/Hyperdrive) with:Handler Operation Events
totalLoadTime,modelInitializationTime,downloadTime,totalBytesDownloaded,downloadSpeedBps,checksumValidationTimemodelType,sourceType,cacheHittotalDownloadTime,downloadTime,totalBytesDownloaded,downloadSpeedBps,checksumValidationTimesourceType,cacheHitClient API
rpcOptions?: RPCOptionstoloadModel()anddownloadAsset()Export Improvements
How it was tested
bun run typecheckbun test test/unit/profiler.test.tsbun test test/unit/profiler-operation-transport.test.tsbun run examples/profiling/basic.ts(manual verification, results below)This PR depends on #836