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: websocket_stress.rs
    path of file: ./repos/holochain/crates/holochain/tests
    
    the code of the file until where you have to start completion: #![cfg(feature = "glacial_tests")]

use futures::sink::SinkExt;
use futures::stream::StreamExt;
use holochain::conductor::{
    api::{AdminRequest, AdminResponse},
    Conductor,
};
use holochain_conductor_api::conductor::ConductorConfig;
use holochain_conductor_api::conductor::KeystoreConfig;
use holochain_conductor_api::AdminInterfaceConfig;
use holochain_conductor_api::InterfaceDriver;
use holochain_websocket::WireMessage;
use tempfile::TempDir;
use tokio_tungstenite::*;
use tungstenite::Message;

use std::sync::atomic::{AtomicU64, Ordering};

static ID: AtomicU64 = AtomicU64::new(1);

use holochain_serialized_bytes as hsb;

const MINUTES_LONG_BEHAVED_COUNT: usize = 10;
const MINUTES_LONG_BAD_COUNT: usize = 10;
const SECONDS_LONG_BEHAVED_COUNT: usize = 100;
const SECONDS_LONG_BAD_COUNT: usize = 100;

static CONS_MADE: AtomicU64 = AtomicU64::new(0);
static MSGS: AtomicU64 = AtomicU64::new(0);
static GOOD_CLOSE: AtomicU64 = AtomicU64::new(0);
static BAD_CLOSE: AtomicU64 = AtomicU64::new(0);

#[tokio::test(flavor = "multi_thread")]
pub async fn websocket_stress() {
    let tmp_dir = TempDir::new().unwrap();
    let data_root_path = tmp_dir.path().to_path_buf();
    let config = ConductorConfig {
        admin_interfaces: Some(vec![AdminInterfaceConfig {
            driver: InterfaceDriver::Websocket { port: 0 },
        }]),
        data_root_path: Some(data_root
    
pub async fn websocket_stress() {
    let tmp_dir = TempDir::new().unwrap();
    let data_root_path = tmp_dir.path().to_path_buf();
    let config = ConductorConfig {
        admin_interfaces: Some(vec![AdminInterfaceConfig {
            driver: InterfaceDriver::Websocket { port: 0 },
        }]),
        data_root_path: Some(data_root_path.into()),
        keystore: KeystoreConfig::DangerTestKeystore,
        ..Default::default()
    };
    let conductor_handle = Conductor::builder().config(config).build().await.unwrap();
    let port = conductor_handle
        .get_arbitrary_admin_websocket_port()
        .expect("No admin port open on conductor");

    for _ in 0..MINUTES_LONG_BEHAVED_COUNT {
        tokio::task::spawn(run_client(port, 30, false));
    }

    for _ in 0..MINUTES_LONG_BAD_COUNT {
        tokio::task::spawn(run_client(port, 30, true));
    }

    for _ in 0..SECONDS_LONG_BEHAVED_COUNT {
        tokio::task::spawn(run_client(port, 1, false));
    }

    for _ in 0..SECONDS_LONG_BAD_COUNT {
        tokio::task::spawn(run_client(port, 1, true));
    }

    for _ in 0..(6 * 4/* 4 minutes */) {
        tokio::time::sleep(std::time::Duration::from_secs(10)).await;

        println!(
            "Connections: {}, Messages: {}, Graceful Closes: {}, Bad Closes: {}",
            CONS_MADE.load(Ordering::Relaxed),
            MSGS.load(Ordering::Relaxed),
            GOOD_CLOSE.load(Ordering::Relaxed),
            BAD_CLOSE.load(Ordering::Relaxed),
        );
    }
}