Request Profiler

Form ID: (SM205070)

The Request Profiler is an embedded tool that you can use to troubleshoot performance-related issues in MYOB Advanced or an MYOB Advanced Framework-based application.

Form Toolbar

The form toolbar includes only the form-specific buttons listed below.

Table 1. Form Toolbar Buttons
Button Description
Refresh Results Refreshes the log data on the form.
Clear Log Clears the log data on the form. If particular requests are pinned on the Requests tab, the log data related to these requests remains on the form, while the log data related to the other requests is cleared.
Export Initiates the downloading of a ZIP archive with the logged requests exported to JSON format.
Import Open the Upload Logs dialog box, in which you can select a ZIP archive with logs in JSON format.

Summary Area

In this area, you can review and edit the logging settings for the Request Profiler.

Element Description
Default Logging (Expensive Requests and Requests with Important Exceptions)

A check box that indicates (if selected, which is the default state) that the system logs the requests that comply with any of the following criteria:

  • The request type is Screen, UI, UI-GI, or UI-Reports, and the request has a server time of more than 20 seconds.
  • The request of any type has a server time of more than 60 seconds.
  • The execution of the request has caused at least one of the following exceptions:
    • NullReferenceException
    • ThreadAbortException
    • ArgumentNullException
    • ArgumentOutOfRangeException
    • IndexOutOfRangeException
Tip: By default, the monitoring of expensive requests and important exceptions is enabled in the system. You may choose not to perform manual tuning of requirements and to leave the default settings in the Summary area of the form. By default, this check box is selected, and the following check boxes are cleared: Log Requests (Apply Filter), Log SQL (Apply Filter), Log Exceptions, and Log Events (Apply Filter).
Table 2. Request Logging SectionYou turn on the monitoring of URL requests by selecting the Log Requests (Apply Filter) check box. If only specific URL requests should be monitored, you can specify additional requirements by using the filtering settings in this section. The system displays the list of the logged requests on the Requests tab of the form.
Attention: If the Log Requests (Apply Filter) check box is selected, the system logs URL requests if all of the following applicable conditions is met:
  • The Server Time Threshold or SQL Count Threshold value (if specified) is exceeded.
  • The URL request contains the substring in the URL box, if the box is filled in.
  • The username of the user making the URL request contains the substring in the Username box, if the box is filled in.
Element Description
Log Requests (Apply Filter) A check box that indicates (if selected) that URL requests in MYOB Advanced should be stored in the database. You can log all URL requests, or you can use the other elements in this section to filter the requests that are logged. The system displays the list of the logged requests on the Requests tab of the form.
Server Time Threshold The server time threshold (in milliseconds) above which the profiler records a request. You can use this setting to monitor long URL requests.

The threshold in this box is ignored if the Log Requests (Apply Filter) check box is cleared.

SQL Count Threshold The SQL count threshold above which the profiler records a request. You can use this setting to monitor the URL requests that execute many SQL queries.

The threshold in this box is ignored if the Log Requests (Apply Filter) check box is cleared.

URL A substring that must be present in the URL for the profiler to record a request.

The substring in this box is ignored if the Log Requests (Apply Filter) check box is cleared.

Username A substring that must be present in the username for the profiler to record requests.

The substring in this box is ignored if the Log Requests (Apply Filter) check box is cleared.

Table 3. SQL Logging SectionIf the monitoring of URL requests is turned on—that is, either the Log Requests (Apply Filter) or the Default Logging (Expensive Requests and Requests with Important Exceptions) is selected, then you can also turn on the monitoring of SQL queries within the monitored URL requests by selecting the Log SQL (Apply Filter) check box. If only specific SQL queries should be monitored, you can specify additional requirements by using the filtering settings in this section. The system displays the list of the logged SQL queries on the SQL tab of the form.
Attention: If the Log SQL (Apply Filter) check box is selected, the system logs SQL queries if both of the following applicable conditions are met:
  • The Row Count Threshold or SQL Time Threshold value is exceeded, if either of these boxes is filled in or both boxes are filled in.
  • The substring (such as a method name) specified in the Executed by Method box is present in the stack trace for the profiler.
Element Description
Log SQL (Apply Filter) A check box that indicates (if selected) that the SQL queries within the monitored URL requests should be stored in the database. You can log all SQL queries, or you can use the other elements in this section to filter the SQL requests that are logged. The system displays the list of the logged SQL queries on the SQL tab of the form.

The selection of this check box is ignored if neither the Log Requests (Apply Filter) check box nor the Default Logging (Expensive Requests and Requests with Important Exceptions) check box is selected.

