
BBj Function Debugging
Description
BBj 15.0 and higher includes low-level function debugging tools that can be enabled with a BBj.properties setting. This feature imposes a very small, but non-zero cost; it should only be enabled for limited periods to gather information about function usage. .
Usage
To enable this feature, add the following setting to BBj.properties, then restart BBjServices:
com.basis.bbj.funcs.debug=true
API
When this feature is enabled, all function usage (counts and timings, measured in nanoseconds) are tracked system-wide (globally for BBjServices). Values can be accessed with the following static variable and methods, all in com.basis.bbj.funcs.FunctionMgr:
Returns | Static variable or method | Returns |
boolean | FunctionMgr.DEBUG | A boolean value indicating whether function usage is currently being tracked. |
HashMap<String,Long> | FunctionMgr.getDebugCounts() | A map keyed by function name, containing all functions used during this BBjServices run (or since resetDebug() was called). This returns counts of the number of times each function was called. |
HashMap<String,Long> | FunctionMgr.getDebugNanoTimes() | A map keyed by function name, containing all functions used during this BBjServices run (or since resetDebug() was called). This returns total execution time for each function, measured in nanoseconds. |
void | FunctionMgr.resetDebug() | This method clears all logged function information from the maps described above. |
Example
rem ' BBj Function Debugging |
Sample Run
com.basis.bbj.funcs.debug=true |