tree: 5e918dff61844d321f0194641276952b90340c85 [path history] [tgz]
  1. bin/
  2. lib/
  3. test/
  4. testdata/
  5. analysis_options.yaml
  6. BUILD.gn
  7. OWNERS
  8. package_config.json
  9. pubspec.yaml
  10. README.md
tools/codesize/README.md

codesize

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 codesize, one should perform a full 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.

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

Development Tips

When using VSCode, install the Dart plugin, and add //tools/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 //tools:tests to the fx set line. Afterwards, use fx test //tools/codesize:codesize_tests to run the unit tests. Additionally, fx test //tools/codesize:codesize_tests -vo will print out all the tests as they are being run.