[Toybox] request for comments: pybloat.py
Rob Landley
rob at landley.net
Tue Feb 21 19:29:08 PST 2012
On 02/21/2012 04:10 PM, Tim Bird wrote:
Hi Tim! How was CELF?
>> I made a stab at it in bash (attached). Opinions?
>
> It's cool that it's in bash. The delta column is not sorted.
>
> You can get the final order to match bloat-o-meter by piping the result to
> 'sort -rn -k4,4'. It would be better to do this sort before emitting
> the header and footer, obviously.
Yeah, but it's hard to export environment variables from pipelines, so
printing out the total afterward is a bit fiddly.
Hmmm...
> I'm not sure if it's worth it to replace '0' with '-', to match bloat-o-meter,
> but that's probably easy with sed, if desired.
I don't see the point, really...
Checking in the updated version.
Note: the reason it sticks a space at the front of the name is so echo
doesn't accidentally see a symbol named "-n" and decide to parse it
instead of echoing it. Since echo doesn't support -- this is _annoying_...
Rob
More information about the Toybox
mailing list