Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add summaries to other sub-commands #88

Open
4 of 5 tasks
data-pup opened this issue Jul 18, 2018 · 3 comments
Open
4 of 5 tasks

Add summaries to other sub-commands #88

data-pup opened this issue Jul 18, 2018 · 3 comments
Labels
enhancement New feature or request

Comments

@data-pup
Copy link
Member

data-pup commented Jul 18, 2018

#84 added a summary to the output of the 'garbage' sub-command, which looks like this:

 Bytes │ Size % │ Garbage Item
───────┼────────┼──────────────────────
    11 ┊  5.58% ┊ unusedAddThreeNumbers
     8 ┊  4.06% ┊ unusedAddOne
   ... ┊    ... ┊ ... and 7 more
    43 ┊ 21.83% ┊ Σ

I think this is a really fantastic idea. Should we add a similar feature to other sub-commands as well? I think the 'top' and 'diff' would be a good start, although I am less sure about the others.

It could be neat to do something similar for the paths command, like this:

               Shallow Bytes │ Shallow %          │ Retaining Paths
───────────────┼───────────┼────────────────────────────
            44 ┊    30.56% ┊ "function names" subsection
             7 ┊     4.86% ┊ export "awoo"
               ┊           ┊   ↳ func[4]
               ┊           ┊       ↳ type[0]
               ┊           ┊       ↳ awoo
               ┊           ┊            ↳ ... and 6 more

(That's imagining what this file might look like)

To Do:

  • diff
  • garbage
  • monos
  • paths
  • top
@data-pup data-pup added enhancement New feature or request question Further information is requested labels Jul 18, 2018
@fitzgen
Copy link
Member

fitzgen commented Jul 18, 2018

Sounds great to me.

@data-pup data-pup removed the question Further information is requested label Jul 19, 2018
@data-pup
Copy link
Member Author

I was thinking more about the comment linked in #84: rustwasm/team#214 (comment)

They were using this command: twiggy garbage -n 99999 main_bg.wasm | wc -l

Would it be a good idea to add some sort of --all flag that would ensure that all items are shown? I don't think that would be too hard to take care of, but I'll look into it and follow up. If that should be in a different issue I can open up a new one for that as well.

@fitzgen
Copy link
Member

fitzgen commented Jul 20, 2018

--all sounds good to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants