Changes

Jump to navigation Jump to search
405 bytes added ,  19:10, 7 November 2019
==prof:track==
 
{{Mark|Updated with Version 9.2:}} Decimal timing results; by default no memory profiling.
{| width='100%'
| '''Summary'''
|Measures the execution time and memory consumption required for evaluating the specified {{Code|$expression}} and returns a map with the results. The following {{Code|$options}} are available:
* {{Code|memorytime}}: Include memory consumption execution time in result as {{Code|xs:decimal}} (unit: bytesmilliseconds; default: true).* {{Code|timememory}}: Include execution time memory consumption in result as {{Code|xs:integer}} (unit: millisecondsbytes; default: truefalse).
* {{Code|value}}: Include value in result (default: true).
Helpful notes:
|-
| width='120' | '''Signatures'''
|{{Func|prof:dump|$expr as item()*|empty-sequence()}}<br />{{Func|prof:dump|$expr as item()*, $label as xs:string|empty-sequence()}}<br />
|-
| '''Summary'''
|-
| '''Summary'''
|Prints a list of all current local and global variable assignments to standard error or, if the GUI is used, to the Info View.<br />As every query is optimized before being evaluated, not all of the original variables may be visible in the output. Moreover, many variables of function calls will disappear because functions are inlined. Function inlining can be turned off by setting the [[Options#INLINELIMIT{{Option|INLINELIMIT]] option }} to <code>0</code>.
|-
| '''Properties'''
| '''Examples'''
|
* {{Code|for $x in 1 to 2 return ($x, prof:variables())}} will dump the values of <code>$x</code> to standard error.
|}
* {{Code|used}}: Currently used memory (varies over time, will shrink after garbage collection).
* {{Code|processors}}: number of processors available to the Java virtual machine.
|-
|{{Code|option}}
|The specified option is unknown.
|-
| '''Examples'''
|
* {{Code|prof:human(16384)}} returns {{Code|16K}}.
|}
 
=Errors=
 
{| class="wikitable" width="100%"
! width="110"|Code
|Description
|-
|{{Code|option}}
|The specified option is unknown.
|}
=Changelog=
;Version 9.12
* Added: [[#prof:gc|prof:gc]], [[#prof:runtime|prof:runtime]]
* Updated: [[#prof:track|prof:track]]: decimal timing results; by default no memory profiling
;Version 9.0
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu