winIDEA SDK
Loading...
Searching...
No Matches
test_set_profiling_sections.py
# This script is licensed under BSD License, see file LICENSE.txt, or search for `License` in the SDK online help.
#
# (c) TASKING Germany GmbH, 2023
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()