import isystem.connect as ic
winidea_id = ''
def test_setProfilingSections():
connMgr = ic.ConnectionMgr()
connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
ideCtrl = ic.CIDEController(connMgr)
profCtrl = ic.CProfilerController2(connMgr, "sdk_example.trd", "w")
print(f"Setting profiling sections:")
baseUrl = profCtrl.getDocumentOptionURL("Trigger.Items[0].Processes[0].Profiler")
profCtrl.setProfilingSections(0, True, False, True, False)
url = f"{baseUrl}.ProfileData"
print(f"\tProfile data: {ideCtrl.getOptionStr(url)}")
url = f"{baseUrl}.ProfileExec"
print(f"\tProfile code: {ideCtrl.getOptionStr(url)}")
url = f"{baseUrl}.ProfileOSObjects"
print(f"\tProfile OS objects: {ideCtrl.getOptionStr(url)}")
profCtrl.closeDiscard()
if __name__ == "__main__":
test_setProfilingSections()