Skip to content

Commit 21a03af

Browse files
committed
http_cloud_column_speed_test
1 parent 6065901 commit 21a03af

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

tests/tests_api_cloud.rs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ use object_store::ObjectStore;
2929
use std::collections::HashSet;
3030
use std::panic::catch_unwind;
3131
use std::sync::Arc;
32+
use std::time::Instant;
3233
use thousands::Separable;
3334
use tokio::runtime;
3435
use url::Url;
@@ -2584,3 +2585,32 @@ fn http_cloud_urls_md_4() -> Result<(), Box<BedErrorPlus>> {
25842585
.unwrap();
25852586
Ok::<(), Box<BedErrorPlus>>(())
25862587
}
2588+
2589+
#[tokio::test]
2590+
async fn http_cloud_column_speed_test() -> Result<(), Box<dyn std::error::Error>> {
2591+
let mut bed_cloud = BedCloud::builder(
2592+
"https://www.ebi.ac.uk/biostudies/files/S-BSST936/genotypes/synthetic_v1_chr-10.bed",
2593+
[("timeout", "100s")],
2594+
)?
2595+
.skip_early_check()
2596+
.iid_count(1_008_000)
2597+
.sid_count(361_561)
2598+
.build()
2599+
.await?;
2600+
2601+
let start_time = Instant::now();
2602+
let val = ReadOptions::builder()
2603+
.iid_index(..1000)
2604+
.sid_index(..50)
2605+
.f32()
2606+
.read_cloud(&mut bed_cloud)
2607+
.await?;
2608+
let elapsed = start_time.elapsed();
2609+
2610+
println!("Time taken: {:?}", elapsed);
2611+
println!("Size of val: {} elements", val.len());
2612+
println!("Mean of val: {:?}", val.mean());
2613+
// assert_eq!(val.mean(), Some(0.03391369));
2614+
2615+
Ok(())
2616+
}

0 commit comments

Comments
 (0)