fn bench_write_shreds(bench: &mut Bencher, entries: Vec<Entry>, ledger_path: &Path) {
    let blockstore =
        Blockstore::open(ledger_path).expect("Expected to be able to open database ledger");
    bench.iter(move || {
        let shreds = entries_to_test_shreds(&entries, 0, 0, true, 0);
        blockstore.insert_shreds(shreds, None, false).unwrap();
    });

    Blockstore::destroy(ledger_path).expect("Expected successful database destruction");
}
// Given some shreds and a ledger at ledger_path, benchmark writing the shreds to the ledger
Given some shreds and a ledger at ledger_path, benchmark writing the shreds to the ledger
Given some shreds and a ledger at ledger_path benchmark writing the shreds to the ledger
fn bench_write_shreds(bench: &mut Bencher, entries: Vec<Entry>, ledger_path: &Path) {
    let blockstore =
        Blockstore::open(ledger_path).expect("Expected to be able to open database ledger");
    bench.iter(move || {
        let shreds = entries_to_test_shreds(&entries, 0, 0, true, 0);
        blockstore.insert_shreds(shreds, None, false).unwrap();
    });
    Blockstore::destroy(ledger_path).expect("Expected successful database destruction");
}
fn bench_write_shreds ( bench : & mut Bencher , entries : Vec < Entry > , ledger_path : & Path ) { let blockstore = Blockstore :: open ( ledger_path ) . expect ( " " ) ; bench . iter ( move | | { let shreds = entries_to_test_shreds ( & entries , 0 , 0 , true , 0 ) ; blockstore . insert_shreds ( shreds , None , false ) . unwrap ( ) ; } ) ; Blockstore :: destroy ( ledger_path ) . expect ( " " ) ; }
Given some shreds and a ledger at ledger_path, benchmark writing the shreds to the ledger
Given some shreds and a ledger at ledger_path benchmark writing the shreds to the ledger
bench
&mut Bencher
entries
Vec<Entry>
ledger_path
&Path