Skip to main content

samples_to_bytes

Function samples_to_bytes 

Source
pub fn samples_to_bytes(
    samples: &[TuneSampleRow],
    format: ExportFormat,
) -> Result<Vec<u8>>
Expand description

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 (history-explorer-ui), so the CLI and the web GUI can never disagree about what a run’s export looks like.