File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -1421,6 +1421,14 @@ fn process_stat_output(
1421
1421
stats. insert ( "cpu-clock" . into ( ) , counters. cpu_clock ) ;
1422
1422
continue ;
1423
1423
}
1424
+ if line. starts_with ( "!wall-time:" ) {
1425
+ let d = & line[ "!wall-time:" . len ( ) ..] ;
1426
+ stats. insert (
1427
+ "wall-time" . into ( ) ,
1428
+ d. parse ( ) . map_err ( |e| DeserializeStatError :: ParseError ( d. to_string ( ) , e) ) ?
1429
+ ) ;
1430
+ continue ;
1431
+ }
1424
1432
1425
1433
// The rest of the loop body handles processing output from the Linux `perf` tool
1426
1434
// so on Windows, we just skip it and go to the next line.
Original file line number Diff line number Diff line change @@ -109,7 +109,11 @@ fn main() {
109
109
let status = tool. status ( ) . expect ( "tool failed to start" ) ;
110
110
let dur = start. elapsed ( ) ;
111
111
assert ! ( status. success( ) , "tool did not run successfully" ) ;
112
- print_time ( dur) ;
112
+ println ! (
113
+ "!wall-time:{}.{:09}" ,
114
+ dur. as_secs( ) ,
115
+ dur. subsec_nanos( )
116
+ ) ;
113
117
114
118
let xperf = std:: env:: var ( "XPERF" ) . unwrap_or ( "xperf.exe" . to_string ( ) ) ;
115
119
let mut cmd = Command :: new ( & xperf) ;
You can’t perform that action at this time.
0 commit comments