Size report for pw::string::Format

Add size report comparing pw::string::Format to std::snprintf.

Report with arm-none-eabi-gcc at -Os:

            Using pw::string::Format instead of snprintf
            ────────────────────────────────────────────
┌────────────────────────────┬───────────┬────────┬───────┬────────┐
│            Label           │  Segment  │ Before │ Delta │  After │
├════════════════════════════┼═══════════┼════════┼═══════┼════════┤
│    One string, return size │ SEG FLASH │  2,840 │   +80 │  2,920 │
├────────────────────────────┼───────────┼────────┼───────┼────────┤
│ Ten strings, handle errors │     (all) │ (same) │     0 │ (same) │
├────────────────────────────┼───────────┼────────┼───────┼────────┤
│   Fifty calls, same buffer │ SEG FLASH │  3,816 │   -72 │  3,744 │
└────────────────────────────┴───────────┴────────┴───────┴────────┘

Change-Id: Id484530320b0334cddf676a49ad79444fbbbde9b
6 files changed
tree: d366114a8b22b306f6ec0e8f8f71f65a27363fc2
  1. docs/
  2. pw_bloat/
  3. pw_build/
  4. pw_cmd/
  5. pw_docgen/
  6. pw_dumb_io/
  7. pw_dumb_io_baremetal_stm32f429/
  8. pw_dumb_io_stdio/
  9. pw_preprocessor/
  10. pw_span/
  11. pw_status/
  12. pw_string/
  13. pw_toolchain/
  14. pw_unit_test/
  15. targets/
  16. .clang-format
  17. .gitignore
  18. .gn
  19. AUTHORS
  20. BUILD
  21. BUILD.gn
  22. BUILDCONFIG.gn
  23. CONTRIBUTING.md
  24. LICENSE
  25. modules.gni
  26. presubmit.py
  27. pw_vars_default.gni
  28. README.md
  29. WORKSPACE
README.md

Pigweed embedded oriented software libraries

Pigweed is a collection of embedded-focused libraries, which we call "modules". These modules are designed for small-footprint MMU-less microcontrollers like the ST Micro STM32L452 or the Nordic NRF82832. The modules are designed to facilitate easy integration into existing codebases.

Pigweed is in the early stages of development.