Alexei Frolov | 4c035b0 | 2019-11-14 16:36:15 -0800 | [diff] [blame] | 1 | .. default-domain:: cpp |
| 2 | |
| 3 | .. highlight:: sh |
| 4 | |
Alexei Frolov | 3fde6b1 | 2019-12-18 16:13:38 -0800 | [diff] [blame^] | 5 | .. _chapter-bloat: |
| 6 | |
Wyatt Hepler | b82f995 | 2019-11-25 13:56:31 -0800 | [diff] [blame] | 7 | -------- |
| 8 | pw_bloat |
| 9 | -------- |
Alexei Frolov | 4c035b0 | 2019-11-14 16:36:15 -0800 | [diff] [blame] | 10 | The bloat module provides tools to generate size report cards for output |
| 11 | binaries. |
| 12 | |
Alexei Frolov | 3fde6b1 | 2019-12-18 16:13:38 -0800 | [diff] [blame^] | 13 | .. _bloat-howto: |
| 14 | |
| 15 | Defining size reports |
| 16 | ===================== |
| 17 | |
Alexei Frolov | 4c035b0 | 2019-11-14 16:36:15 -0800 | [diff] [blame] | 18 | .. TODO(frolv): Explain how bloat works and how to set it up. |
| 19 | |
| 20 | Documentation integration |
| 21 | ========================= |
Alexei Frolov | 0944784 | 2019-11-15 15:09:05 -0800 | [diff] [blame] | 22 | Bloat reports are easy to add to documentation files. All ``pw_size_report`` |
Alexei Frolov | 4c035b0 | 2019-11-14 16:36:15 -0800 | [diff] [blame] | 23 | targets output a ``.rst`` file containing a tabular report card. This file |
| 24 | can be imported directly into a documentation file using the ``include`` |
| 25 | directive. |
| 26 | |
Alexei Frolov | 3fde6b1 | 2019-12-18 16:13:38 -0800 | [diff] [blame^] | 27 | For example, the ``simple_bloat_loop`` and ``simple_bloat_function`` size |
| 28 | reports under ``//pw_bloat/examples`` are imported into this file as follows: |
Alexei Frolov | 4c035b0 | 2019-11-14 16:36:15 -0800 | [diff] [blame] | 29 | |
| 30 | .. code:: rst |
| 31 | |
Alexei Frolov | 3fde6b1 | 2019-12-18 16:13:38 -0800 | [diff] [blame^] | 32 | Simple bloat loop example |
| 33 | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 34 | .. include:: examples/simple_bloat_loop.rst |
| 35 | |
| 36 | Simple bloat function example |
| 37 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 38 | .. include:: examples/simple_bloat_function.rst |
Alexei Frolov | 4c035b0 | 2019-11-14 16:36:15 -0800 | [diff] [blame] | 39 | |
| 40 | Resulting in this output: |
| 41 | |
Alexei Frolov | 3fde6b1 | 2019-12-18 16:13:38 -0800 | [diff] [blame^] | 42 | Simple bloat loop example |
| 43 | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 44 | .. include:: examples/simple_bloat_loop.rst |
| 45 | |
| 46 | Simple bloat function example |
| 47 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 48 | .. include:: examples/simple_bloat_function.rst |