Testing and validating performances
Before deploying a Dynamics 365 Business Central solution into a production environment, you should do some performance testing or measures.
In AL code, you can use the SessionInformation
data type to measure the number of SQL statements or rows read that your code is doing. For example, take the following AL code:
SqlRowsRead := SessionInformation.SqlRowsRead();
SqlStatementsExecuted := SessionInformation.SqlStatementsExecuted();
This gives information about the number of SQL statements executed and the number of SQL rows read in a session.
More information about the SessionInformation
data type can be found here: https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/sessioninformation/sessioninformation-data-type.
To test code performance, it’s also extremely important to use telemetry. The code-related telemetry signals to check are under the following families of signals...