Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Exclude external directory when generating python report #2136

Merged
merged 3 commits into from
Aug 22, 2024

Conversation

ewianda
Copy link
Contributor

@ewianda ewianda commented Aug 20, 2024

This PR will reduce the time it take to run bazel coverage

Before this fix,

bazel coverage  --cache_test_results=no  //...
Elapsed time: 7.054s, Critical Path: 6.87s

lcov --list bazel-out/_coverage/_coverage_report.dat

After

 bazel coverage  --cache_test_results=no  //...
Elapsed time: 2.474s, Critical Path: 1.18s


$ lcov --list bazel-out/_coverage/_coverage_report.dat 
Reading tracefile bazel-out/_coverage/_coverage_report.dat
                                          |Lines       |Functions  |Branches    
Filename                                  |Rate     Num|Rate    Num|Rate     Num
================================================================================
[/home/ewianda/.cache/bazel/_bazel_ewianda/da4b4cc49e0e621570c9e24d6f1eab95/execroot/_main/bazel-out/k8-fastbuild/bin/benchsci/ml/nlp/]
test_tokenizer_stage2_bootstrap.py        | 6.0%    250|    -     0|    -      0

[benchsci/]
devtools/python/pytest_helper.py          |90.5%     21|    -     0|    -      0
ml/nlp/test_tokenizer.py                  | 100%     13|    -     0|    -      0
ml/nlp/tokenizer.py                       |61.8%     76|    -     0|    -      0
================================================================================
                                    Total:|26.1%    360|    -     0|    -      0

Related to #1434

Copy link
Collaborator

@aignas aignas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, could you please add a note in the Changelog for this, please?

@ewianda ewianda force-pushed the fix-ignore-external-in-coverage branch from d566d28 to 498c33c Compare August 21, 2024 23:35
Copy link
Collaborator

@aignas aignas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for the really nice comment!

@aignas aignas enabled auto-merge August 22, 2024 11:49
@aignas aignas added this pull request to the merge queue Aug 22, 2024
Merged via the queue into bazelbuild:main with commit dac8a5f Aug 22, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants