mirror of
https://github.com/dart-lang/sdk
synced 2024-09-19 20:51:50 +00:00
ac6150c4c0
Adds an "eventLog" property to the global "$__dart_deferred_initializers__" object. The event log is just a JS Array that gets initialized alongside $__dart_deferred_initializers__. Each event entry is a String->String JS object. I unified the format of these event objects for easier parsing. Each printed event is now valid JSON (passed through JSON.stringify) so we can more easily post-process the logs if necessary. Fully replacing the existing "_eventLog" field makes the logging logic simpler. Having a single array allows us to not include a timestamp because the array captures the event ordering (actual timing doesn't matter). It also makes it easier to stringify the logs when there's only 1 data source/format. Sample output: ``` {"hunkName":"out.js_1.part.js","event":"loadHunk"} {"uri":"path_to/out.js_1.part.js","hunkName":"out.js_1.part.js","event":"downloadHunk"} {"file":"out.js_1","event":"beginLoadPart"} {"file":"out.js_1","event":"endPartLoad","hash":"aCscY7yv4EHodRPmCqYn5BqMelA="} {"uri":"path_to/out.js_1.part.js","hunkName":"out.js_1.part.js","event":"downloadHunkSuccess"} {"hunkName":"out.js_1.part.js","hash":"aCscY7yv4EHodRPmCqYn5BqMelA=","event":"initialize"} ``` Change-Id: Ifee73be0bf7dc53a0e7710ff033dd2b0fae9fb0e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307240 Commit-Queue: Nate Biggs <natebiggs@google.com> Reviewed-by: Stephen Adams <sra@google.com> |
||
---|---|---|
.. | ||
bin | ||
lib | ||
.gitignore | ||
api_readme.md | ||
BUILD.gn | ||
OWNERS |