Using log analyzer

124 views
Skip to first unread message

myinc...@gmail.com

unread,
Mar 24, 2020, 3:45:53 PM3/24/20
to Illuminated Cloud General Discussion
Hi Scott,

We have a lot of code in a sandbox org. The issue is that on updating an opportunity record, the trigger associated with this object is running recursively. There is lot of code in the trigger, with multiple workflows and processes. Due to this, sometimes CPU time limit is exceeding as well.

I want to analyze the logs and understand why this is occurring and how can I stop this recursive behaviour and increase performance. How can I use your tool to perform this kind of analysis? What should be the debug levels?

I was also using the CPU time Profiling, but don't know how will it help me. I need pointers from your side. Thanks in advance.

Fullscreen_2020-03-24__12_41_PM.png


Scott Wells

unread,
Mar 24, 2020, 6:15:21 PM3/24/20
to Illuminated Cloud General Discussion
I'd recommend that you start with this video:


and these release notes which describe the functionality at a high level:


Once you review those, please let me know if you're not sure how to set up a process for analysis and/or how to dig into the results.

Regards,
Scott Wells

myinc...@gmail.com

unread,
Mar 28, 2020, 5:50:37 PM3/28/20
to Illuminated Cloud General Discussion
Hi Scott,

I went through that video. I tried on my end to analyze the logs, but as the log size is 11mb, it's becoming difficult. The issue is that somewhere in after update trigger of opportunity, we must be updating the same record once or multiple times, due to which recursion is happening. Any pointers or settings which I should be setting in the log analyzer?

Scott Wells

unread,
Mar 30, 2020, 11:28:58 AM3/30/20
to Illuminated Cloud General Discussion
Hi. It's difficult to answer this question in extreme detail because every process is going to be different in terms of how its flow is represented in a log. At a high level you need to do the following:
  1. Configure the user under which the process will execute for the Profiling (Sampling) or Profiling (Tracing) logging level.
  2. Execute the process.
  3. Open the log in Log Analyzer.
  4. Switch to the CPU Time Profiling log view to analyze time or to Database Profiling to analyze SOQL queries and DML statements.
  5. Drill down into the execution tree either by expanding nodes or, if you know some key string or text in the executing process's name or logged information, just start typing it and quick search can be used to move through matches quickly.
I hope that helps. Let me know if you have other questions.

Regards,
Scott Wells
Reply all
Reply to author
Forward
0 new messages