New issue
Advanced search Search tips

Issue 880671 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug

Blocked on:
issue 894320



Sign in to add a comment

SuperSize: Html Viewer Enhancement Ideas

Project Member Reported by agrieve@chromium.org, Sep 5

Issue description

Here's a list of ideas I had. Some probably make sense to break out into separate bugs.

Most important (because it requires an ndjson file format update):
* Show number of aliases in details dialog (DONE!)
* Have a toggle that switches to showing estimated install size (bug 894320)

UI Tweaks:
* Node sort order: when sizes are tied, should sort alphabetically (especially common for method count mode, where all "sizes" are 1).
* Collapse single-child nodes. e.g. "java"->"com"->"google" ==> "java/com/google"
* URL should update with current selection (so you can link to a symbol)
  * Would need to expand symbol node upon open such a page
  * Would also allow node to stay selected when switching modes (if it still exists)
* Display Metadata (maybe just as a second root node)
* Show component in details pane (DONE!)

Better landing page: (DONE)
* Rename index.html -> viewer.html (DONE!)
* Rename milestones.html -> index.html (DONE!)
* Don't display demo data in viewer.html. (DONE!)
* Add ability to open a milestone in index.html (rather than only diffs) (DONE!)
* Add a link from index.html -> viewer.html to use when you want to upload your own .ndjson file. E.g. "To upload your own .njson file created with [Super Size](link to README.md#html_report), use the [viewer](viewer.html). (DONE)

Won't Do:
* Show title at top saying APK name and date (should be in metadata of ndjson already)
  * Timestamp of ELF file is in there, but not a useful title... Probably not important.

 
Description: Show this description
Cc: yfried...@chromium.org
Project Member

Comment 3 by bugdroid1@chromium.org, Sep 12

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/aa7696e47b35c64bb1c499ab4d2510803dc3682f

commit aa7696e47b35c64bb1c499ab4d2510803dc3682f
Author: Samuel Huang <huangs@chromium.org>
Date: Wed Sep 12 20:43:22 2018

[Supersize] HTML Viewer: Show number of aliases in info card.

- .ndjson format change: Include symbol.num_aliases if it's not 1.
- HTML Viewer: If num_aliases field is present, display on the info
  card as, e.g., '256 bytes for 1 of 3 aliases (0.00 MiB)'. If
  num_aliases is absent then skip it, e.g., '256 bytes (0.00 MiB)'.

Bug: 880671
Change-Id: I311a21f8bc5a3f49c0de0ae0c1d562fd7fc51089
Reviewed-on: https://chromium-review.googlesource.com/1222272
Commit-Queue: Samuel Huang <huangs@chromium.org>
Reviewed-by: Samuel Huang <huangs@chromium.org>
Reviewed-by: agrieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590812}
[modify] https://crrev.com/aa7696e47b35c64bb1c499ab4d2510803dc3682f/tools/binary_size/libsupersize/html_report.py
[modify] https://crrev.com/aa7696e47b35c64bb1c499ab4d2510803dc3682f/tools/binary_size/libsupersize/static/shared.js
[modify] https://crrev.com/aa7696e47b35c64bb1c499ab4d2510803dc3682f/tools/binary_size/libsupersize/static/state.js
[modify] https://crrev.com/aa7696e47b35c64bb1c499ab4d2510803dc3682f/tools/binary_size/libsupersize/static/tree-worker.js

Project Member

Comment 4 by bugdroid1@chromium.org, Sep 14

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fc4020299e144c82217a6c496a8dbd4d0e677fce

commit fc4020299e144c82217a6c496a8dbd4d0e677fce
Author: Samuel Huang <huangs@chromium.org>
Date: Fri Sep 14 05:05:17 2018

[Supersize] HTML Viewer: Do not cache .ndjson files when fetching from server.

The current code (using fetch() API) seems to always use cached .ndjson
file, even when server is restarted (on a different .ndjson file), and
Shift-Ctrl-R is used to refresh. This CL changes API use to disable
cache, so when .ndjson files are loaded by data_url, refreshing the
HTML viewer would fetch the up-to-date version.

There does not appear to be a performance cost to this.