Attention: We recommend that you activate the logging of SQL queries by selecting the Log SQL (Apply Filter) check box for only a limited period, because leaving this check box selected can degrade system performance.
Row Count Threshold The threshold for the number of records processed by an SQL query above which the profiler records a query. You can use this selection criterion to monitor SQL queries that process many rows from the database.

The threshold in this box is ignored if the Log SQL (Apply Filter) check box is cleared.

SQL Time Threshold The SQL time threshold (in milliseconds) above which the profiler records a query. You can use this selection criterion to monitor long SQL queries.

The threshold in this box is ignored if the Log SQL (Apply Filter) check box is cleared.

Executed by Method A substring (such as a method name) that must be present in the stack trace for the profiler to record queries.

The substring in this box is ignored if the Log SQL (Apply Filter) check box is cleared.

Include Cached SQL Results A check box that indicates (if selected) that the system includes SQL queries that obtain results from a query cache (that is, not from the database) in the log.

The selection of this check box is ignored if the Log SQL (Apply Filter) check box is cleared.

Table 4. Exception Logging SectionBy selecting the Log Exceptions check box in this section, you can turn on the logging of exceptions. The system displays the list of the logged exceptions on the Exceptions tab of the form.
Element Description
Log Exceptions A check box that indicates (if selected) that the system logs exceptions. The system displays the list of the logged exceptions on the Exceptions tab of the form.
Table 5. Event Logging SectionBy using the settings of this section, you can turn on the logging of events with a specific severity level. Also, you can filter the events that the system should log by category. The system displays the list of the logged events on the Event Log tab of the form.
Element Description
Log Events (Apply Filter) A check box that indicates (if selected) that the system logs events. You can log all events, or you can use the other elements in this section to filter the events that are logged. The system displays the list of the logged events on the Event Log tab of the form.
Attention: We recommend that you activate the logging of events by selecting the Log Events (Apply Filter) check box for only a limited period, because leaving this check box selected can degrade system performance.
Log Level

The severity level of the events that should be logged. The box contains the following options, which are listed from the most to least severe:

  • Error: Events of only the Error level are logged.
  • Warning: Events with this severity and the higher level (Error) are logged. This is the default setting, which is applicable only if the Log Events (Apply Filter) check box is selected.
  • Information: Events with this severity and the higher levels (Error and Warning) are logged.
  • Debug: Events with this severity and the higher levels (Error, Warning, and Information) are logged.

    If this option is selected, the system requires you to select a category in the Category box to decrease possible performance degradation. If no category is selected, the profiler does not log events.

  • Verbose: Events of all levels are logged; this is the least severe level.

    If this option is selected, the system requires selecting a category in the Category box to decrease possible performance degradation. If no category is selected, the profiler does not log events.

The option in this box is ignored if the Log Events (Apply Filter) check box is cleared.
Category

The category of the events that should be logged. You can select any number of the following options:

  • Trace: The events that are not included in any of the other categories
  • LINQ: The events that are related to the execution of LINQ queries
  • SQL: The events that are related to the execution of SQL queries
  • Slots: The events that are related to operations with database slots
  • SchemaCache: The events that are related to operations with the database schema cache
  • Cache: The events that are related to operations with PXCache
The value in this box is ignored if the Log Events (Apply Filter) check box is cleared.

Requests Tab

The tab contains the list of URL requests saved by the profiler in the database. To update the table, click Refresh Results on the form toolbar. To clear the table, click Clear Log on the form toolbar.

Table 6. Table Toolbar

The table toolbar includes standard buttons and buttons that are specific to this table. For the list of standard buttons, see Table Toolbar. The table-specific buttons are listed below.

Button Description
View SQL Opens the View SQL dialog box, which displays detailed information about the SQL queries within the particular URL request that is currently selected in the table. The profiler creates the lists for each log record if the Log SQL (Apply Filter) check box is selected in the SQL Logging section of the form.
View Event Log Opens the View Event Log dialog box, where you can review detailed information about the events that occurred within the particular URL request that is currently selected in the table. The profiler creates the lists for each URL request if the Log Events (Apply Filter) check box is selected in the Event Logging section of the form.
Open URL Opens the MYOB Advanced form specified in the URL column of the URL request that is selected in the table.
Pin/Unpin Pins the URL request that is selected in the table to keep it for further review or unpins the pinned request. If you clear the log by clicking Clear Log on the form toolbar, the pinned requests remain in the list.
Table 7. Table Columns
Column Description
Is Pinned An icon that is displayed if the row is pinned; otherwise, the column is left empty for the row.
Request Start Time The date and time of the start of the URL request.
Username The username of the user who performed the URL request.
URL The URL of the request. You can click this URL to open the MYOB Advanced form specified in the URL.
Screen The MYOB Advanced form where the request was executed.
Request Type

