Skip to main content

Module export

Module export 

Source
Expand description

bhtune export <run_id>: dumps a run’s recorded samples as CSV or JSON.

CSV rows are generated from the same #[derive(Serialize)] struct as the header, so the header and data columns cannot drift out of order.

Functions§

run
samples_to_bytes
Serializes a run’s recorded samples to CSV or JSON bytes – the one place this mapping is implemented, shared by this module’s own run() (writing to a file or stdout) and bhtune-server’s GET /api/runs/{id}/export route, so the CLI and the web GUI can never disagree about what a run’s export looks like.