Bug: 880671
Change-Id: I9aab99c18895dc52bc9de0ec788c1c617ec06e8f
Reviewed-on: https://chromium-review.googlesource.com/1225652
Commit-Queue: Samuel Huang <huangs@chromium.org>
Reviewed-by: Samuel Huang <huangs@chromium.org>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Reviewed-by: agrieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591290}
[modify] https://crrev.com/fc4020299e144c82217a6c496a8dbd4d0e677fce/tools/binary_size/libsupersize/static/tree-worker.js

Project Member

Comment 5 by bugdroid1@chromium.org, Sep 18

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2de87b6272c37e182f85a7525eff496cb0da428e

commit 2de87b6272c37e182f85a7525eff496cb0da428e
Author: Samuel Huang <huangs@chromium.org>
Date: Tue Sep 18 21:09:20 2018

[Android Scripts] Refactor resource_sizes.py to enable APK and DEX analysis code reuse.

This CL refactors resource_sizes.py so Super Size can use it to get
normalized APK size.

Previously size extraction and output are done by PrintApkAnalysis().
This CL decouples extraction and printing by extrating most of the
function into GenerateApkAnalysis(), which becomes a generator that
yields the required data into a 4-array
  [title suffix, trace title, value, units].
PrintApkAnalysi() then pumps the generator output into
perf_tests_results_helper.ReportPerfResult().

Small wrinkle: PrintApkAnalysis() prints unknown symbols. For
GenerateApkAnalysis(), this is delegated to an optional callback.

The above is repeated for _PrintDexAnalysis(). So resource_size now
exports two new functions:
  GenerateApkAnalysis()
  GenerateDexAnalysis()

Also change print to the function form, as a clean up.

Bug: 880671
Change-Id: Ie572c5f14345511473ab73266cc305ebc87fcab5
Reviewed-on: https://chromium-review.googlesource.com/1231381
Reviewed-by: Samuel Huang <huangs@chromium.org>
Reviewed-by: agrieve <agrieve@chromium.org>
Commit-Queue: Samuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592189}
[modify] https://crrev.com/2de87b6272c37e182f85a7525eff496cb0da428e/build/android/resource_sizes.py

Project Member

Comment 6 by bugdroid1@chromium.org, Sep 20

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/703664dccf6b40ebbb4b1f1de4c81a8388ab989a

commit 703664dccf6b40ebbb4b1f1de4c81a8388ab989a
Author: Samuel Huang <huangs@chromium.org>
Date: Thu Sep 20 19:39:00 2018

[SuperSize] HTML Viewer: Fix indents in .html files.

Changing 4-indent to 2-indent. Also:
- Make <style> and <script> tags indent from start of line.
- Fix several missing ';' in JS.

Bug: 880671
Change-Id: Iddda84bbdcf5040935d27643925aebb1433580c7
Reviewed-on: https://chromium-review.googlesource.com/1237141
Commit-Queue: Samuel Huang <huangs@chromium.org>
Reviewed-by: Eric Stevenson <estevenson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592907}
[modify] https://crrev.com/703664dccf6b40ebbb4b1f1de4c81a8388ab989a/tools/binary_size/libsupersize/static/index.html
[modify] https://crrev.com/703664dccf6b40ebbb4b1f1de4c81a8388ab989a/tools/binary_size/libsupersize/static/milestones.html

Project Member

Comment 7 by bugdroid1@chromium.org, Sep 21

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9ce8b12fb85f3214dac3765a645a487db3f46aea

commit 9ce8b12fb85f3214dac3765a645a487db3f46aea
Author: Samuel Huang <huangs@chromium.org>
Date: Fri Sep 21 17:15:40 2018

[Supersize] Milestone report generation: Fix feature to skip existing reports.

generate_milestone_report.py intendes to list all existing .ndjson
files in the given --size-file-bucket gs://bucket/subdir link, and only
generate missing .ndjson files. However, the command line used:
  gsutil ls -r gs://chrome-supersize/milestones/

is incorrect (-r means reverse). This tends to return an empty list,
and the logic is ineffective, and everything gets generated.

The correct command to list files recursively is:
  gsutil ls -R gs://chrome-supersize/milestones/*

This CL fixes the problem. However, since we're used to regenerating
everything, so we're making this the default behavior. This CL also
adds '--skip-existing' switch to only generated missing .ndjson files.