The type of the request.

The request type can be one of the following:

  • LongRun-Report
  • LongRun
  • Screen
  • Mobile
  • ODATA
  • UI-Reports
  • UI-GI
  • API-CB
  • SOAP
  • API
  • API-ML
  • API-SignalR
  • UI
  • Unknown
Status The status of the URL request.
Command Target The identifier of the control that created the URL request.
Command Name The type of the command that created the URL request.
Client Time The duration of the request execution in a browser on the client side (in milliseconds).
Server Time, ms The aggregate duration of the URL request execution on the server (in milliseconds).
SQL Time, ms The aggregate duration of execution of all the SQL queries in the URL request (in milliseconds).
Server CPU, ms The aggregate duration of CPU usage during the URL request (in milliseconds).
SQL Count The count of the SQL queries to the database in the URL request. This count is the difference between the total number of SQL queries in the URL request and the number of requests to the cache.
Logged SQL Count The count of the logged SQL queries in the URL request. If you click a link in this column, the system opens the View SQL dialog box with details about the logged SQL queries.
SQL Rows The number of records processed in the SQL query.
Exceptions Count The number of exceptions occurred during the URL request.
Logged Exceptions Count The number of exceptions logged during the URL request. If you click a link in this column, the system opens the Exception Profiler dialog box with details on the logged exceptions.
Events Count The number of events that occurred during the URL request.
Logged Events Count The number of events that were logged during the URL request. If you click a link in this column, the system opens the View Event Log dialog box with details on the logged events.
Managed Memory The memory volume used by MYOB Advanced at the start time of the URL request (in megabytes).
Managed Memory Bytes The memory volume used by MYOB Advanced at the start time of the URL request (in bytes).
Peak Memory Bytes The maximum excess of the memory volume (in bytes) used by MYOB Advanced during the execution of the URL request above the memory volume at the start time of the URL request (see the Managed Memory Bytes column).
Tip: The peak memory byte value depends on other processes being performed on the machine in the same period of time.
Wait Time The wait time, which is calculated by the following formula: Server Time, ms - Server CPU, ms - SQL Time, ms.
Table 8. View SQL Dialog Box

The View SQL dialog box displays the list of records that contain the performance data of SQL queries that occurred during the currently selected URL request. The profiler saves information that is displayed in the dialog box to the database if the Log SQL (Apply Filter) check box is selected in the SQL Logging section of the Summary area. To view the text of the currently selected SQL query, click Switch Between Grid and Form on the table toolbar. In form view, the dialog box displays the application stack trace at the moment of the SQL query.

The table toolbar includes only standard buttons. For the list of standard buttons, see Table Toolbar.

Column Description
Order The order number of the statement execution within the URL request.
Statement ID The ID of the SQL query.
Tables The database tables used in the SQL query.
Query Hash The hash code for the SQL query.
Row Count The number of records processed in the SQL query.
Start Time The time that has passed from the start time of the URL request to the start time of the SQL query (in milliseconds).
SQL Time, ms The duration of the SQL query (in milliseconds).
Parameters The parameters of the SQL query, if available.
From Cache The check box that indicates (if selected) that the SQL query processed data from the query cache, not from the database.
Table 9. View Event Log Dialog Box

The View Event Log dialog box displays the list of events that occurred while the currently selected URL request was executed. The profiler saves information that is displayed in the dialog box to the database if the Log Events (Apply Filter) check box is selected in the Event Logging section. To view more information about the currently selected event, click Switch Between Grid and Form on the table toolbar.

The table toolbar includes only standard buttons. For the list of standard buttons, see Table Toolbar.

Column Description
Start Time The time that has passed from the start time of the URL request to the start time of the event (in milliseconds).
Source The source of the event.
Event Type The type of the event.
Message The text of the message assigned to the event.
Table 10. Exception Profiler Dialog Box

When you click a link in the Logged Exceptions Count column on the Requests tab, the system opens the Exception Profiler with details on the logged exceptions. The Exception Profiler displays the list of exceptions that occurred while the currently selected URL request was executed. The profiler saves information that is displayed in the dialog box to the database if the Log Exceptions check box is selected in the Exception Logging section of the Summary area.

The table toolbar includes only standard buttons. For the list of standard buttons, see Table Toolbar.

Column Description
Start Time The time that has passed from the start time of the URL request to the start time of the exception (in milliseconds).
Source The source of the exception.
Exception Type The type of the exception.
Message The text of the exception.

SQL Tab

