You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: codec.rs
    path of file: ./repos/rust-libp2p/misc/quick-protobuf-codec/benches
    
    the code of the file until where you have to start completion: use asynchronous_codec::Encoder;
use bytes::BytesMut;
use criterion::{criterion_group, criterion_main, BatchSize, BenchmarkId, Criterion};
use quick_protobuf_codec::{proto, Codec};

pub fn benchmark(c: &mut Criterion) {
    for size in [1000, 10_000, 100_000, 1_000_000, 10_000_000] {
        c.bench_with_input(BenchmarkId::new("encode", size), &size, |b, i| {
            b.iter_batched(
                || {
                    let mut out = BytesMut::new();
                    out.reserve(i + 100);
     
    
pub fn benchmark(c: &mut Criterion) {
    for size in [1000, 10_000, 100_000, 1_000_000, 10_000_000] {
        c.bench_with_input(BenchmarkId::new("encode", size), &size, |b, i| {
            b.iter_batched(
                || {
                    let mut out = BytesMut::new();
                    out.reserve(i + 100);
                    let codec = Codec::<proto::Message>::new(i + 100);
                    let msg = proto::Message {
                        data: vec![0; size],
                    };

                    (codec, out, msg)
                },
                |(mut codec, mut out, msg)| codec.encode(msg, &mut out).unwrap(),
                BatchSize::SmallInput,
            );
        });
    }
}