google / bloaty

Bloaty: a size profiler for binaries
Apache License 2.0
4.66k stars 337 forks source link

Fix TOTAL row and % column output in diff mode #363

Closed pepsiman closed 10 months ago

pepsiman commented 11 months ago

Fixes google#361 and google#335.

Before:

    FILE SIZE        VM SIZE
 --------------  --------------
  +203% +1.46Ki  [ = ]       0    [Unmapped]
  +100%     +48  +100%     +48    .rodata
  +100%      -8  +100%      -8    .ARM.exidx
   +50%      -8   +50%      -8    .fini
  +100%     -12  +100%     -12    .ARM.extab
   +99% -5.48Ki   +99% -5.48Ki    .text
  +100% +1.72Mi  +100% +1.72Mi    TOTAL

After:

    FILE SIZE        VM SIZE
 --------------  --------------
  +103% +1.46Ki  [ = ]       0    [Unmapped]
  +0.0%     +48  +0.0%     +48    .rodata
  -0.0%      -8  -0.0%      -8    .ARM.exidx
 -50.0%      -8 -50.0%      -8    .fini
  -0.0%     -12  -0.0%     -12    .ARM.extab
  -0.5% -5.48Ki  -0.5% -5.48Ki    .text
  -0.2% -4.00Ki  -0.3% -5.46Ki    TOTAL
google-cla[bot] commented 11 months ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.