[llvm] [lit] Include zero-duration tests in the --time-tests histogram (PR #226132)

via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 07:44:54 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-testing-tools

Author: Manuel Carrasco (mgcarrasco)

<details>
<summary>Changes</summary>

`--time-tests` treated an elapsed time of 0 as missing, so they were omitted from the histogram. That made time-tests.py flaky when FileCheck expected every test to be listed. 

The PR also avoids log(0) when every recorded time is zero.

Fixes https://github.com/llvm/llvm-project/pull/208444#issuecomment-5805067757.

---
Full diff: https://github.com/llvm/llvm-project/pull/226132.diff


3 Files Affected:

- (modified) llvm/utils/lit/lit/main.py (+3-1) 
- (modified) llvm/utils/lit/lit/util.py (+2-1) 
- (added) llvm/utils/lit/tests/unit/Histogram.py (+55) 


``````````diff
The server is unavailable at this time. Please wait a few minutes before you try again.
``````````

</details>


https://github.com/llvm/llvm-project/pull/226132


More information about the llvm-commits mailing list