blob: 5767234063401b7a18f23194a92f75374fc6f2cf [file] [log] [blame]
Alexei Frolov4c035b02019-11-14 16:36:15 -08001.. default-domain:: cpp
2
3.. highlight:: sh
4
Alexei Frolov3fde6b12019-12-18 16:13:38 -08005.. _chapter-bloat:
6
Wyatt Heplerb82f9952019-11-25 13:56:31 -08007--------
8pw_bloat
9--------
Alexei Frolov4c035b02019-11-14 16:36:15 -080010The bloat module provides tools to generate size report cards for output
11binaries.
12
Alexei Frolov3fde6b12019-12-18 16:13:38 -080013.. _bloat-howto:
14
15Defining size reports
16=====================
17
Alexei Frolov4c035b02019-11-14 16:36:15 -080018.. TODO(frolv): Explain how bloat works and how to set it up.
19
20Documentation integration
21=========================
Alexei Frolov09447842019-11-15 15:09:05 -080022Bloat reports are easy to add to documentation files. All ``pw_size_report``
Alexei Frolov4c035b02019-11-14 16:36:15 -080023targets output a ``.rst`` file containing a tabular report card. This file
24can be imported directly into a documentation file using the ``include``
25directive.
26
Alexei Frolov3fde6b12019-12-18 16:13:38 -080027For example, the ``simple_bloat_loop`` and ``simple_bloat_function`` size
28reports under ``//pw_bloat/examples`` are imported into this file as follows:
Alexei Frolov4c035b02019-11-14 16:36:15 -080029
30.. code:: rst
31
Alexei Frolov3fde6b12019-12-18 16:13:38 -080032 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 Frolov4c035b02019-11-14 16:36:15 -080039
40Resulting in this output:
41
Alexei Frolov3fde6b12019-12-18 16:13:38 -080042Simple bloat loop example
43^^^^^^^^^^^^^^^^^^^^^^^^^
44.. include:: examples/simple_bloat_loop.rst
45
46Simple bloat function example
47^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48.. include:: examples/simple_bloat_function.rst