1.6 KiB
1.6 KiB
Home > @apextoaster/js-utils > AsyncTracker
AsyncTracker class
Async resource tracker using node's internal hooks.
This probably won't work in a browser. It does not hold references to the resource, to avoid leaks. Adapted from https://gist.github.com/boneskull/7fe75b63d613fa940db7ec990a5f5843#file-async-dump-js
Signature:
export declare class AsyncTracker
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)() | Constructs a new instance of the AsyncTracker class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
filter | Optional<StackFilter> |
||
size | number |
Methods
Method | Modifiers | Description |
---|---|---|
clear() | ||
disable() | ||
dump() | Print a listing of all tracked resources. When debug mode is enabled (DEBUG=TRUE), include stack traces. | |
enable() | ||
getStack() | Get a filtered version of the current call stack. This creates a new error to generate the stack trace and will be quite slow. |