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

LogReader: print number of missing rlogs #32830

Merged
merged 4 commits into from
Jun 27, 2024

Conversation

StefanLekanic-SYRMIA
Copy link
Contributor

@StefanLekanic-SYRMIA StefanLekanic-SYRMIA commented Jun 25, 2024

@github-actions github-actions bot added the tools label Jun 25, 2024
Copy link
Contributor

github-actions bot commented Jun 25, 2024

Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following:

  • Convert your PR to a draft unless it's ready to review
  • Read the contributing docs
  • Before marking as "ready for review", ensure:
    • the goal is clearly stated in the description
    • all the tests are passing
    • the change is something we merge
    • include a route or your device' dongle ID if relevant

@StefanLekanic-SYRMIA
Copy link
Contributor Author

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.

@StefanLekanic-SYRMIA StefanLekanic-SYRMIA marked this pull request as ready for review June 25, 2024 07:14
Comment on lines 93 to 98
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
Copy link
Contributor

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

@sshane
Copy link
Contributor

sshane commented Jun 27, 2024

This PR is now a slight speed up due to not checking qlogs upfront

@sshane sshane changed the title LogReader missing rlogs counter LogReader: print number of missing rlogs Jun 27, 2024
@sshane
Copy link
Contributor

sshane commented Jun 27, 2024

thanks for getting this started!

@sshane sshane merged commit 504dd45 into commaai:master Jun 27, 2024
16 checks passed
0312birdzhang pushed a commit to orapilot/opilot that referenced this pull request Jun 27, 2024
* 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>
Edison-CBS pushed a commit to Edison-CBS/openpilot that referenced this pull request Sep 15, 2024
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants