Profiling XQuery Documents

 

XQuery profiling is available only in Stylus Studio XML Enterprise Suite.

In addition to debugging tools for XQuery, Stylus Studio provides the XQuery Profiler, a tool that helps you evaluate the efficiency of your XQuery. By default, the performance metrics gathered by the XQuery Profiler are displayed in a preformatted report, like the one shown here:

Figure 337. XQuery Profiler Report

The report format is controlled by the default XSLT stylesheet, profile.xsl, in the \Stylus Studio\bin directory. You can customize this stylesheet as required. You can save XQuery Profiler reports as HTML.

Note

 

XQuery and XSLT Profiler reports use the same XSLT stylesheet.

In addition to generating the standard XQuery Profiler report, you can save the raw data generated by the Profiler and use this data to create your own reports. See Enabling the Profiler for more information about this procedure.

 

Watch it! You can view a video demonstration of this feature by clicking the television icon or by clicking this link: watch the XQuery Profiling video.

A complete list of the videos demonstrating Stylus Studio's features is here: http://www.stylusstudio.com/xml_videos.html.

About Performance Metrics

The XQuery Profiler can record three different levels of performance metrics:

  • A call tree of execution times
  • Execution times by XQuery expression, and
  • A detailed log of step-by-step expression execution
    Note

     

    Displaying the report for a step-by-step log can take significantly longer than evaluating the XQuery itself. Consider using the Profiler with the first two performance metric options. You can also use the Limit Trace To fields to further restrict the Profiler's scope. If you find you need still more detail (while troubleshooting a performance bottleneck, for example), use the step-by-step setting.

Enabling the Profiler

The XQuery Profiler is off by default. You enable the Profiler on the Profiling Options tab of the XQuery Scenario Properties dialog box.

To enable the XQuery Profiler:
1. Open the Scenario Properties dialog box for the XQuery document. (Click Browse at the top of the XQuery editor window.)
2. Click the Profiling Options tab.

Figure 338. XQuery Profiler Options
3. Select the settings for the performance metrics you want the Profiler to capture.
4. Optionally, save the raw Profiler data to a separate file.
Note

 

This option is available only after you select one or more performance metrics settings.

5. Click OK.

The next time you preview the XQuery results, the performance metrics you selected are available to you in the XQuery Profiler report (and as raw data if you selected that setting and specified a file).

Displaying the XQuery Profiler Report

To display the XQuery Profiler report:
1. Ensure that the Profiler is enabled. (See Enabling the Profiler if you need help with this step.)
2. Click the Preview Result button ( ).
3. Click the Show Profiling Report button ( ).

The XQuery Profiler report appears in the Preview window.

XML Editor

Stylus Studio XML editor includes many XML editing utilities and features to simplify XML development, including intuitive XML editing views, integrated XML validation and troubleshooting utilities, XML formatting tools, XML generation tools, etc.

DOM - The Document Object Model

The Document Object Model (DOM) is a cross-platform interface for parsing and manipulating XML. Learn how Stylus Studio supports DOM in our XML Pipeline and other XML parsing tools.

Technology Companies That Use Stylus Studio

Technology companies can't always handle every technology that they come across. That's why when it comes to XML, they look to Stylus Studio to guide them. Check out which top technology companies are looking to the future with Stylus Studio.

Create XML Views of Relational Data Using DataDirect XQuery

DataDirect XQuery simplifies creating, querying and updating of relational databases as XML including Microsoft SQL Server, Oracle, IBM DB2, Sybase and Informix.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member