pids["client"] = pid break return pids def find_client_frame_events(events, pids): client_frames = [] for i, event in enumerate(events): if event["vpid"] == pids[ "client"] and event.name == "mir_client_perf:end_frame": client_frames.append(Frame(events, pids, i)) return client_frames events = test.events() pids = find_pids(events) client_frame_events = find_client_frame_events(events, pids) data = [] for client_frame in client_frame_events: nested_frame = client_frame.find_nested_frame_containing_this_one() if nested_frame is None: continue host_frame = nested_frame.find_host_frame_containing_this_one() if host_frame is None: continue data.append( (host_frame.timestamp() - client_frame.timestamp()) / 1000000.0) print("=== Results ===")
for event in events: pid = event["vpid"] if pid not in pids.values(): pids["client"] = pid break return pids def find_client_frame_events(events, pids): client_frames = [] for i, event in enumerate(events): if event["vpid"] == pids["client"] and event.name == "mir_client_perf:end_frame": client_frames.append(Frame(events, pids, i)) return client_frames events = test.events() pids = find_pids(events) client_frame_events = find_client_frame_events(events, pids) data = [] for client_frame in client_frame_events: nested_frame = client_frame.find_nested_frame_containing_this_one() if nested_frame is None: continue host_frame = nested_frame.find_host_frame_containing_this_one() if host_frame is None: continue data.append((host_frame.timestamp() - client_frame.timestamp()) / 1000000.0) print("=== Results ===") print("Tracked %d buffers from nested client to display" % len(data))