BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Andrew-M
Obsidian | Level 7

Is there any way to perform code profiling in SAS Intelligent Decisioning? We have a Decision flow that is very slow to execute. It contains hundreds of Rule Sets and Code Files. We want to determine what parts of the code are most underperforming so we can focus on optimising those parts.

Is there a flag or feature we can enable to collect performance data? Even just logging the execution time of each package or method would be sufficient. Any suggestions are welcome.

1 ACCEPTED SOLUTION

Accepted Solutions
Andrew-M
Obsidian | Level 7

After inspecting the compiled code of our Decision Flow, I found the following lines:

dcl package logger logr_perf('App.tk.SID.Perf');
...
logr_perf.log( 'd', 'Package Name: MyPackage, Node Name: MyNode, Node ID: bf5809d2-7a20-4c70-9321-fb7752c01889, NODE DURATION: ' .. elapsed_time);

 

It appears that a performance logger is already built in. This led me to SAS's docs on Enabling Performance Logging:
https://documentation.sas.com/doc/en/edmcdc/v_067/edmag/p18ijod43fspmwn1k11cyrb8kjoi.htm

Setting the following environment variable in our published SCR containers enabled this logger:

SAS_SCR_LOG_LEVEL_App.tk.SID.Perf=TRACE

 

I also found another env var that can be set for code profiling, as described in SAS's Monitoring and Logging docs:

https://documentation.sas.com/doc/en/mascrtcdc/v_042/mascrtag/p19wd6anldyq55n1vvezs8j2uhlx.htm

SAS_SCR_LOG_LEVEL_SCR_PROFILE=TRACE

View solution in original post

1 REPLY 1
Andrew-M
Obsidian | Level 7

After inspecting the compiled code of our Decision Flow, I found the following lines:

dcl package logger logr_perf('App.tk.SID.Perf');
...
logr_perf.log( 'd', 'Package Name: MyPackage, Node Name: MyNode, Node ID: bf5809d2-7a20-4c70-9321-fb7752c01889, NODE DURATION: ' .. elapsed_time);

 

It appears that a performance logger is already built in. This led me to SAS's docs on Enabling Performance Logging:
https://documentation.sas.com/doc/en/edmcdc/v_067/edmag/p18ijod43fspmwn1k11cyrb8kjoi.htm

Setting the following environment variable in our published SCR containers enabled this logger:

SAS_SCR_LOG_LEVEL_App.tk.SID.Perf=TRACE

 

I also found another env var that can be set for code profiling, as described in SAS's Monitoring and Logging docs:

https://documentation.sas.com/doc/en/mascrtcdc/v_042/mascrtag/p19wd6anldyq55n1vvezs8j2uhlx.htm

SAS_SCR_LOG_LEVEL_SCR_PROFILE=TRACE