Changes

Jump to navigation Jump to search
83 bytes added ,  13:47, 23 March 2018
|-
| width='120' | '''Signatures'''
|{{Func|prof:track|$expr expression as item()|item()*}}<br/>{{Func|prof:track|$expr expression as item(), $options as map(*)?|item()*}}
|-
| '''Summary'''
* {{Code|value}}: Include value in result (default: true).
Helpful notes:
* If you are not interested in some of the returned results, you should disable them to save time and memory.
* Profiling might change the execution behavior of your code: An expression that might be executed iteratively will be cached by the profiling function.
* If a value has a compact internal representation, memory consumption will be very low, even if the serialized result may consume much more memory.
* In Java, Please note that memory profiling can is only be approximative: To improve the measurement, and if so it can be quite misleading. If the memory option is enabled, main-memory will be garbage-collected before and after evaluation. If you are not interested in to improve the quality of the memory consumption, it is advisable to disable this optionmeasurement.
|-
| '''Properties'''
=> prof:human()
</pre>
* The function call <code>prof:track((1 to 1000000)[. mod 2 = 0], map { 'time': false() })</code> will return something similar to:
<pre class="brush:xquery">
map {
"memory": 41548400, "time": 34.9921548400,
"value": (2, 4, 6, 8, 10, ...)
}
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu