Webapp for viewing .size and .sizediff files.
Hosted at: https://chrome-supersize.firebaseapp.com
To run the viewer locally:
./upload_html_viewer.py --localThe WebAssembly files are fetched from the deployed instance if you have not built them locally. To build them, see caspian/README.md.
Test your change on a staging instance:
./upload_html_viewer.py --staging
viewer.html authenticated fetches (?load_url= of non-chromium-binary-size-trybot-results URLs) do not work due to us being unable to allowlist the staging domain (which is random each time).Deploy to prod instance (see here for details on who has permissions).
./upload_html_viewer.py --prod
Test your changes on the newly deployed instance (use DevTools to force Service Worker caching to update).
The viewer has no server component beyond static file serving. .size files are parsed using WebAssembly (caspian/ directory). The .wasm module runs within a Web Worker in order to not block the browser's UI thread. Node information is sent to the main page via JSON on-demand (when tree nodes are expanded).
Code should follow Chrome's styleguide where possible.
This uses JSON files to populate the dropdowns:
gs://chrome-supersize/milestones/milestones.json//tools/binary_size/generate_milestone_reports.pygs://chrome-supersize/official_builds/canary_reports.json//tools/binary_size/generate_official_build_report.pyAll .size files pointed to by this launcher are restricted to Googlers.
This is the main WebApp. It uses a Service Worker (sw.js) and an App Manifest (manifest.json) to be more slick (and work offline).
The TypeScript Compiler is used to check JavaScript syntax and JSDoc. This is manually invoked using:
python3 tools/binary_size/libsupersize/viewer/check_js.py