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

SDK: stream to disk with save feature #1405

Merged
merged 8 commits into from
Feb 26, 2023
Merged

SDK: stream to disk with save feature #1405

merged 8 commits into from
Feb 26, 2023

Conversation

emilk
Copy link
Member

@emilk emilk commented Feb 25, 2023

Closes #1393

To save an .rrd file to disk we would previously buffer all the log messages and then write them all at once at shutdown.

Now we do it in a separate thread continuously as the logging program is running.

I also took the opportunity to refactor and simplify Session.

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I've added a line to CHANGELOG.md (if this is a big enough change to warrant it)

@emilk emilk added 🦀 Rust API Rust logging API 🚀 performance Optimization, memory use, etc labels Feb 25, 2023
crates/re_sdk/src/file_writer.rs Outdated Show resolved Hide resolved
Co-authored-by: Clement Rey <[email protected]>
@emilk emilk merged commit c97747a into main Feb 26, 2023
@emilk emilk deleted the emilk/stream-to-disk branch February 26, 2023 19:05
emilk added a commit that referenced this pull request Mar 2, 2023
* Refactor LogMsg-encoder to be a `struct`

* Small cleanup of Sender

* Refactor Session: extract the web-viewer connection

* Refactor Session::connect

* Log SDK: stream log data to file on disk

* Rust examples: --save streams to disk

* Python examples: start streaming to disk right away

* typo

Co-authored-by: Clement Rey <[email protected]>

---------

Co-authored-by: Clement Rey <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚀 performance Optimization, memory use, etc 🦀 Rust API Rust logging API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The SDK save feature should stream to disk
2 participants