-
Notifications
You must be signed in to change notification settings - Fork 9k
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
LogReader: print number of missing rlogs #32830
Conversation
Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following:
|
i wanted to do optimization to remove useless counting of qlogs in return statement, but we can leave that as it is, to minimize changes. |
tools/lib/logreader.py
Outdated
def count_missing_rlogs(rlog_paths: LogPaths, valid_file: ValidFileCallable) -> int: | ||
missing_count = 0 | ||
for rlog in rlog_paths: | ||
if rlog is None or not valid_file(rlog): | ||
missing_count += 1 | ||
return missing_count |
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.
cached the result so we don't take 2x longer
This PR is now a slight speed up due to not checking qlogs upfront |
thanks for getting this started! |
* count rlogs * minimization changes * cache to avoid duplicate checks * no real point in checking qlogs to just show the warning --------- Co-authored-by: Shane Smiskol <shane@smiskol.com>
* count rlogs * minimization changes * cache to avoid duplicate checks * no real point in checking qlogs to just show the warning --------- Co-authored-by: Shane Smiskol <shane@smiskol.com> old-commit-hash: 504dd45
#32799