prof:disable( $request-id as xs:unsignedLong ) as empty-sequence()
Disable profiling for this request. Profiling may be enabled or disabled as often as you like. Disabling does not clear accumulated profiling statistics. Disabling while disabled has no effect. If profiling is not allowed for the App Server, this function does nothing.
For details on profiling requests and interpreting the output of a profile request, see Profiling Requests to Evaluate Performance in the Query Performance and Tuning Guide.
Parameters | |
---|---|
request-id |
A request ID. Use the xdmp:request() function, which
returns the request ID for the currently running request, to specify
the current request.
|
Either
http://marklogic.com/xdmp/privileges/profile-my-requests
or
http://marklogic.com/xdmp/privileges/profile-any-requests
is required for profiling requests other than the current request, with
the profile-my-requests
privilege allowing profiling of
requests issued by the same user ID, and the
profile-any-requests
privilege allowing profiling of requests
issued by any user ID. No privilege is required to profile the currently
running request (that is, self-profiling is always allowed).
Any expressions evaluated after prof:disable
is called
(but before prof:enable
is called again) will
not be profiled and will not appear in the profile report.
prof:disable(xdmp:request()) => ()
prof:enable(xdmp:request()), fn:concat("hello", " world"), prof:disable(xdmp:request()), fn:current-dateTime(), prof:report(xdmp:request()) => A profile report that does not include the call to fn:current-dateTime().