MiniProfiler is a simple profiler tool integrated into LabKey Server and is available on servers running in dev mode or for platform developers in production mode. The MiniProfiler tracks the duration of requests and any queries executed during the request. The LabKey MiniProfiler is a port of the MiniProfiler
Configure the Profiler
To enable or disable the mini-profiler:
- Select (Admin) > Site > Admin Console.
- Click Admin Console Links.
- Under Configuration, click Profiler.
- Check the box for Enabled and configure desired settings.
- Enabled: Check the box to enable the profiler.
- Render Position: Select the corner in which to display it. Default is bottom right.
- Toggle shortcut: Show/hide the MiniProfiler widget using a keyboard shortcut. Enter 'none' to disable toggling. The default is 'alt+p'.
- Start hidden: Check the box if you want the profiler to be hidden until toggled on. Default is that it is shown until toggled off.
- Show controls: Check the box to show the minimize and clear controls in the mini-profiler widget.
- Show trivial timings by default: Check the box to show the timings defined to be trivial by the next setting. Default is not to show trivial timings.
- Trivial milliseconds: Timings that are less than this value are considered trivial and will be greyed out.
- Show children timings by default: Check to display inclusive timings by default.
- Custom timing stacktrace: Check to apture stacktrace when recording custom timings.
Using the Profiler
When enabled, the profiler adds a little widget to one corner of the page. For every page render or AJAX request, a button showing the elapsed time the request took is added to the profiler. Clicking on the time will bring up some summary details about the request.
Duplicate queries will be highlighted.
Clicking on the link in the sql column will bring up the queries page showing each query that was executed, it's duration, and a stacktrace showing where the query originated from.