Currently, llvm-cov generates a single top-level index file when using
show –format=html. This causes rendering scalability issues in large projects like LLVM itself . If you open that link, your browser might become unresponsive as the page is too big. To address this issue, I’m working on adding support for hierarchical HTML report generation as a GSoC project proposed by @gulfemsavrun and @petrhosek. I have finished the implementation of the new CoveragePrinterHTMLDirectory class and submitted it for review in ⚙ D151283 [WIP][llvm-cov] Support a Hierarchical Structure for `show --format=html` (WORK IN PROGRESS). Its output currently looks like this:
I have a few questions about design choices:
How should I expose the new CoveragePrinterHTMLDirectory?
Should I add a new enumeration to
--format=html-directoryor a new option like
--format=html --show-directory-coverage? What name should I use?
Should I use the new CoveragePrinterHTMLDirectory by default or opt-in?
Should I enable the new CoveragePrinterHTMLDirectory for LLVM itself?
LLVM uses a python script called prepare-code-coverage-artifact.py  to generate coverage reports for itself.
As the screenshot above shows, I make a directory entry’s name show its subentry if it only has one subentry, same as lcov. Is this a good idea?
Do you have any other ideas in mind for improving the HTML, like styles or new functionalities?
For example, sorting rows based on the column, filtering files based on name prefix and so on. I will do these after the main part of the project is done.