5import isystem.connect
as ic
11def test_setProfilingSections():
12 connMgr = ic.ConnectionMgr()
13 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
15 ideCtrl = ic.CIDEController(connMgr)
16 profCtrl = ic.CProfilerController2(connMgr,
"sdk_example.trd",
"w")
18 print(f
"Setting profiling sections:")
19 baseUrl = profCtrl.getDocumentOptionURL(
"Trigger.Items[0].Processes[0].Profiler")
20 profCtrl.setProfilingSections(0,
True,
False,
True,
False)
21 url = f
"{baseUrl}.ProfileData"
22 print(f
"\tProfile data: {ideCtrl.getOptionStr(url)}")
23 url = f
"{baseUrl}.ProfileExec"
24 print(f
"\tProfile code: {ideCtrl.getOptionStr(url)}")
25 url = f
"{baseUrl}.ProfileOSObjects"
26 print(f
"\tProfile OS objects: {ideCtrl.getOptionStr(url)}")
27 profCtrl.closeDiscard()
30if __name__ ==
"__main__":
31 test_setProfilingSections()