Loading TOC...

prof functions

The table below lists all the prof built-in functions (in this namespace: http://marklogic.com/xdmp/profile).

Implements a built-in library of functions which allow developers to profile evaluation of XQuery programs. An XQuery program is defined as an XQuery main module, fully expanded with any XQuery library modules needed for its evaluation.

To profile an XQuery program, set the profile allow option to true in the App Server or task server in which the request is serviced. If you request a profile report for an XQuery program whose App Server does not have profiling enabled (and if prof:enable is not called before generating the profile report), then the profile APIs do not profile the request, and the APIs that generate the report return the empty sequence.

The profile functions use the prof: namespace prefix, which is predefined in the server.

10 functions
Function name Description
prof:allowed Returns the value of the Profile Allow setting for the App Server or Task Server upon which the target request is running.
prof:disable Disable profiling for this request.
prof:enable Enable profiling for this request.
prof:eval Evaluate a string as XQuery code for profiling.
prof:invoke Profiles and returns the result of evaluating a module at the given path.
prof:report Return a prof:report node containing the current state of profiling statistics for the given request.
prof:reset Clear any accumulated profiling statistics for the requests.
prof:value Evaluate an expression in the context of the current evaluating statement and return the profiling report for its evaluation.
prof:xslt-eval Evaluate a string as an XSLT stylesheet for profiling.
prof:xslt-invoke Profiles and returns the result of evaluating an XSLT stylesheet at the given path.