5import isystem.connect
as ic
6import export_profiler_data
12def test_hasStatisticsForArea():
13 conn_mgr = ic.ConnectionMgr()
14 conn_mgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
17 xml_file_path = export_profiler_data.export_data(conn_mgr)
18 prof_data = ic.CProfilerData2.createInstance(xml_file_path,
False)
20 print(
"Has statistics for area (by area ID):")
21 area_ok = prof_data.getArea(ic.CProfilerArea2.EFunctions,
"targetInit")
23 print(f
"\t'{area_ok.getAreaName()}': {prof_data.hasStatisticsForArea(area_ok.getAreaId())}")
24 print(f
"\t'{area_err}': {prof_data.hasStatisticsForArea(area_err)}")
26 print(
"Has statistics for area (by area URL):")
27 area_url =
'Code/targetInit'
28 print(f
"\t'{area_url}': {prof_data.hasStatisticsForArea(area_url)}")
31if __name__ ==
"__main__":
32 test_hasStatisticsForArea()