Skip to content

Commit a832a8a

Browse files
committed
[summarize] Swap assertion order for better error message
Having the label check first gives us a better error message if there's an issue with the event file. This helped me when tracking down the cause of #48.
1 parent bb14545 commit a832a8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

summarize/src/analysis.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ pub fn perform_analysis(data: ProfilingData) -> Results {
147147
let thread_stack = threads.get_mut(&event.thread_id).unwrap();
148148
let start_event = thread_stack.pop().unwrap();
149149

150-
assert_eq!(start_event.event_kind, event.event_kind);
151150
assert_eq!(start_event.label, event.label);
151+
assert_eq!(start_event.event_kind, event.event_kind);
152152
assert_eq!(start_event.timestamp_kind, TimestampKind::Start);
153153

154154
//track the time for this event

0 commit comments

Comments
 (0)