wilton.js  v202103141
 All Namespaces Functions
Functions
service Namespace Reference

wilton/service
Serviceability functions. More...

Functions

String getAllCalls (Function|Undefined callback)
 Returns string with all function calls on current moment.
String getCurrentCallStack (Function|Undefined callback)
 Returns string with current callstack.
Number getMemorySize (Function|Undefined callback)
 Get memorySize of current process in bytes.
Number getPid (Function|Undefined callback)
 Get pid of current process.
Number getThreadsCount (Function|Undefined callback)
 Returns quantity of threads in current process.
Boolean isTraceOn (Function|Undefined callback)
 Check if trace is recording.
Undefined traceTurnOff (Function|Undefined callback)
 Turn off trace recording.

Detailed Description

Usage example:

// get pid of current process
var pid = getPid();
// get memorySize of current process in bytes
var memory = getMemorySize();

Function Documentation

String service::getAllCalls ( Function|Undefined  callback)
Parameters
callbackFunction|Undefined callback to receive result or error
Returns
String with all function calls
String service::getCurrentCallStack ( Function|Undefined  callback)
Parameters
callbackFunction|Undefined callback to receive result or error
Returns
String with current callstack
Number service::getMemorySize ( Function|Undefined  callback)
Parameters
callbackFunction|Undefined callback to receive result or error
Returns
Number memorySize of current process
Number service::getPid ( Function|Undefined  callback)
Parameters
callbackFunction|Undefined callback to receive result or error
Returns
Number pid of current process or 0, if can't get pid
Number service::getThreadsCount ( Function|Undefined  callback)
Parameters
callbackFunction|Undefined callback to receive result or error
Returns
Number qty of threads
Boolean service::isTraceOn ( Function|Undefined  callback)
Parameters
callbackFunction|Undefined callback to receive result or error
Returns
Boolean true if trace recording is on, false otherwise
Undefined service::traceTurnOff ( Function|Undefined  callback)

Turn on trace recording.

Parameters
callbackFunction|Undefined callback to receive result or error
Returns
Undefined