CSIDE's "Profiler Data" View
Once CSIDE has completed capturing profile, data Eclipse shows the "Profiler Data" view.
To open this view manually, in Eclipse click Window → Show View → Other.... This view provides three sub-views on tabs:
- Function Summary Table tab: Shows statistics about the function / builtin call types recorded by the profiler.
- Flame Chart tab: Shows the individual function / builtin calls captured over time.
- Graph tab: Shows the call relationship for the function / builtin calls made while the profiler was running.
Click an entry in the Function Summary Table or Flame Chart to select that function, which in turn changes the display of data in the flame chart and graph views (more on this in the respective sections below).
Toolbar Options
The following toolbar options are available for all three view types:
The Open Profiler File... button ( ) opens a file dialog which allows you to locate and open a CSV file stored on the workstation. By default, CSV files are split up by request (You can change this behavior by setting the Split collected profile data by request preference).
The Show Profiler File in System Explorer button ( ) shows the currently viewed profile file within the operating system's directory structure. If no data is currently available this option is disabled.
The Show Profiling Captures... button ( ) allows you to open previously captured / loaded profile data that is still in memory.
This dialog allows you to select a request to display in the view. A check mark icon () indicates the currently displayed request. A file icon () indicates the CSV file. The requests contained in the CSV file appear below the CSV file name. If the Split collected profile data by request preference was disabled when the CSV file was loaded, or if the CSV file only contains one request, the CSV file entry represents both the file and the contained request.
By default, CSIDE keeps the last 30 profile files in memory. When a profile file is removed from memory, either by the user or the limit mentioned here, the file remains on disk. Options to change these behaviors also exist in this dialog. These options are also available on the profiler preferences page.
Alternately, you can navigate through the various data files and requests on the drop-down menu next to the contextual menu button:
The Function Summary Table View
The Function Summary Table tab allows you to view statistics on each function / builtin recorded. Each row contains data on a unique function / builtin. For example, all calls to DAPI::GetNodeByID
will be collected into the same row.
The columns available for display include:
- Function / Builtin Name which is case insensitive, as OScript is case-insensitive
- Invocation Count, which is the number of times this function was seen by the profiler
- Total time in function, which includes time spent in child calls
- Total time in function (minus callouts), which does not include time spent in child calls
- Average time in function, which includes time spent in child calls
- Average time in function (minus callouts), which does not include time spent in child calls
- Maximum time in function, which includes time spent in child calls
- Maximum time in function (minus callouts), which does not include time spent in child calls
- Minimum time in function, which includes time spent in child calls
- Minimum time in function (minus callouts), which does not include time spent in child calls
- Standard deviation for function, which includes time spent in child calls
- Standard deviation for function (minus callouts), which does not include time spent in child calls
All times for metrics are in microseconds. The default selections are Function Name, Invocation Count, Total time in function, Total time in function (minus callouts), Average time in function, and Standard deviation for function (minus callouts). If an entry in the Function name column includes a icon, that row represents a function. Rows without this icon are bultins. Non-name columns include a blue bar in their background that shows the row value relative the maximum value for that column
To change or reorder the columns displayed, click the Show / hide columns... button ( ). The following dialog opens.
In addition to selecting which columns are displayed, you can filter out rows by selecting the Filter rows ... button . The following dialog opens.
To filter out rows based on that row's column, the column must be selected for display in the table, the check box on the left side of the column must be selected in this dialog, and the filter value must contain a valid value. Most filterable columns are metric-based, and so the filter value is simply an integer range. Valid values are from 0 to 2,147,483,647. However, there are two non-metric columns that can be filtered on:
- Call types to include: Provides the option to include or exclude rows based on their type (function or builtin).
- Function / Builtin Name: Allows you to filter out rows by name. By default, wild cards (* = match anything, ? = match single character) are supported. If you'd rather use regex to filter, there's a check box that allows for this option.
Applied filter criterion are displayed in a list at the top of the table, along with an Edit... button. The edit option does the same thing as the button.
To sort a column, click the column header. To sort the same column in reverse order, click the column header again. To rest and optimize the column width, click the Reset column widths button .
The Flame Chart View
The Flame Chart tab displays individual requests over time (x-axis) and stack depth (y-axis).
Things to note about the Flame Chart:
- On the initial display, the entire profiled request is shown. To zoom in, drag the slider in the lower-right corner. The maximum zoom rate is 10 pixels = one microsecond.
- If the chart is zoomed in or out you can navigate through the function using the scroll bar on the bottom of the chart.
- Where space permits, the name of the function (or part of the function name) is drawn within the request.
- The shade / colour of the function represents the amount of time spent in the call, minus the amount of time spent in child functions.
- Light yellow = the least amount of time spent
- dark red = the most amount of time spent
- When you click a function entry, the function is selected. If a function entry is selected in the Function Summary Table that function is selected when you open the Flame Chart view.
- If a function is selected, all displays of that function are light blue.
- Hover over a function to display detailed metrics about that call in the lower-left area of the view.
- Grey vertical lines are drawn on the millisecond.
One pattern of interest that this chart demonstrates is the likely iteration over a data structure, which appears as a 'picket fence' in the graph:
In the example above, you can see the function called HasBusinessAdminPrivilege in turn calls GetPrivileges, which in turn iterates over a list of 50 objects. When this sort of pattern is seen it is possible, though not guaranteed, that more direct access to the data structure would reduce execution time.
The Graph View
The Graph tab shows the call relationships between the functions seen by the profiler. This view is largely the same as KCacheGrind's "call graph" view.
The rendering of this image is done using an open source application called 'dot', from the Graphviz project. OpenText does not distribute this application with CSIDE. To make use of this view, download the dot binary and point CSIDE to this by setting the [optional] location of the 'dot' executable profiler preference.
Things to note about the Graph tab:
- The graph view is a rendered image, therefore displayed functions cannot be selected. However, if you select a function in either the Function Summary Table or the Flame Chart, that function will be painted in the same light blue colour used in the other views.
- Non-selected functions are painted with a shade that represents the amount of time spent in the call minus the time spent in child functions. Similar to th Flame Chart, light yellow represents the least time spent in the call and dark red represents the most amount of time spent in the call.
- On the initial display, the entire profiled request is shown. To zoom in, drag the slider in the lower-right corner or scroll your mouse wheel.
- You can navigate in zoomed-in graph by using the scroll bars on the bottom and right of the graph or by clicking and dragging the image with your mouse.
- In addition to the truncated name, the following statistics are displayed for functions:
- Number of calls ( # )
- Total time spent in function minus calls to child functions ( Σ )
- Average time spent in function minus calls to child functions ( μ )
- Standard deviation of average time spent in function minus calls to child functions ( σ )
- Directional lines show calls from parent functions to child functions. These lines contain information on the number of child calls made ( # ) and the total time spent in all child calls from all parent calls ( Σ ).
- The three options at the bottom of the view can assist in limiting the number of functions drawn. This is helpful because graphs with many functions are difficult to interpret and can take a long time to render.
- Enable Focus on selected function to limit the objects being rendered to the selected function plus any other functions allowed by the Distance min metric (see below). If Focus on selected function is not enabled the "Distance min" metric is ignored.
- Enter a value in the Duration min: field to exclude any functions with a total time (in microseconds) that is less than the specified value (default value = 1500).
- If a function has been selected in one of the other views, the Distance min: field will exclude any functions that are further away from the selected function where distance is the number of calls. The default value for this is three.
- To generate a new graph image after modifying any of the limiting fields, click the Render button in the lower-right corner.
- To stop the rendering activity while it is underway, click the Cancel button in the lower-right corner.