prof:value( $expr as xs:string, [$map as map:map?], [$context as item()?] ) as item()*
Evaluate an expression in the context of the current evaluating
statement and return the profiling report for its evaluation.
This differs from prof:eval
in that prof:value
preserves all of the context from the calling query, so you do not
need to re-define namespaces, variables, and so on. Although the expression
retains the context from the calling query, it is evaluated in its own
transaction.
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.
http://marklogic.com/xdmp/privileges/xdmp-value
and either
http://marklogic.com/xdmp/privileges/profile-my-requests
or
http://marklogic.com/xdmp/privileges/profile-any-requests
You can only evaluate and profile expressions with
prof:value
; no
prolog definitions (namespace declarations, function definitions,
module imports, and so on) are allowed.
prof:value("xdmp:random()") => (<prof:report>...</prof:report>,9478952250821284456)
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.