parikshan
• parikshan: Object
▸ (fn
, loc?
): (...args
: any
[]) => any
Wraps input function with performance measurement. If the wrapped function returns a promise, a finally handler will be attached to the promise and the duration will be reported once the finally handler is invoked
Name | Type | Description |
---|---|---|
fn |
AnyFunction |
input function |
loc? |
SourceLocation |
location of function in original source code |
fn
function wrapped with performance hooks
▸ (...args
): any
Name | Type |
---|---|
...args |
any [] |
any
Name | Type |
---|---|
usesThisOrNative |
(fn : AnyFunction ) => boolean |
▸ Const
initMongoPerfSubscriber(dbDetails
): Promise
<void
>
Connects to db and and saves performance measurements in time series collection, if collection doesn't exist then a new time series collection with given name will be created
Name | Type | Description |
---|---|---|
dbDetails |
MongoDbDetails |
mongo db and collection details |
Promise
<void
>