1
2
3
4
5import isystem.connect as ic
6import export_profiler_data
7
8
9winidea_id = ''
10
11
12def test_binTimeline():
13 conn_mgr = ic.ConnectionMgr()
14 conn_mgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
15
16
17 xml_file_path = export_profiler_data.export_data(conn_mgr)
18 prof_data = ic.CProfilerData2.createInstance(xml_file_path, True)
19
20 size = prof_data.getBinTimelineEventSize()
21 print(f"Each event size: {size} bytes")
22
23 bin_file_size = prof_data.getBinTimelineFileSize()
24 print(f"File size: {bin_file_size} bytes")
25
26 print(f"Number of events: {int(bin_file_size/size)}")
27 prof_data.closeParser()
28
29
30if __name__ == "__main__":
31 test_binTimeline()