Changes

Jump to navigation Jump to search
1,291 bytes added ,  17:41, 17 December 2018
no edit summary
| '''Summary'''
|Similar to {{Code|fn:trace($expr, $msg)}}, but instead of a user-defined message, it emits the compile-time type and estimated result size of its argument.
|}
 
==prof:gc==
 
{{Mark|Introduced with Version 9.2.}}
 
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|prof:gc||empty-sequence()}}<br/>{{Func|prof:gc|$count as xs:integer|empty-sequence()}}
|-
| '''Summary'''
|Enforces Java garbage collection. If no {{Code|$count}} is supplied, garbage will be collected once. Please note that this function should only be used for debugging purposes; in productive code, it is best to trust the garbage collecting strategies of Java.
|}
 
==prof:runtime==
 
{{Mark|Introduced with Version 9.2.}}
 
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|prof:runtime||map(*)}}
|-
| '''Summary'''
|Returns a map with environment properties of the current Java runtime:
* `max`: Maximum memory that the Java virtual machine will attempt to use.
* `total`: Total memory in the Java virtual machine (varies over time).
* `used`: Currently used memory (varies over time, will shrink after garbage collection).
* `processors`: number of processors available to the Java virtual machine.
|-
| '''Examples'''
|
* {{Code|prof:gc(3), prof:human(prof:runtime()?used}} performs some garbage collection and returns the currently used amount of memory in a user-friendly format.
|}
=Changelog=
 
;Version 9.1
 
* Added: [[#prof:gc|prof:gc]], [[#prof:runtime|prof:runtime]]
;Version 9.0
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu