File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ use object_store::ObjectStore;
29
29
use std:: collections:: HashSet ;
30
30
use std:: panic:: catch_unwind;
31
31
use std:: sync:: Arc ;
32
+ use std:: time:: Instant ;
32
33
use thousands:: Separable ;
33
34
use tokio:: runtime;
34
35
use url:: Url ;
@@ -2584,3 +2585,32 @@ fn http_cloud_urls_md_4() -> Result<(), Box<BedErrorPlus>> {
2584
2585
. unwrap ( ) ;
2585
2586
Ok :: < ( ) , Box < BedErrorPlus > > ( ( ) )
2586
2587
}
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
+ }
You can’t perform that action at this time.
0 commit comments