tree: d24f09e8cfd598701e85755af71c8dbe250cbc16 [path history] [tgz]
  1. .dart_tool/
  2. bin/
  3. lib/
  4. test/
  5. testdata/
  6. analysis_options.yaml
  7. BUILD.gn
  8. OWNERS
  9. pubspec.lock
  10. pubspec.yaml
  11. README.md
scripts/codesize/README.md

fx codesize

fx codesize is a binary size analytics tool for ELF executables and libraries, sifting through symbols and debug information to produce statistics about their size and categorizations, helping to make informed decisions on which pieces of code should have their size kept in check, and which code should be the focus for binary size optimization.

Usage Tips

Before running fx codesize, one should perform a full build (fx build), which would update the system images that codesize uses. Every time another full build happens, codesize would detect this by default, and re-analyze all the binaries.

fx codesize --help has more detailed help information and details on each query.

Development Tips

When using VSCode, install the Dart plugin, and add //scripts/codesize as a top-level folder in the workspace. IDE features such as autocomplete, Dart analysis etc. should start working after an initial initialization period.

Add --with //scripts:tests to the fx set line. Afterwards, use fx test //scripts/codesize to run the unit tests. Additionally, fx test //scripts/codesize -vo will print out all the tests as they are being run.