Changes

Jump to navigation Jump to search
1 byte added ,  16:06, 9 March 2023
no edit summary
| width='120' | '''Signature'''
|<pre>prof:track(
$expression input as item()*, $options as map(*)? := ()
) as item()*</pre>
|- valign="top"
| '''Summary'''
|Measures the execution time and memory consumption required for evaluating the specified {{Code|$expressioninput}} and returns a map with the results. The following {{Code|$options}} are available:
* {{Code|time}}: Include execution time in result as {{Code|xs:decimal}} (unit: milliseconds; default: true).
* {{Code|memory}}: Include memory consumption in result as {{Code|xs:integer}} (unit: bytes; default: false).
| width='120' | '''Signature'''
|<pre>prof:time(
$expr input as item(),
$label as xs:string := ()
) as item()*</pre>
|- valign="top"
| '''Summary'''
|Measures the time needed to evaluate {{Code|$exprinput}} and outputs a string to standard error or, if the GUI is used, to the Info View. An optional {{Code|$label}} may be specified to tag the profiling result. See {{Function||prof:track}} for further notes.
|- valign="top"
| '''Properties'''
| width='120' | '''Signature'''
|<pre>prof:memory(
$expr input as item(),
$label as xs:string := ()
) as item()*</pre>
|- valign="top"
| '''Summary'''
|Measures the memory allocated by evaluating {{Code|$exprinput}} and outputs a string to standard error or, if the GUI is used, to the Info View. An optional {{Code|$label}} may be specified to tag the profiling result. See {{Function||prof:track}} for further notes.
|- valign="top"
| '''Properties'''
| width='120' | '''Signature'''
|<pre>prof:dump(
$expr input as item()*,
$label as xs:string := ()
) as empty-sequence()</pre>
|- valign="top"
| '''Summary'''
|Dumps a serialized representation of {{Code|$exprinput}} to {{Code|STDERR}}, optionally prefixed with {{Code|$label}}, and returns an empty sequence. If the GUI is used, the dumped result is shown in the [[Graphical User Interface#Visualizations|Info View]].
|- valign="top"
| '''Properties'''
| width='120' | '''Signature'''
|<pre>prof:runtime(
$name of option as xs:string as
) as xs:integer</pre>
|- valign="top"
| '''Summary'''
|Returns the value of the specified runtime {{Code|$option}}. The following options existare available:
* {{Code|max}}: Maximum memory that the Java virtual machine will attempt to use.
* {{Code|total}}: Total memory in the Java virtual machine (varies over time).
| width='120' | '''Signature'''
|<pre>prof:void(
$value input as item()*
) as empty-sequence()</pre>
|- valign="top"
| '''Summary'''
|Swallows all items of the specified {{Code|$valueinput}} and returns an empty sequence. This function is helpful if some code needs to be evaluated and if the resulting value is irrelevant.
|- valign="top"
| '''Properties'''
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu