-
Notifications
You must be signed in to change notification settings - Fork 69
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 -a, --all flag to garbage command #118
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Bytes │ Size % │ Garbage Item | ||
───────┼────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── | ||
1034 ┊ 36.71% ┊ data[3] | ||
136 ┊ 4.83% ┊ <wee_alloc::size_classes::SizeClassAllocPolicy<'a> as wee_alloc::AllocPolicy>::new_cell_for_free_list::h3987e3054b8224e6 | ||
76 ┊ 2.70% ┊ <wee_alloc::LargeAllocPolicy as wee_alloc::AllocPolicy>::new_cell_for_free_list::h8f071b7bce0301ba | ||
25 ┊ 0.89% ┊ data[1] | ||
25 ┊ 0.89% ┊ data[2] | ||
12 ┊ 0.43% ┊ elem[0] | ||
6 ┊ 0.21% ┊ type[0] | ||
6 ┊ 0.21% ┊ type[1] | ||
6 ┊ 0.21% ┊ <wee_alloc::LargeAllocPolicy as wee_alloc::AllocPolicy>::min_cell_size::hc7cee2a550987099 | ||
5 ┊ 0.18% ┊ <wee_alloc::size_classes::SizeClassAllocPolicy<'a> as wee_alloc::AllocPolicy>::min_cell_size::h6f746be886573355 | ||
4 ┊ 0.14% ┊ table[0] | ||
4 ┊ 0.14% ┊ __wasm_nullptr | ||
3 ┊ 0.11% ┊ type[2] | ||
3 ┊ 0.11% ┊ core::ptr::drop_in_place::h8e9fdc2437d43666 | ||
3 ┊ 0.11% ┊ core::ptr::drop_in_place::h4e5cdfd7b9310648.18 | ||
1 ┊ 0.04% ┊ func[0] | ||
1 ┊ 0.04% ┊ func[1] | ||
1 ┊ 0.04% ┊ func[4] | ||
1 ┊ 0.04% ┊ func[5] | ||
1 ┊ 0.04% ┊ func[6] | ||
1 ┊ 0.04% ┊ func[7] | ||
1 ┊ 0.04% ┊ func[10] | ||
1355 ┊ 48.10% ┊ Σ [22 Total Rows] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"name":"data[3]","bytes":1034,"size_percent":36.7057152999645},{"name":"<wee_alloc::size_classes::SizeClassAllocPolicy<'a> as wee_alloc::AllocPolicy>::new_cell_for_free_list::h3987e3054b8224e6","bytes":136,"size_percent":4.827831025914093},{"name":"<wee_alloc::LargeAllocPolicy as wee_alloc::AllocPolicy>::new_cell_for_free_list::h8f071b7bce0301ba","bytes":76,"size_percent":2.697905573304934},{"name":"data[1]","bytes":25,"size_percent":0.8874689385871495},{"name":"data[2]","bytes":25,"size_percent":0.8874689385871495},{"name":"elem[0]","bytes":12,"size_percent":0.42598509052183176},{"name":"type[0]","bytes":6,"size_percent":0.21299254526091588},{"name":"type[1]","bytes":6,"size_percent":0.21299254526091588},{"name":"<wee_alloc::LargeAllocPolicy as wee_alloc::AllocPolicy>::min_cell_size::hc7cee2a550987099","bytes":6,"size_percent":0.21299254526091588},{"name":"<wee_alloc::size_classes::SizeClassAllocPolicy<'a> as wee_alloc::AllocPolicy>::min_cell_size::h6f746be886573355","bytes":5,"size_percent":0.1774937877174299},{"name":"table[0]","bytes":4,"size_percent":0.1419950301739439},{"name":"__wasm_nullptr","bytes":4,"size_percent":0.1419950301739439},{"name":"type[2]","bytes":3,"size_percent":0.10649627263045794},{"name":"core::ptr::drop_in_place::h8e9fdc2437d43666","bytes":3,"size_percent":0.10649627263045794},{"name":"core::ptr::drop_in_place::h4e5cdfd7b9310648.18","bytes":3,"size_percent":0.10649627263045794},{"name":"func[0]","bytes":1,"size_percent":0.03549875754348598},{"name":"func[1]","bytes":1,"size_percent":0.03549875754348598},{"name":"func[4]","bytes":1,"size_percent":0.03549875754348598},{"name":"func[5]","bytes":1,"size_percent":0.03549875754348598},{"name":"func[6]","bytes":1,"size_percent":0.03549875754348598},{"name":"func[7]","bytes":1,"size_percent":0.03549875754348598},{"name":"func[10]","bytes":1,"size_percent":0.03549875754348598},{"name":"Σ [22 Total Rows]","bytes":1355,"size_percent":48.1008164714235}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Bytes │ Size % │ Garbage Item | ||
───────┼────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── | ||
1034 ┊ 36.71% ┊ data[3] | ||
136 ┊ 4.83% ┊ <wee_alloc::size_classes::SizeClassAllocPolicy<'a> as wee_alloc::AllocPolicy>::new_cell_for_free_list::h3987e3054b8224e6 | ||
76 ┊ 2.70% ┊ <wee_alloc::LargeAllocPolicy as wee_alloc::AllocPolicy>::new_cell_for_free_list::h8f071b7bce0301ba | ||
25 ┊ 0.89% ┊ data[1] | ||
25 ┊ 0.89% ┊ data[2] | ||
12 ┊ 0.43% ┊ elem[0] | ||
6 ┊ 0.21% ┊ type[0] | ||
6 ┊ 0.21% ┊ type[1] | ||
6 ┊ 0.21% ┊ <wee_alloc::LargeAllocPolicy as wee_alloc::AllocPolicy>::min_cell_size::hc7cee2a550987099 | ||
5 ┊ 0.18% ┊ <wee_alloc::size_classes::SizeClassAllocPolicy<'a> as wee_alloc::AllocPolicy>::min_cell_size::h6f746be886573355 | ||
24 ┊ 0.85% ┊ ... and 12 more | ||
1355 ┊ 48.10% ┊ Σ [22 Total Rows] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"name":"data[3]","bytes":1034,"size_percent":36.7057152999645},{"name":"<wee_alloc::size_classes::SizeClassAllocPolicy<'a> as wee_alloc::AllocPolicy>::new_cell_for_free_list::h3987e3054b8224e6","bytes":136,"size_percent":4.827831025914093},{"name":"<wee_alloc::LargeAllocPolicy as wee_alloc::AllocPolicy>::new_cell_for_free_list::h8f071b7bce0301ba","bytes":76,"size_percent":2.697905573304934},{"name":"data[1]","bytes":25,"size_percent":0.8874689385871495},{"name":"data[2]","bytes":25,"size_percent":0.8874689385871495},{"name":"elem[0]","bytes":12,"size_percent":0.42598509052183176},{"name":"type[0]","bytes":6,"size_percent":0.21299254526091588},{"name":"type[1]","bytes":6,"size_percent":0.21299254526091588},{"name":"<wee_alloc::LargeAllocPolicy as wee_alloc::AllocPolicy>::min_cell_size::hc7cee2a550987099","bytes":6,"size_percent":0.21299254526091588},{"name":"<wee_alloc::size_classes::SizeClassAllocPolicy<'a> as wee_alloc::AllocPolicy>::min_cell_size::h6f746be886573355","bytes":5,"size_percent":0.1774937877174299},{"name":"... and 12 more","bytes":24,"size_percent":0.8519701810436635},{"name":"Σ [22 Total Rows]","bytes":1355,"size_percent":48.1008164714235}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -429,6 +429,32 @@ test!( | |
"2" | ||
); | ||
|
||
test!(garbage_wee_alloc_top_10, "garbage", "./fixtures/wee_alloc.wasm"); | ||
|
||
test!( | ||
garbage_wee_alloc_all, | ||
"garbage", | ||
"./fixtures/wee_alloc.wasm", | ||
"-a" | ||
); | ||
|
||
test!( | ||
garbage_wee_alloc_top_10_json, | ||
"garbage", | ||
"./fixtures/wee_alloc.wasm", | ||
"-f", | ||
"json" | ||
); | ||
|
||
test!( | ||
garbage_wee_alloc_all_json, | ||
"garbage", | ||
"./fixtures/wee_alloc.wasm", | ||
"-f", | ||
"json", | ||
"-a" | ||
); | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice job adding these tests as well! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Testing is the most important ;) |
||
test!( | ||
monos_json, | ||
"monos", | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch here 😸