Closed YangSun33 closed 3 years ago
Awesome feature that is long due. @YangSun33, can you please some screenshots of trace-profile (Eg. visualization from Chrome's chrome://tracing) after this change? I started reviewing the PR and request @ob to also review this. \cc @chenxiao0228
Hey @ravimandala , I've uploaded the screenshot. I ran BPSampleAppTests with my changes. So mainly 2 parts changed in trace-profile (as I marked in the screenshot):
Thanks for reviewing!
Issue: When a BP is reused, the id increases by 1 automatically, like BP-1 & BP-5. In the trace-profile, the stats will be listed in 2 separated lines, which is not friendly to check.
Logic Changes: Introduce BPSwimlane. Moved all NSTask-related code into BPSwimlane. BPSwimlane is in charge of launching tasks to run test bundles. BPSwimlane holds LaneID which keeps the same when reused, so the logs are in one lane in tracing-profile.
Trace-profile Changes: Logs of reused BPSwimlane are listed in the same line. Thread-name: "BP-[THREAD_ID]" -> "BP Swimlane #[LANE_ID]" Event-name: "bp ([PROCESS_ID])" -> "BP-[THREAD_ID] ([PROCESS_ID])"