pub fn run_hotcloud(client: &Arc<Client>, config: Config) {
    let config = Arc::new(config);

    // We can query in parallel to speed up the process, divide the timeline
    // by number of threads
    let mut guards = Vec::with_capacity(config.threads);
    let batch_size: usize = config.hours / config.threads;

    for i in 0..config.threads {
        let start = batch_size * i;
        let end = start + batch_size;
        let config_clone = config.clone();
        let client_clone = client.clone();
        guards.push(thread::spawn(move ||{
            query_thread(start, end, client_clone, config_clone);
        }));
    }

    for guard in guards {
        let _ = guard.join();
    }

}
// Run the query portion of Atlas, to pre-cache the values (which simplifies the demo)
Run the query portion of Atlas, to pre-cache the values (which simplifies the demo)
Run the query portion of Atlas to pre - cache the values ( which simplifies the demo )
pub fn run_hotcloud(client: &Arc<Client>, config: Config) {
    let config = Arc::new(config);
    // We can query in parallel to speed up the process, divide the timeline
    // by number of threads
    let mut guards = Vec::with_capacity(config.threads);
    let batch_size: usize = config.hours / config.threads;
    for i in 0..config.threads {
        let start = batch_size * i;
        let end = start + batch_size;
        let config_clone = config.clone();
        let client_clone = client.clone();
        guards.push(thread::spawn(move ||{
            query_thread(start, end, client_clone, config_clone);
        }));
    }
    for guard in guards {
        let _ = guard.join();
    }
}
pub fn run_hotcloud ( client : & Arc < Client > , config : Config ) { let config = Arc :: new ( config ) ; // We can query in parallel to speed up the process, divide the timeline // by number of threads let mut guards = Vec :: with_capacity ( config . threads ) ; let batch_size : usize = config . hours / config . threads ; for i in 0 .. config . threads { let start = batch_size * i ; let end = start + batch_size ; let config_clone = config . clone ( ) ; let client_clone = client . clone ( ) ; guards . push ( thread :: spawn ( move | | { query_thread ( start , end , client_clone , config_clone ) ; } ) ) ; } for guard in guards { let _ = guard . join ( ) ; } }
Run the query portion of Atlas, to pre-cache the values (which simplifies the demo)
Run the query portion of Atlas to pre - cache the values ( which simplifies the demo )
client
&Arc<Client>
config
Config
client
&Arc<Client>
config
Config