By using the SQL tab, you can review the logged SQL queries that comply with the specified filters. The same SQL query may be triggered by multiple URL requests with different parameters. The table displays aggregated information for each query.

The table toolbar includes only standard buttons. For the list of standard buttons, see Table Toolbar.

Table 11. Table Columns
Column Description
Statement ID The ID of the SQL query. If you click a link in this column, the system opens the SQL Details dialog box with the details of the SQL query.
Tables The database tables used in the SQL query.
SQL Text The text of the SQL query.
Query Hash

The hash code for the SQL query.

Total SQL Time, ms The total duration for all executions of the SQL query (in milliseconds).
Executions The total number of SQL query executions.
Total Rows The total number of records processed in the SQL query.
Table 12. SQL Details Dialog Box

When you click a link in the Statement ID column, the system opens the SQL Details dialog box with detailed information about each execution of the SQL query whose ID you clicked.

In the dialog box, you select a row with information of an execution in the table; you then review the query details and the stack trace in the bottom pane.

Element Description
The Summary area has the following elements.
Statement ID The ID of the SQL query.
Total SQL Time, ms The total duration for all executions of the SQL query (in milliseconds).
Executions The total number of SQL query executions.
Total Row Count The total number of records processed in the SQL queries.
The table has the following columns.
Start Time The time that has passed from the start time of the URL request to the start time of the SQL query (in milliseconds).
Params The parameters of the SQL query, if available.
SQL Time, ms The duration of the SQL query (in milliseconds).
Row Count The number of records processed in the SQL query.
URL The URL of the request that executed the SQL query.
Command Target The identifier of the control that executed the SQL query.
Command Name The type of the command that executed the SQL query.
Stack Trace The application stack trace at the moment of the SQL query.

Exceptions Tab

By using the Exceptions tab, you can review the list of exceptions that have occurred during the processing of requests.

Table 13. Table Toolbar

The table toolbar includes standard buttons and buttons that are specific to this table. For the list of standard buttons, see Table Toolbar. The table-specific buttons are listed below.

Button Description
View Exception Details Opens the View Exception Details dialog box with detailed information about the exception that is selected in the table.
Table 14. Table Columns
Column Description
Tenant The tenant to which the user was signed in when the exception occurred.
Exception Type The type of the exception.
Exception Message The text message of the exception.
Count The number of times the exception occurred.
Last Occurred The date and time of the latest occurrence of the exception.
Last Screen The ID of the MYOB Advanced form on which the exception last occurred.
Last Command Target For the latest exception occurrence, the identifier of the control that created the URL request with the exception.
Last Command Name For the latest exception occurrence, the type of the command that created the URL request with the exception.
Last Stack Trace For the latest exception occurrence, the application stack trace at the moment of the URL request with the exception.
Table 15. View Exception Details Dialog Box

When you select a particular exception on the Exceptions tab and then click View Exception Details on the table toolbar, the system opens the View Exception Details dialog box with detailed information about the selected exception.

Element Description
Start Time The date and time when the exception occurred.
Screen The ID of the MYOB Advanced form on which the exception occurred.
URL The URL of the request whose execution caused the exception.
Command Target The identifier of the control that created the URL request with the exception.
Command Name The type of the command that created the URL request with the exception.
Stack Trace The application stack trace at the moment of the URL request with the exception.

Event Log Tab

By using the Event Log tab, you review the list of events that occurred during request processing.

Table 16. Table Toolbar

The table toolbar includes standard buttons and buttons that are specific to this table. For the list of standard buttons, see Table Toolbar. The table-specific buttons are listed below.

Button Description
View Event Details Opens the View Event Details dialog box with detailed information about the event that is selected in the table.
Table 17. Table Columns
Column Description
Start Time The date and time when the event occurred.
Event Type The type of the event.
Username The name of the user who performed the URL request that caused the event.
Tenant The tenant to which the user was signed in when the event occurred.
Source The source of the event.
Screen The ID of the MYOB Advanced form on which the event occurred.
Message The text message of the event.
Stack Trace The application stack trace at the moment of the URL request that caused the event.
URL The URL of the request whose execution caused the event. Click this URL to open the MYOB Advanced form specified in the URL.
Command Target The identifier of the control that created the URL request with the event.
Command Name The type of the command that created the URL request with the event.
Table 18. View Event Details Dialog BoxWhen you select a particular event on the Event Log tab and then click View Event Details on the table toolbar, the system opens the View Event Details dialog box with detailed information about the selected event.
Element Description
Start Time The date and time when the event occurred.
Event Type The type of the event.
Event Details The event details in JSON format.
Stack Trace The application stack trace at the moment of the URL request that caused the event.