-
Notifications
You must be signed in to change notification settings - Fork 754
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
Reduce verbosity of CleanupSession debug logs. #5209
Conversation
Currently we wait up to 10s for this operation to complete. Replacing the two log lines with three, lets us halve the number of logs printed every 10ms, but always print exactly one log line each iteration of the loop. Rather than: ``` 02-10 19:58:48.880 3140 3140 D CleanupSession: Wait for all Realm instance to be closed (29 - 0) 02-10 19:58:48.880 3140 3140 D CleanupSession: Waiting 10ms 02-10 19:58:48.890 3140 3140 D CleanupSession: Wait for all Realm instance to be closed (29 - 0) 02-10 19:58:48.890 3140 3140 D CleanupSession: Waiting 10ms 02-10 19:58:48.900 3140 3140 D CleanupSession: Wait for all Realm instance to be closed (29 - 0) 02-10 19:58:48.900 3140 3140 D CleanupSession: Waiting 10ms 02-10 19:58:48.910 3140 3140 D CleanupSession: Wait for all Realm instance to be closed (29 - 0) 02-10 19:58:48.910 3140 3140 D CleanupSession: Waiting 10ms 02-10 19:58:48.920 3140 3140 D CleanupSession: Wait for all Realm instance to be closed (0 - 0) ``` We'll print: ``` 02-10 19:58:48.880 3140 3140 D CleanupSession: Waiting 10ms for all Realm instance to be closed (29 - 0) 02-10 19:58:48.890 3140 3140 D CleanupSession: Waiting 10ms for all Realm instance to be closed (29 - 0) 02-10 19:58:48.900 3140 3140 D CleanupSession: Waiting 10ms for all Realm instance to be closed (29 - 0) 02-10 19:58:48.910 3140 3140 D CleanupSession: Waiting 10ms for all Realm instance to be closed (29 - 0) 02-10 19:58:48.920 3140 3140 D CleanupSession: Finished waiting for all Realm instance to be closed (0 - 0) ``` The above example took 40ms to finish and saved 4 log lines; you can see how it adds up if you take 10000ms to finish.
(for example the logs here: https://github.com/vector-im/element-android/suites/5263938080/artifacts/162501857 are quite long) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me! 💯
Matrix SDKIntegration Tests Results:
|
While a lot of these integration tests are failing, this is also true for current develop https://github.com/vector-im/element-android/runs/5157323975?check_suite_focus=true where 17 of them are failing. I think this is safe to merge. |
Type of change
Content
Debug logging for CleanupSession has been combined into a single log line.
Motivation and context
When reading the logs from some of the integration tests, there were periods of up to 10s of these logs being generated, which was a lot to scroll through.
Currently we wait up to 10s for this operation to complete.
Replacing the two log lines with three, lets us halve the number of logs printed every 10ms,
but always print exactly one log line each iteration of the loop. Rather than:
We'll print:
The above example took 40ms to finish and saved 4 log lines; you can see how it adds up to a lot of logs if you take 10000ms to finish.
Screenshots / GIFs
N/A
Tests
Inspected logging before/after
Tested devices
Checklist