File tree 5 files changed +17
-4
lines changed
5 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 2
2
name = " rowlab"
3
3
version = " 0.1.0"
4
4
edition = " 2024"
5
+ default-run = " rowlab"
5
6
6
7
[dependencies ]
7
8
anyhow = " 1.0.97"
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ const STATIONS_FILE: &str = "src/bin/stations.txt";
24
24
const STATIONS_PATTERN : & str = r#"new WeatherStation\("([^*]+)", ([^)]+)\)"# ;
25
25
26
26
/// The number of rows in the output measurements file.
27
- const MEASUREMENTS : usize = 10000 ;
27
+ const MEASUREMENTS : usize = 1_000_000_000 ;
28
28
29
29
/// The template for the progress bar.
30
30
const PROGRESS_TEMPLATE : & str =
Original file line number Diff line number Diff line change 1
1
use rowlab:: aggregate;
2
+ use std:: time:: Instant ;
2
3
3
4
/// The output file to write the measurements into.
4
5
const MEASUREMENTS_FILE : & str = "../measurements.txt" ;
5
6
6
7
fn main ( ) {
8
+ let start = Instant :: now ( ) ;
9
+
7
10
let res = aggregate ( MEASUREMENTS_FILE ) ;
8
- println ! ( "{}" , res. into_string( ) )
11
+ println ! ( "{}" , res. into_string( ) ) ;
12
+
13
+ let elapsed = start. elapsed ( ) ;
14
+ println ! ( "Elapsed time: {:?}" , elapsed) ;
9
15
}
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ const STATIONS_FILE: &str = "src/bin/stations.txt";
24
24
const STATIONS_PATTERN : & str = r#"new WeatherStation\("([^*]+)", ([^)]+)\)"# ;
25
25
26
26
/// The number of rows in the output measurements file.
27
- const MEASUREMENTS : usize = 10000 ;
27
+ const MEASUREMENTS : usize = 1_000_000_000 ;
28
28
29
29
/// The template for the progress bar.
30
30
const PROGRESS_TEMPLATE : & str =
Original file line number Diff line number Diff line change 1
1
use rowlab_ref:: aggregate;
2
+ use std:: time:: Instant ;
2
3
3
4
/// The output file to write the measurements into.
4
5
const MEASUREMENTS_FILE : & str = "../measurements.txt" ;
5
6
6
7
fn main ( ) {
8
+ let start = Instant :: now ( ) ;
9
+
7
10
let res = aggregate ( MEASUREMENTS_FILE ) ;
8
- println ! ( "{}" , res. into_string( ) )
11
+ println ! ( "{}" , res. into_string( ) ) ;
12
+
13
+ let elapsed = start. elapsed ( ) ;
14
+ println ! ( "Elapsed time: {:?}" , elapsed) ;
9
15
}
You can’t perform that action at this time.
0 commit comments