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

Add option for verbose output #41

Closed
RPGillespie6 opened this issue Mar 30, 2020 · 2 comments · Fixed by #42
Closed

Add option for verbose output #41

RPGillespie6 opened this issue Mar 30, 2020 · 2 comments · Fixed by #42

Comments

@RPGillespie6
Copy link
Owner

Fastcov hides the details of some of its internal processing to prevent the shell from being spammed with noisy traces. However, this may be desirable for debugging and understanding what fastcov is filtering and why.

Add --verbose option that prints extra information containing potentially useful internal processing details.

RPGillespie6 added a commit that referenced this issue Mar 31, 2020
Description:
- Fix #41
- Refactor log traces to use python logging
- Add `--verbose` option which sets logging level to debug
- Add some debug level traces to print internal processing
@RPGillespie6
Copy link
Owner Author

@astratsx FYI - I've created a new branch to add a --verbose flag to fastcov. Here is sample output when run against the fastcov example project:

+ /mnt/workspace/example/fastcov.py -t ExampleTest --gcov gcov-9 --branch-coverage --exclude /usr/include cmake_project/test/ --verbose --lcov -o example.info
[0.004s] [info]: Found 10 coverage files (gcda)
[0.001s] [info]: Spawned 2 gcov threads, each processing at most 5 coverage files
[0.002s] [debug]: Skipped processing '/mnt/workspace/test/functional/cmake_project/test/latin1_test.cpp' due to option '--exclude cmake_project/test/'
[0.000s] [debug]: Skipped processing '/mnt/workspace/test/functional/cmake_project/test/test1_2.cpp' due to option '--exclude cmake_project/test/'
[0.002s] [debug]: Skipped processing '/usr/include/c++/9/bits/stl_iterator_base_funcs.h' due to option '--exclude /usr/include'
[0.000s] [debug]: Skipped processing '/usr/include/c++/9/bits/stl_iterator_base_types.h' due to option '--exclude /usr/include'
[0.000s] [debug]: Skipped processing '/usr/include/c++/9/ext/type_traits.h' due to option '--exclude /usr/include'
[0.000s] [debug]: Skipped processing '/usr/include/c++/9/bits/basic_string.tcc' due to option '--exclude /usr/include'
[0.000s] [debug]: Skipped processing '/usr/include/c++/9/bits/basic_string.h' due to option '--exclude /usr/include'
[0.000s] [debug]: Skipped processing '/usr/include/c++/9/ext/new_allocator.h' due to option '--exclude /usr/include'
[0.000s] [debug]: Skipped processing '/usr/include/c++/9/initializer_list' due to option '--exclude /usr/include'
[0.000s] [debug]: Skipped processing '/mnt/workspace/test/functional/cmake_project/test/branch_test.cpp' due to option '--exclude cmake_project/test/'
[0.000s] [debug]: Skipped processing '/usr/include/c++/9/bits/char_traits.h' due to option '--exclude /usr/include'
[0.001s] [debug]: Skipped processing '/usr/include/c++/9/bits/move.h' due to option '--exclude /usr/include'
[0.000s] [debug]: Skipped processing '/usr/include/c++/9/bits/stl_algobase.h' due to option '--exclude /usr/include'
[0.000s] [debug]: Skipped processing '/usr/include/c++/9/bits/stl_iterator_base_funcs.h' due to option '--exclude /usr/include'
[0.000s] [debug]: Skipped processing '/usr/include/c++/9/bits/stl_iterator_base_types.h' due to option '--exclude /usr/include'
[0.000s] [debug]: Skipped processing '/usr/include/c++/9/bits/stl_construct.h' due to option '--exclude /usr/include'
[0.000s] [debug]: Skipped processing '/usr/include/c++/9/ext/new_allocator.h' due to option '--exclude /usr/include'
[0.000s] [debug]: Skipped processing '/usr/include/c++/9/ext/type_traits.h' due to option '--exclude /usr/include'
[0.000s] [debug]: Skipped processing '/usr/include/c++/9/bits/stl_uninitialized.h' due to option '--exclude /usr/include'
[0.000s] [debug]: Skipped processing '/usr/include/c++/9/bits/alloc_traits.h' due to option '--exclude /usr/include'
[0.000s] [debug]: Skipped processing '/usr/include/c++/9/bits/cpp_type_traits.h' due to option '--exclude /usr/include'
[0.000s] [debug]: Skipped processing '/usr/include/c++/9/bits/basic_string.tcc' due to option '--exclude /usr/include'
[0.000s] [debug]: Skipped processing '/usr/include/c++/9/bits/stl_vector.h' due to option '--exclude /usr/include'
[0.000s] [debug]: Skipped processing '/usr/include/c++/9/bits/allocator.h' due to option '--exclude /usr/include'
[0.000s] [debug]: Skipped processing '/usr/include/c++/9/bits/basic_string.h' due to option '--exclude /usr/include'
[0.000s] [debug]: Skipped processing '/usr/include/c++/9/initializer_list' due to option '--exclude /usr/include'
[0.000s] [debug]: Skipped processing '/usr/include/c++/9/bits/vector.tcc' due to option '--exclude /usr/include'
[0.000s] [debug]: Skipped processing '/usr/include/c++/9/ext/alloc_traits.h' due to option '--exclude /usr/include'
[0.000s] [debug]: Skipped processing '/usr/include/c++/9/new' due to option '--exclude /usr/include'
[0.000s] [debug]: Skipped processing '/usr/include/c++/9/bits/char_traits.h' due to option '--exclude /usr/include'
[0.000s] [debug]: Skipped processing '/mnt/workspace/test/functional/cmake_project/test/test1.cpp' due to option '--exclude cmake_project/test/'
[0.000s] [info]: Processed 6 .gcov files (37 total, 31 skipped)
[0.000s] [info]: Aggregated raw gcov JSON into fastcov JSON report
[0.000s] [info]: Spawned 1 threads each scanning at most 5 source files
[0.000s] [warning]: Could not decode '/mnt/workspace/test/functional/cmake_project/src/latin1_enc.cpp' with utf-8 or fallback encodings (); ignoring errors
[0.000s] [info]: Scanned 4 source files for exclusion markers
[0.000s] [info]: Created lcov info file 'example.info'

I still need to add a few more debug traces and tests, but I will most likely open a PR and merge within a few days. After that I'm going to tag and release v1.5 of fastcov since there have been quite a few new features added since v1.4

@rgh-sas
Copy link

rgh-sas commented Mar 31, 2020 via email

RPGillespie6 added a commit that referenced this issue Apr 1, 2020
Description:
- Fix #41
- Refactor log traces to use python logging
- Add `--verbose` option which sets logging level to debug
- Add some debug level traces to print internal processing
RPGillespie6 added a commit that referenced this issue Apr 1, 2020
Description:
- Fix #41
- Refactor log traces to use python logging
- Add `--verbose` option which sets logging level to debug
- Add some debug level traces to print internal processing
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 a pull request may close this issue.

2 participants