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

Suppress a bunch of unnecessary test output #442

Merged
merged 14 commits into from
Sep 30, 2022

Conversation

mjcarroll
Copy link
Contributor

🦟 Bug fix

Summary

This test floods the logs without providing any meaningful value or insights. It makes looking at jenkins or actions results more troublesome than necessary. This redirects the output to another buffer.

It doesn't seem to have any impact on the timing results, either:

Before:

Using 32 to log in total 10000 log entries to 32.result.csv
0 the worst thread latency was:4 ms  (4659 us)] 
1 the worst thread latency was:5 ms  (5373 us)] 
2 the worst thread latency was:4 ms  (4225 us)] 
3 the worst thread latency was:4 ms  (4823 us)] 
4 the worst thread latency was:6 ms  (6415 us)] 
5 the worst thread latency was:6 ms  (6038 us)] 
6 the worst thread latency was:6 ms  (6863 us)] 
7 the worst thread latency was:5 ms  (5238 us)] 
8 the worst thread latency was:5 ms  (5238 us)] 
9 the worst thread latency was:5 ms  (5478 us)] 
10 the worst thread latency was:7 ms  (7307 us)] 
11 the worst thread latency was:5 ms  (5909 us)] 
12 the worst thread latency was:4 ms  (4853 us)] 
13 the worst thread latency was:4 ms  (4619 us)] 
14 the worst thread latency was:5 ms  (5235 us)] 
15 the worst thread latency was:5 ms  (5163 us)] 
16 the worst thread latency was:4 ms  (4508 us)] 
17 the worst thread latency was:6 ms  (6340 us)] 
18 the worst thread latency was:6 ms  (6755 us)] 
19 the worst thread latency was:6 ms  (6466 us)] 
20 the worst thread latency was:8 ms  (8261 us)] 
21 the worst thread latency was:5 ms  (5793 us)] 
22 the worst thread latency was:5 ms  (5150 us)] 
23 the worst thread latency was:4 ms  (4631 us)] 
24 the worst thread latency was:5 ms  (5080 us)] 
25 the worst thread latency was:6 ms  (6668 us)] 
26 the worst thread latency was:4 ms  (4814 us)] 
27 the worst thread latency was:4 ms  (4888 us)] 
28 the worst thread latency was:6 ms  (6234 us)] 
29 the worst thread latency was:4 ms  (4519 us)] 
30 the worst thread latency was:4 ms  (4603 us)] 
31 the worst thread latency was:4 ms  (4643 us)] 
Total time :459 ms (459614 us)
Average time: 45.9614 us

After:

Using 32 to log in total 10000 log entries to 32.result.csv
0 the worst thread latency was:4 ms  (4090 us)] 
1 the worst thread latency was:4 ms  (4886 us)] 
2 the worst thread latency was:4 ms  (4422 us)] 
3 the worst thread latency was:4 ms  (4958 us)] 
4 the worst thread latency was:6 ms  (6431 us)] 
5 the worst thread latency was:4 ms  (4714 us)] 
6 the worst thread latency was:5 ms  (5029 us)] 
7 the worst thread latency was:4 ms  (4306 us)] 
8 the worst thread latency was:5 ms  (5436 us)] 
9 the worst thread latency was:4 ms  (4923 us)] 
10 the worst thread latency was:4 ms  (4976 us)] 
11 the worst thread latency was:4 ms  (4794 us)] 
12 the worst thread latency was:5 ms  (5419 us)] 
13 the worst thread latency was:5 ms  (5248 us)] 
14 the worst thread latency was:5 ms  (5467 us)] 
15 the worst thread latency was:5 ms  (5828 us)] 
16 the worst thread latency was:5 ms  (5626 us)] 
17 the worst thread latency was:5 ms  (5267 us)] 
18 the worst thread latency was:5 ms  (5593 us)] 
19 the worst thread latency was:4 ms  (4397 us)] 
20 the worst thread latency was:4 ms  (4380 us)] 
21 the worst thread latency was:4 ms  (4759 us)] 
22 the worst thread latency was:5 ms  (5477 us)] 
23 the worst thread latency was:5 ms  (5262 us)] 
24 the worst thread latency was:4 ms  (4901 us)] 
25 the worst thread latency was:5 ms  (5201 us)] 
26 the worst thread latency was:5 ms  (5202 us)] 
27 the worst thread latency was:4 ms  (4620 us)] 
28 the worst thread latency was:4 ms  (4581 us)] 
29 the worst thread latency was:6 ms  (6674 us)] 
30 the worst thread latency was:5 ms  (5780 us)] 
31 the worst thread latency was:6 ms  (6581 us)] 
Total time :458 ms (458197 us)
Average time: 45.8197 us

Signed-off-by: Michael Carroll [email protected]

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

This floods the logs without providing any meaningful value or insights

Signed-off-by: Michael Carroll <[email protected]>
@github-actions github-actions bot added the 🌱 garden Ignition Garden label Sep 21, 2022
Signed-off-by: Michael Carroll <[email protected]>
@codecov
Copy link

codecov bot commented Sep 21, 2022

Codecov Report

Merging #442 (a04eca0) into gz-common5 (b7658a2) will increase coverage by 0.03%.
The diff coverage is 85.96%.

❗ Current head a04eca0 differs from pull request most recent head dc27669. Consider uploading reports for the commit dc27669 to get more accurate results

@@              Coverage Diff               @@
##           gz-common5     #442      +/-   ##
==============================================
+ Coverage       80.45%   80.48%   +0.03%     
==============================================
  Files              85       87       +2     
  Lines           10004    10061      +57     
==============================================
+ Hits             8049     8098      +49     
- Misses           1955     1963       +8     
Impacted Files Coverage Δ
testing/src/RedirectConsoleStream.cc 84.00% <84.00%> (ø)
...include/gz/common/testing/RedirectConsoleStream.hh 100.00% <100.00%> (ø)
testing/include/gz/common/testing/TestPaths.hh 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@mjcarroll
Copy link
Contributor Author

Looks like you aren't supposed to use the internal methods from gtest (which makes sense). I think I will write a small utility class in the testing module for this

@mjcarroll
Copy link
Contributor Author

@osrf-jenkins retest this please

Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
testing/include/gz/common/testing/RedirectConsoleStream.hh Outdated Show resolved Hide resolved
testing/src/RedirectConsoleStream.cc Outdated Show resolved Hide resolved
testing/src/RedirectConsoleStream.cc Outdated Show resolved Hide resolved
testing/src/RedirectConsoleStream.cc Outdated Show resolved Hide resolved
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
@mjcarroll
Copy link
Contributor Author

Windows failures are the known GDAL problems.

@mjcarroll mjcarroll requested a review from ahcorde September 29, 2022 21:46
@mjcarroll mjcarroll merged commit 5046737 into gz-common5 Sep 30, 2022
@mjcarroll mjcarroll deleted the mjcarroll/suppress_test_output branch September 30, 2022 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌱 garden Ignition Garden
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants