decorative-profiler
Summary
A method, function and block profiler that supports typescript decorators!
how to use
SCROLL DOWN FOR JAVASCRIPT
also, all parameter combinations and thinkable types are supported even if not used for the below showcases.
using typescript annotations you can do:
abc.myMethodabc.myMethod // you can also clear measurementsclear
and to print all or a specific summary:
console.logsummary console.logsingleSummary
for javascript you can use the function factory:
const myMethod =
and to print all or a specific summary:
let summary = console let singleSummary = console
example output of the summary and single summary respectively:
|myMethod2222222222222222222| callCount=4 | totalRunTime=3.472292 | averageRunTime=0.868073 |
|Summary | | | ||myMethod | callCount=8 | totalRunTime=0.187811 | averageRunTime=0.023476375 ||myMethod2222222222222222222| callCount=4 | totalRunTime=3.472292 | averageRunTime=0.868073 || | callCount=12 | sumTotalRunTime=3.660103 | |