File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -18,16 +18,17 @@ fn main() -> Result<(), Box<dyn Error>> {
1818
1919 let data = ProfilingData :: new ( & opt. file_prefix ) ?;
2020
21- let global_start_time = data. iter ( ) . map ( |e| e. timestamp . start ( ) ) . min ( ) . unwrap ( ) ;
22-
23- for event in data . iter ( ) {
24- if let Some ( thread_id) = opt . thread_id {
25- if event . thread_id != thread_id {
26- continue ;
21+ if let Some ( global_start_time) = data. iter ( ) . map ( |e| e. timestamp . start ( ) ) . min ( ) {
22+ for event in data . iter ( ) {
23+ if let Some ( thread_id ) = opt . thread_id {
24+ if event . thread_id != thread_id {
25+ continue ;
26+ }
2727 }
28+ print_event ( & event. to_event ( ) , global_start_time) ;
2829 }
29-
30- print_event ( & event . to_event ( ) , global_start_time ) ;
30+ } else {
31+ eprintln ! ( "No events." ) ;
3132 }
3233
3334 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments