22.214.171.124 release notes
Post date: Aug 02, 2019 2:22:14 PM
Issue 931 - Log Viewer is now Log Analyzer, a full-featured log analysis and profiling tool:
Added a new hierarchical view for debug logs.
You can easily switch between the raw and hierarchical views using the corresponding tabs at the bottom. The last selected view is retained across sessions.
By default the corresponding source location is opened as you browse the hierarchical view of a log. This can be enabled or disabled using the Autoscroll to Source option of the hierarchical view. You can also access the associated source by double-clicking any row in the hierarchical view corresponding to a local source file.
You can now maximize the viewed log to provide more real estate for review. When maximized the connection selector, log level configuration, and log table are removed from the view. You can restore the view at any given time using the same toolbar button.
You can now analyze external logs, whether loaded from files or pasted from the clipboard. External logs are opened in separate tabs in the Log Analyzer tool window.
The hierarchical view of a log can be used as an effective Apex Profiler. Resource metrics are automatically calculated based on the log contents at both the self (current scope) and roll-up levels. This is enabled by multiple view configurations (currently packaged with the product, but they will be end user-configurable in the future):
Standard Log - Displays the same information as the raw log, but organized hierarchically based on execution flow.
CPU Time and Memory Profiling - Displays a profiler-style view that includes CPU time and memory usage metrics. Log events are filtered to those relevant for time and memory profiling.
CPU Time Profiling - Displays a profiler-style view focused on CPU time metrics. As above, log events are filtered to those relevant for time profiling.
Memory Profiling - Displays a profiler-style view focused on memory usage metrics. Log events are filtered to those relevant for memory profiling.
Database Profiling - Displays a profiler-style view focused on SOQL query and DML metrics. Log events are filtered to those relevant for database profiling.
Cumulative Usage Limits and Profiling - Displays a bird's eye view that includes code unit cumulative limit usage organized by namespace and overall cumulative profiling metrics for hotspot identification.
Each view configuration automatically expands the hierarchical view to a level that provides an appropriate starting point for analysis.
Two new profiling-oriented log level presets have added:
Sampling - Enables generation of information required for Apex profiling without enabling such detailed logging that proportional times are changes significantly. This is the most useful log level preset for profiling.
Tracing - Maximizes the information gathered in a debug log for analysis, but can change proportional times in a way that renders CPU time analysis invalid. This log level can be used to get a full view of everything that's happening during a process' execution but may not be as useful for metric-based analysis.
It is now possible to execute unit tests for profiling. A Profile run command is available for unit test methods and classes which automatically sets the log level to the user's choice of the two new profiling-oriented log level presets, then automatically opens the resulting log in the Log Analyzer hierarchical view as a separate tab with a profiling-oriented view configuration selected.
The tabbed raw/hierarchical log view is available in both the Log Analyzer and Anonymous Apex tool windows. It is not possible to add this view directly to unit test execution results, but a new unit test results toolbar button has been added, Show in Log Analyzer, which opens the current test execution log in Log Analyzer as a separate tab for more detailed review.
Log files up to the full 20MB are now supported.
Fixed several issues with the Apex Offline Debugger while implementing Log Analyzer, in particular relating to logs with multiple code units.
Fixed a few issues that could occur when deploying meta.xml files directly.