As unrelated clean-up, also add new line to end of milestones.json.

Bug: 880671
Change-Id: I2a21b59c7d7f5b1b8765ea260030814bb8188139
Reviewed-on: https://chromium-review.googlesource.com/1238814
Reviewed-by: Samuel Huang <huangs@chromium.org>
Reviewed-by: agrieve <agrieve@chromium.org>
Commit-Queue: Samuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593239}
[modify] https://crrev.com/9ce8b12fb85f3214dac3765a645a487db3f46aea/tools/binary_size/libsupersize/generate_milestone_report.py

Project Member

Comment 8 by bugdroid1@chromium.org, Sep 21

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e94fb27bfaa6483f49464abe07b41caf2f748964

commit e94fb27bfaa6483f49464abe07b41caf2f748964
Author: Samuel Huang <huangs@chromium.org>
Date: Fri Sep 21 18:30:01 2018

[SuperSize] Milestone report generation: Generate reports for single milestones.

Previously generate_milestone_report.py only creates milestone diff
reports. This CL modifes the script to generate reports for single
milestones for independent viewing. UI updates will be done as a
follow-up.

Bug: 880671
Change-Id: I91013d24f4d123292a77d35a4eebea9b9b01bda7
Reviewed-on: https://chromium-review.googlesource.com/1239156
Reviewed-by: Samuel Huang <huangs@chromium.org>
Reviewed-by: agrieve <agrieve@chromium.org>
Commit-Queue: Samuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593267}
[modify] https://crrev.com/e94fb27bfaa6483f49464abe07b41caf2f748964/tools/binary_size/libsupersize/generate_milestone_report.py

Description: Show this description
Project Member

Comment 10 by bugdroid1@chromium.org, Sep 24

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/57a4994c3d21eb7d0b9c1a9701c357a9f38d724d

commit 57a4994c3d21eb7d0b9c1a9701c357a9f38d724d
Author: Andrew Grieve <agrieve@chromium.org>
Date: Mon Sep 24 16:22:03 2018

SuperSize: Rename .html files. data_url->load_url. Delete demo.ndjson

Bug: 880671
Change-Id: I5ed6803daf97609fe2814618f51d8199f8c44390
Reviewed-on: https://chromium-review.googlesource.com/1240185
Commit-Queue: agrieve <agrieve@chromium.org>
Reviewed-by: Eric Stevenson <estevenson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593558}
[modify] https://crrev.com/57a4994c3d21eb7d0b9c1a9701c357a9f38d724d/tools/binary_size/libsupersize/html_report.py
[modify] https://crrev.com/57a4994c3d21eb7d0b9c1a9701c357a9f38d724d/tools/binary_size/libsupersize/start_server.py
[modify] https://crrev.com/57a4994c3d21eb7d0b9c1a9701c357a9f38d724d/tools/binary_size/libsupersize/static/index.html
[modify] https://crrev.com/57a4994c3d21eb7d0b9c1a9701c357a9f38d724d/tools/binary_size/libsupersize/static/manifest.json
[delete] https://crrev.com/9d6c082819b3d4238a58ffbe5849247b19599520/tools/binary_size/libsupersize/static/milestones.html
[modify] https://crrev.com/57a4994c3d21eb7d0b9c1a9701c357a9f38d724d/tools/binary_size/libsupersize/static/tree-ui.js
[modify] https://crrev.com/57a4994c3d21eb7d0b9c1a9701c357a9f38d724d/tools/binary_size/libsupersize/static/tree-worker.js
[add] https://crrev.com/57a4994c3d21eb7d0b9c1a9701c357a9f38d724d/tools/binary_size/libsupersize/static/viewer.html
[modify] https://crrev.com/57a4994c3d21eb7d0b9c1a9701c357a9f38d724d/tools/binary_size/libsupersize/templates/sw.js

Project Member

Comment 11 by bugdroid1@chromium.org, Sep 24

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f57beacd1fb563494b593e066cdc37b4feb640e0

commit f57beacd1fb563494b593e066cdc37b4feb640e0
Author: Samuel Huang <huangs@chromium.org>
Date: Mon Sep 24 18:42:22 2018

[Supersize] HTML Viewer: Support viewing single milestone.

