File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,10 @@ mod place_select;
14
14
mod ptable;
15
15
mod ty;
16
16
17
+ use std:: time:: Instant ;
18
+
17
19
use clap:: { arg, command, value_parser} ;
18
- use log:: info;
20
+ use log:: { debug , info} ;
19
21
use mir:: serialize:: Serialize ;
20
22
21
23
use crate :: generation:: GenerationCtx ;
@@ -35,7 +37,10 @@ fn main() {
35
37
let debug_dump = matches. get_one :: < bool > ( "debug" ) . copied ( ) . unwrap_or ( false ) ;
36
38
info ! ( "Generating a program with seed {seed}" ) ;
37
39
let genctxt = GenerationCtx :: new ( seed, debug_dump) ;
40
+ let time = Instant :: now ( ) ;
38
41
let ( program, tcx) = genctxt. generate ( ) ;
39
42
println ! ( "{}" , program. serialize( & tcx) ) ;
40
43
println ! ( "{}" , tcx. serialize( ) ) ;
44
+ let dur = time. elapsed ( ) ;
45
+ debug ! ( "took {}s to generate" , dur. as_secs_f32( ) ) ;
41
46
}
You can’t perform that action at this time.
0 commit comments