Design choices for hierarchical HTML report page generation in llvm-cov

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 [1]. 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:

  1. How should I expose the new CoveragePrinterHTMLDirectory?

    Should I add a new enumeration to --format like --format=html-directory or a new option like --format=html --show-directory-coverage? What name should I use?

  2. Should I use the new CoveragePrinterHTMLDirectory by default or opt-in?

  3. Should I enable the new CoveragePrinterHTMLDirectory for LLVM itself?

    LLVM uses a python script called [2] to generate coverage reports for itself.

  4. 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.

[2] llvm-project/ at main · llvm/llvm-project · GitHub

@davidxl @ZequanWu @evodius96 @barrelshifter

Hi everyone. This is a project of Google Summer of Code and has a deadline. So I really appreciate a feedback. Here is a full report sample for llvm-project/llvm: . Would you please share your views?

@davidxl @ZequanWu @evodius96 @barrelshifter