This CL updates the milestone selection page. Details:
* Add small drop-down to select between "compare" or "view" mode.
  "Compare" is the old behavior, and "view" shows only one select box.
* Under view mode, clicking "Open report" will open report to view
  single milestone.
* Opened report now appears on new tab.
* For "compare" mode with incompatible changes (version 1 equal or newer
  than version 2): Old behavior of graying out options was non-robust.
  This is repalced with disabling "Open report" button and showing error
  message.
* Extra change: generate_milestone_report.py: Correct gsutil.py rsync
  parameter.

Bug: 880671
Change-Id: Ie3c1e23c2f78ea4818f86f71954cf3ece0bea513
Reviewed-on: https://chromium-review.googlesource.com/1240503
Commit-Queue: Samuel Huang <huangs@chromium.org>
Reviewed-by: agrieve <agrieve@chromium.org>
Reviewed-by: Samuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593610}
[modify] https://crrev.com/f57beacd1fb563494b593e066cdc37b4feb640e0/tools/binary_size/libsupersize/generate_milestone_report.py
[modify] https://crrev.com/f57beacd1fb563494b593e066cdc37b4feb640e0/tools/binary_size/libsupersize/static/index.html
[modify] https://crrev.com/f57beacd1fb563494b593e066cdc37b4feb640e0/tools/binary_size/libsupersize/static/options.css

Description: Show this description
Description: Show this description
Blockedon: 894320
Description: Show this description
Project Member

Comment 16 by bugdroid1@chromium.org, Oct 16

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0cecb6ce10b4c752f053ecbe9742c2e058b35a6f

commit 0cecb6ce10b4c752f053ecbe9742c2e058b35a6f
Author: Andrew Grieve <agrieve@chromium.org>
Date: Tue Oct 16 01:59:07 2018

SuperSize: Add webview to milestone reports and use non-full reports

The non-full reports capture about the same info and load much faster.
We can always switch them back, but thought it's worth trying them for a
while to see if there are any drawbacks.

Also adds a note about opening the viewer directly for uploading files.

Results of this commit are already pushed to
https://storage.googleapis.com/chrome-supersize/index.html

Bug: 880671
Change-Id: I79f1b2298658cde0564c5976f47382e930f7196a
Reviewed-on: https://chromium-review.googlesource.com/c/1281174
Commit-Queue: agrieve <agrieve@chromium.org>
Reviewed-by: Eric Stevenson <estevenson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#599821}
[modify] https://crrev.com/0cecb6ce10b4c752f053ecbe9742c2e058b35a6f/tools/binary_size/libsupersize/generate_milestone_report.py
[modify] https://crrev.com/0cecb6ce10b4c752f053ecbe9742c2e058b35a6f/tools/binary_size/libsupersize/static/index.html

Project Member

Comment 17 by bugdroid1@chromium.org, Nov 2

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/131a24875619b4a610bdc1b1f4d8eb6212ad1ff3

commit 131a24875619b4a610bdc1b1f4d8eb6212ad1ff3
Author: Andrew Grieve <agrieve@chromium.org>
Date: Fri Nov 02 16:00:18 2018

SuperSize: Show srcPath and Component in info cards

For structural nodes, still shows the "idPath", because our data model
does not allow mapping subpaths -> components.

Also fixes cell alignment in the infocard where titles were center
aligned over right-aligned values.

Bug: 880671
Change-Id: I5be0bb6b07aba20a9c49bffa4c14da45f8bb0599
Reviewed-on: https://chromium-review.googlesource.com/c/1313076
Commit-Queue: agrieve <agrieve@chromium.org>
Reviewed-by: Samuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604939}
[modify] https://crrev.com/131a24875619b4a610bdc1b1f4d8eb6212ad1ff3/tools/binary_size/libsupersize/static/infocard-ui.js
[modify] https://crrev.com/131a24875619b4a610bdc1b1f4d8eb6212ad1ff3/tools/binary_size/libsupersize/static/infocard.css
[modify] https://crrev.com/131a24875619b4a610bdc1b1f4d8eb6212ad1ff3/tools/binary_size/libsupersize/static/shared.js
[modify] https://crrev.com/131a24875619b4a610bdc1b1f4d8eb6212ad1ff3/tools/binary_size/libsupersize/static/tree-worker.js

Description: Show this description

Sign in to add a comment