This is an archive of the discontinued LLVM Phabricator instance.

[llvm-cov] Add a project coverage summary above the index page.
AbandonedPublic

Authored by MaggieYi on Sep 16 2016, 3:12 PM.

Details

Reviewers
davidxl
bogner
vsk
Summary

Currently, the project coverage summary is given in the bottom row of the index table. If there are a large number of source files listed in the index table, the summary row is not immediately visible. This patch adds the project coverage summary above the index page to improve the report readability. I have also added the project directory to the summary.

In addition, filenames are only shown as a part of path name in the filename column of the index page. If the file path includes many directory levels, this column doesnÎéÎ÷t look nice. This patch separates the filename and path into two columns, and the path is shown the relative to the project directory specified in the summary, which also improves clarity.

Diff Detail

Event Timeline

MaggieYi updated this revision to Diff 71705.Sep 16 2016, 3:12 PM
MaggieYi retitled this revision from to [llvm-cov] Add a project coverage summary above the index page..
MaggieYi updated this object.
MaggieYi added reviewers: vsk, davidxl, bogner.
MaggieYi added a subscriber: llvm-commits.
vsk edited edge metadata.Sep 19 2016, 2:24 PM

Currently, the project coverage summary is given in the bottom row of the index table. If there are a large number of source files listed in the index table, the summary row is not immediately visible. This patch adds the project coverage summary above the index page to improve the report readability.

I'd prefer to just tackle this issue in this patch. IMO it would be better to drop (or at least defer) the other changes.

I have also added the project directory to the summary.

I don't think this clarifies anything, and would prefer not to add it.

In addition, filenames are only shown as a part of path name in the filename column of the index page. If the file path includes many directory levels, this column doesnÎéÎ÷t look nice.

This is intentional and it matches the behavior of the text reports. The longest-common prefix of the path names are stripped away to make it easier to see the filename. This prefix is visually distracting and doesn't convey any useful information.

MaggieYi updated this revision to Diff 71982.Sep 20 2016, 1:52 PM
MaggieYi edited edge metadata.
In D24687#546833, @vsk wrote:

I'd prefer to just tackle this issue in this patch. IMO it would be better to drop (or at least defer) the other changes.

Ok, I have updated the patch following your advice.

This is intentional and it matches the behavior of the text reports. The longest-common prefix of the path names are stripped away to make it easier to see the filename. This prefix is visually distracting and doesn't convey any useful information.

If the project is branched, the longest-common prefix of the path (I called the project directory) will show the branch name. The project directory will tell the user where the source code come from.

vsk added a comment.Sep 20 2016, 2:03 PM

If the project is branched, the longest-common prefix of the path (I called the project directory) will show the branch name. The project directory will tell the user where the source code come from.

It would be easier for me to understand the motivation behind this if you could upload an example report with your changes. I still don't understand what it is about the current scheme that makes it difficult for readers to figure out where some source file comes from.

tools/llvm-cov/SourceCoverageViewHTML.cpp
431

This patch still seems larger than it needs to be. Can't we get the entire desired functional change by just inserting another emitFileSummary(OSRef, "Totals", Totals, /*IsTotals=*/true) here?

MaggieYi abandoned this revision.Sep 27 2016, 3:44 AM