Troubleshooting Performance

To analyze performance and the time it takes for a function to run, you can turn on statistic logging. Logging can be done to a statfile.txt that will be located in the C:\LS Retail\Commerce\CommerceService\logs folder or to the Application folder in Event Viewer.

Open the nlog.config file where Commerce is installed and activate statistic logging by setting enable="true" for level="Info" rule.

writeto will tell if the data should go to Event Viewer or to a file:

Configuration for either Event Viewer (statevent) or File (statfile) are in the target section:

Each function call will log itself and any sub-function call made within that process, either to Database or LS Central Web Service.

All lines have same time stamp for sorting them together, a source URL that tells which Commerce Service was called, a function name, date and time and duration.

Main function is the first line with total call time for the whole process. Any sub-functions are recorded under that line with - indent.

In Event Viewer there is one record for each call.

In statfile.txt the data will look same except there is an empty line between each function.