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

c++ replay: more robust seek #22375

Merged
merged 17 commits into from
Oct 4, 2021
Merged

Conversation

deanlee
Copy link
Contributor

@deanlee deanlee commented Sep 29, 2021

  • more robust seek .
  • skip invalid segments
  • faster merge events
  • test cases
  • reduce cpu usage ~20%

@deanlee deanlee marked this pull request as draft September 29, 2021 07:32
@deanlee deanlee force-pushed the replay_skip_invalid_segments branch 2 times, most recently from d607b54 to d3b2990 Compare September 29, 2021 07:36
@pd0wm
Copy link
Contributor

pd0wm commented Sep 29, 2021

Does this also handle seeking past the end of the route?

@pd0wm pd0wm added the tools label Sep 29, 2021
@deanlee
Copy link
Contributor Author

deanlee commented Sep 29, 2021

It should be handled, I need to write some test cases int this PR to ensure the stability of seek

@deanlee deanlee force-pushed the replay_skip_invalid_segments branch 5 times, most recently from 65be002 to 20e1198 Compare October 1, 2021 07:16
@deanlee deanlee changed the title c++ replay: skip invalid segments on seek c++ replay: thead safe seek Oct 1, 2021
@pd0wm pd0wm changed the title c++ replay: thead safe seek c++ replay: thread safe seek Oct 1, 2021
@deanlee deanlee changed the title c++ replay: thread safe seek c++ replay: more robust seek Oct 1, 2021
@deanlee deanlee force-pushed the replay_skip_invalid_segments branch from ccd323a to 8030a40 Compare October 1, 2021 20:41
@deanlee deanlee marked this pull request as ready for review October 1, 2021 21:35
@deanlee deanlee force-pushed the replay_skip_invalid_segments branch from 8030a40 to 740e950 Compare October 3, 2021 20:45
@pd0wm
Copy link
Contributor

pd0wm commented Oct 4, 2021

How much faster is the merge by doing things in parallel? I'm worried that depending on tbb is going to give us issues when we try to run on device.

@deanlee
Copy link
Contributor Author

deanlee commented Oct 4, 2021

not too much, merge 5 segments, from ~9ms-> ~0.5 ms. sort events in loggerread, from 8ms->0.3 ms
Do I need to remove it now? merge does not affect the stream thread. this time is not a big issue.

@pd0wm
Copy link
Contributor

pd0wm commented Oct 4, 2021

Yeah, let's remove it. It's not installed on AGNOS.

@deanlee deanlee force-pushed the replay_skip_invalid_segments branch from 8a2e000 to 97c380e Compare October 4, 2021 12:33
@pd0wm pd0wm merged commit fa8ddd9 into commaai:master Oct 4, 2021
@deanlee deanlee deleted the replay_skip_invalid_segments branch October 4, 2021 13:02
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