-
-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Logger Performance Improvements (#660)
* Benchmarking & performance improvements for transactions with many log entries * Removes duplicated field truncation from LoggerDataStore's pre-platform event publish responsibilities * Further optimizations - strip out Logging classes prior to entering LoggerStackTrace, saving an average of 3 seconds processing time over 500 log entries * Adds PMD7 suppressions where applicable * Standardizing how timestamps are added to and maintained within LogEntryEventBuilder with feedback from @jongpie * Code review feedback from @jongpie - changed LoggerParameter.StoreApexHeapSizeLimit to LoggerParameter.StoreHeapSizeLimit, standardized referring to the limit in the singular as opposed to plural, and added two more tests: 1) LogEntryEventBuilder_Tests.it_should_not_set_transaction_heap_limits_fields_when_transaction_limit_tracking_is_disabled_via_logger_parameter(), and 2) LoggerBenchmarking_Tests.it_benchmarks_without_setting_heap_limit()
- Loading branch information
1 parent
b3a08f0
commit 6453b17
Showing
28 changed files
with
512 additions
and
620 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...ger/core/main/configuration/customMetadata/LoggerParameter.StoreHeapSizeLimit.md-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<CustomMetadata | ||
xmlns="http://soap.sforce.com/2006/04/metadata" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:xsd="http://www.w3.org/2001/XMLSchema" | ||
> | ||
<label>Store Heap Size Limit</label> | ||
<protected>false</protected> | ||
<values> | ||
<field>Comments__c</field> | ||
<value xsi:nil="true" /> | ||
</values> | ||
<values> | ||
<field>Description__c</field> | ||
<value | ||
xsi:type="xsd:string" | ||
>When set to 'true' (default), transaction heap limits are retrieved from the class System.Limits and stored on LogEntry__c. | ||
|
||
When set to 'false', transaction heap limits are not retrieved or stored. This drastically helps reduce CPU time usage per log entry. The 'Store Transaction Limits' Logger Parameter record must also be set to 'true' for any limit tracking to occur.</value> | ||
</values> | ||
<values> | ||
<field>Value__c</field> | ||
<value xsi:type="xsd:string">true</value> | ||
</values> | ||
</CustomMetadata> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.