@@ -10,6 +10,7 @@ use std::io;
10
10
use std:: path:: { Path , PathBuf } ;
11
11
use std:: process:: Command ;
12
12
use std:: sync:: Arc ;
13
+ use std:: time:: Instant ;
13
14
14
15
use lazy_static:: lazy_static;
15
16
use url:: Url ;
@@ -602,19 +603,23 @@ where
602
603
A : AsRef < OsStr > ,
603
604
{
604
605
let inprocess = allow_inprocess ( name, args. clone ( ) ) ;
606
+ let start = Instant :: now ( ) ;
605
607
let out = if inprocess {
606
608
run_inprocess ( config, name, args, env)
607
609
} else {
608
610
run_subprocess ( config, name, args, env)
609
611
} ;
612
+ let duration = Instant :: now ( ) - start;
610
613
let output = SanitizedOutput {
611
614
ok : matches ! ( out. status, Some ( 0 ) ) ,
612
615
stdout : String :: from_utf8 ( out. stdout ) . unwrap ( ) ,
613
616
stderr : String :: from_utf8 ( out. stderr ) . unwrap ( ) ,
614
617
} ;
615
618
619
+
616
620
println ! ( "inprocess: {inprocess}" ) ;
617
621
println ! ( "status: {:?}" , out. status) ;
622
+ println ! ( "duration: {:.3}s" , duration. as_secs_f32( ) ) ;
618
623
println ! ( "stdout:\n ====\n {}\n ====\n " , output. stdout) ;
619
624
println ! ( "stderr:\n ====\n {}\n ====\n " , output. stderr) ;
620
625
0 commit comments