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: rocksdb.rs
    path of file: ./repos/nearcore/runtime/runtime-params-estimator/src
    
    the code of the file until where you have to start completion: use rand::{prelude::SliceRandom, Rng};
use rand_xorshift::XorShiftRng;
use rocksdb::DB;
use std::{io::prelude::*, iter, path::PathBuf};

use crate::{config::Config, gas_cost::GasCost};

#[derive(Debug, Clone, clap::Parser)]
pub struct RocksDBTestConfig {
    /// Value size used for all DB operations in RocksDB tests
    /// (`RocksDb*` estimations only)
    #[clap(name = "rdb-value-size", long, default_value = "1000")]
    pub value_size: usize,
    /// Number of insertions/reads performed in RocksDB tests
    /// (`RocksDb*` estimations only)
    #[clap(name = "rdb-op-count", long, default_value = "1000000")]
    pub op_count: usize,
    /// Size of memtable used in
    
pub(crate) fn rocks_db_inserts_cost(config: &Config) -> GasCost {
    let db_config = &config.rocksdb_test_config;
    let data = input_data(db_config, INPUT_DATA_BUFFER_SIZE);
    let tmp_dir = tempfile::TempDir::new().expect("Failed to create directory for temp DB");
    let db = new_test_db(&tmp_dir, &data, &db_config, config.accurate);

    if db_config.debug_rocksdb {
        eprintln!("# {:?}", db_config);
        println!("# After setup / before measurement:");
        print_levels_info(&db);
    }

    let setup_insertions = if config.accurate { db_config.setup_insertions } else { 1 };
    let op_count = if config.accurate { db_config.op_count } else { 1 };

    let gas_counter = GasCost::measure(config.metric);

    if db_config.sequential_keys {
        sequential_inserts(
            op_count,
            db_config.value_size,
            &data,
            setup_insertions,
            &db,
            db_config.force_compaction,
            db_config.force_flush,
        );
    } else {
        prandom_inserts(
            op_count,
            db_config.value_size,
            &data,
            ANOTHER_PRANDOM_SEED,
            &db,
            db_config.force_compaction,
            db_config.force_flush,
        );
    }

    let cost = gas_counter.elapsed();

    if db_config.debug_rocksdb {
        println!("# Cost: {:?}", cost);
        print_levels_info(&db);
    }

    drop(db);
    tmp_dir.close().expect("Could not clean up temp DB");

    if db_config.input_data_path.is_none() {
        backup_input_data(&data);
    }

    cost
}