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

CLI command for compacting recordings #6860

Merged
merged 3 commits into from
Jul 12, 2024
Merged

Conversation

teh-cmc
Copy link
Member

@teh-cmc teh-cmc commented Jul 11, 2024

Title.

$ rerun compact --help

Compacts the contents of an .rrd or .rbl file and writes the result to a new file.

Use the usual environment variables to control the compaction thresholds: `RERUN_CHUNK_MAX_ROWS`, `RERUN_CHUNK_MAX_ROWS_IF_UNSORTED`, `RERUN_CHUNK_MAX_BYTES`.

Example: `RERUN_CHUNK_MAX_ROWS=4096 RERUN_CHUNK_MAX_BYTES=1048576 rerun compact -i input.rrd -o output.rrd`

Usage: rerun compact --input <src.rrd> --output <dst.rrd>

Options:
  -i, --input <src.rrd>


  -o, --output <dst.rrd>


  -h, --help
          Print help (see a summary with '-h')
$ rerun compact -i plot_stress_5x10_50k_2khz.rrd -o /tmp/out.rrd
[2024-07-11T10:55:09Z INFO  rerun::run] compaction started src="plot_stress_5x10_50k_2khz.rrd" src_size_bytes=261 MiB dst="/tmp/out.rrd" max_num_rows=1 024 max_num_bytes=8.0 MiB
[2024-07-11T10:55:16Z INFO  rerun::run] compaction finished src="plot_stress_5x10_50k_2khz.rrd" src_size_bytes=261 MiB dst="/tmp/out.rrd" dst_size_bytes=94.3 MiB time=7.376564451s compaction_ratio="63.895%"

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!
  • If have noted any breaking changes to the log API in CHANGELOG.md and the migration guide

To run all checks from main, comment on the PR with @rerun-bot full-check.

@teh-cmc teh-cmc added 🧑‍💻 dev experience developer experience (excluding CI) 🚀 performance Optimization, memory use, etc do-not-merge Do not merge this PR include in changelog CLI Related to the Rerun CLI labels Jul 11, 2024
@teh-cmc teh-cmc changed the base branch from main to cmc/store_chunks_compaction July 11, 2024 11:59
@teh-cmc teh-cmc changed the base branch from cmc/store_chunks_compaction to cmc/chunk_compaction_ui July 11, 2024 11:59
@teh-cmc teh-cmc changed the title CLI for compacting recordings CLI command for compacting recordings Jul 11, 2024
@teh-cmc teh-cmc force-pushed the cmc/chunk_compaction_ui branch from 4adf34f to 5fcdfd7 Compare July 12, 2024 07:43
Base automatically changed from cmc/chunk_compaction_ui to main July 12, 2024 07:49
@teh-cmc teh-cmc force-pushed the cmc/chunk_compaction_cli branch from 3e9eb6b to 722cbe1 Compare July 12, 2024 07:50
@teh-cmc teh-cmc removed the do-not-merge Do not merge this PR label Jul 12, 2024
@teh-cmc teh-cmc merged commit bb49d6f into main Jul 12, 2024
24 of 29 checks passed
@teh-cmc teh-cmc deleted the cmc/chunk_compaction_cli branch July 12, 2024 07:51
teh-cmc added a commit that referenced this pull request Jul 12, 2024
…nd (#6861)

Title.

```
$ rerun rrd --help
Usage: rerun rrd <COMMAND>

Commands:
  compare  Compares the data between 2 .rrd files, returning a successful shell exit code if they match
  print    Print the contents of an .rrd or .rbl file
  compact  Compacts the contents of an .rrd or .rbl file and writes the result to a new file
  help     Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help
```

- DNM: Requires #6860
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI Related to the Rerun CLI 🧑‍💻 dev experience developer experience (excluding CI) include in changelog 🚀 performance Optimization, memory use, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants