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: main.rs
    path of file: ./repos/llm/binaries/llm-test/src
    
    the code of the file until where you have to start completion: //! Test runner for all LLMs.

mod common;
mod delete;
mod inference;
mod tokens;

use anyhow::Context;
use clap::Parser;
use indicatif::{ProgressBar, ProgressStyle};
use llm::InferenceStats;
use reqwest::Client;
use serde::{Deserialize, Serialize};
use std::{
    cmp::min,
    collections::HashMap,
    env,
    fs::{self, File},
    io::Write,
    path::{Path, PathBuf},
    str::FromStr,
    time::Instant,
};

#[derive(Parser)]
struct Cli {
    /// The path to the directory containing the model configurations.
    /// If not specified, the default directory will be used.
    #[clap(short, long)]
    configs: Option<PathBuf>,

    /// Whether to use memory mapping when loading the model.
    #[clap(short, long)]
    no_mmap: bool,

    /// The thread count to use when running inference.
    #[clap(short, long)]
    threads: Option<usize>,

    /// The model architecture to test. If not specified, all architectures will be tested.
    architecture: Option<String>,
}

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    // Set up the logger
    env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("info")).init();

    // Parse command line arguments
    let args = Cli::parse();
    let specific_model = args.architecture.clone();

    // Initialize directories
    let cwd = env::current_dir()?;
    let configs_dir = args
        .configs
        .unwrap_or_else(|| cwd.join("binaries/llm-test/configs"));
    let download_dir = cwd.join(".tests/models");
    fs::create_dir_all(&download_dir)?;
    let results_dir = cwd.join(".tests/results");
    fs::create_dir_all(&results_dir)?;

    // Load configurations
    let test_configs: HashMap<String, TestConfig> = fs::read_dir(configs_dir)?
        .filter_map(Result::ok)
        .map(|de| de.path())
        .filter(|p| p.is_file())
        .filter(|p| p.extension().unwrap_or_default() == "json")
        .map(|path| {
            let file_name = path.file_stem().unwrap().to_string_lossy().to_string();
            let test_config: TestConfig = serde_json::from_str(&fs::read_to_string(&path)?)?;
        
    
async fn main() -> anyhow::Result<()> {
    // Set up the logger
    env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("info")).init();

    // Parse command line arguments
    let args = Cli::parse();
    let specific_model = args.architecture.clone();

    // Initialize directories
    let cwd = env::current_dir()?;
    let configs_dir = args
        .configs
        .unwrap_or_else(|| cwd.join("binaries/llm-test/configs"));
    let download_dir = cwd.join(".tests/models");
    fs::create_dir_all(&download_dir)?;
    let results_dir = cwd.join(".tests/results");
    fs::create_dir_all(&results_dir)?;

    // Load configurations
    let test_configs: HashMap<String, TestConfig> = fs::read_dir(configs_dir)?
        .filter_map(Result::ok)
        .map(|de| de.path())
        .filter(|p| p.is_file())
        .filter(|p| p.extension().unwrap_or_default() == "json")
        .map(|path| {
            let file_name = path.file_stem().unwrap().to_string_lossy().to_string();
            let test_config: TestConfig = serde_json::from_str(&fs::read_to_string(&path)?)?;
            anyhow::Ok((file_name, test_config))
        })
        .collect::<Result<_, _>>()?;
    let model_config = ModelConfig {
        mmap: !args.no_mmap,
        threads: args.threads.unwrap_or(2),
    };

    // Test models
    let mut test_configs = if let Some(specific_architecture) = specific_model {
        vec![test_configs
            .get(&specific_architecture)
            .with_context(|| {
                format!(
                    "No config found for `{specific_architecture}`. Available configs: {:?}",
                    test_configs.keys()
                )
            })?
            .clone()]
    } else {
        test_configs.values().cloned().collect()
    };
    test_configs.sort_by_key(|tc| tc.architecture.clone());

    let test_configs_len = test_configs.len();
    for test_config in test_configs {
        test_model(&model_config, &test_config, &download_dir, &results_dir).await?;
        if test_configs_len > 1 {
            log::info!("----");
        }
    }

    log::info!("All tests passed!");
    Ok(())
}