subms-segment-reader 0.5.2

submillisecond.com cookbook recipe - storage: subms-segment-reader. Read length-prefix framed records from a segment file; surface typed errors on truncation.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::io;
use std::process::ExitCode;
use subms::{SubMsBenchParams, benchmark};
use subms_segment_reader::recipe::SegmentReaderRecipe;

fn main() -> ExitCode {
    let params = SubMsBenchParams::from_stdin();
    let mut h = benchmark(&SegmentReaderRecipe, &params);
    h.add_meta("subms.recipe.slug", "subms-segment-reader");
    h.add_meta("subms.recipe.category", "storage");
    h.write_json(&mut io::stdout().lock()).expect("write json");
    ExitCode::SUCCESS
}