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: bench.rs
    path of file: ./repos/databend/src/query/storages/fuse/benches
    
    the code of the file until where you have to start completion: // Copyright 2021 Datafuse Labs
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#[macro_use]
extern crate criterion;

use std::collections::HashMap;
use std::sync::Arc;

use chrono::Utc;
use criterion::black_box;
use criterion::Criterion;
use databend_common_expression::types::NumberScalar;
use databend_common_expression::ColumnId;
use databend_common_expression::Scalar;
use databend_common_storages_fuse::io::TableMetaLocationGenerator;
use databend_common_storages_fuse::statistics::STATS_STRING_PREFIX_LEN;
use databend_storages_common_table_meta::meta::testing::MetaEncoding;
use databend_storages_common_table_meta::meta::BlockMeta;
use databend_storages_common_table_meta::meta::ColumnMeta;
use databend_storages_common_table_meta::meta::ColumnStatistics;
use databend_storages_common_table_meta::meta::CompactSegmentInfo;
use databend_storages_common_table_meta::meta::Compression;
use databend_storages_common_table_meta::meta::SegmentInfo;
use databend_storages_common_tabl
    
fn bench_decode(c: &mut Criterion) {
    let mut grp = c.benchmark_group("decoding");

    let segment_info = build_test_segment_info(1000).unwrap();

    let bincode_summary_bytes = bincode::serialize(black_box(&segment_info.summary)).unwrap();
    let bincode_block_meta_bytes = bincode::serialize(black_box(&segment_info.blocks)).unwrap();

    let msgpack_summary_bytes = rmp_serde::to_vec_named(black_box(&segment_info.summary)).unwrap();
    let msgpack_blocks_meta_bytes =
        rmp_serde::to_vec_named(black_box(&segment_info.blocks)).unwrap();

    grp.bench_function("bincode-decode-summary", |b| {
        b.iter(|| {
            let _: Statistics = bincode::deserialize(black_box(&bincode_summary_bytes)).unwrap();
        })
    });

    grp.bench_function("msg-pack-summary", |b| {
        b.iter(|| {
            let _: Statistics = rmp_serde::from_slice(black_box(&msgpack_summary_bytes)).unwrap();
        })
    });

    grp.bench_function("bincode-decode-block-metas", |b| {
        b.iter(|| {
            let _: Vec<Arc<BlockMeta>> =
                bincode::deserialize(black_box(&bincode_block_meta_bytes)).unwrap();
        })
    });

    grp.bench_function("msg-pack-decode-block-metas", |b| {
        b.iter(|| {
            let _: Vec<Arc<BlockMeta>> =
                rmp_serde::from_slice(black_box(&msgpack_blocks_meta_bytes)).unwrap();
        })
    });

    let segment_bincode_bytes = segment_info
        .bench_to_bytes_with_encoding(MetaEncoding::Bincode)
        .unwrap();
    let segment_msgpack_bytes = segment_info
        .bench_to_bytes_with_encoding(MetaEncoding::MessagePack)
        .unwrap();

    grp.bench_function("bincode-segment-deserialization", |b| {
        b.iter(|| {
            let _ = SegmentInfo::from_slice(black_box(&segment_bincode_bytes)).unwrap();
        })
    });

    grp.bench_function("msg-pack-segment-deserialization", |b| {
        b.iter(|| {
            let _ = SegmentInfo::from_slice(black_box(&segment_msgpack_bytes)).unwrap();
        })
    });

    let compact_segment = CompactSegmentInfo::from_slice(&segment_msgpack_bytes).unwrap();

    grp.bench_function("msg-pack-segment-from-compact", |b| {
        b.iter(|| {
            let _ = SegmentInfo::try_from(black_box(&compact_segment)).unwrap();
        })
    });

    println!("----------------------------------");
    println!("segment_bincode_bytes: {}", segment_bincode_bytes.len());
    println!(
        "segment_msgpack_bytes / segment_bincode_bytes: {}",
        segment_msgpack_bytes.len() as f64 / segment_bincode_bytes.len() as f64
    );
}