This content originally appeared on DEV Community and was authored by Gajanan Patil
Word "parikshan" is originated from Sanskrit language meaning "examine"
Overview of My Submission
- Compiles code and wraps function calls in source with Performance hooks.
- Reports
duration
along with details likearguments
,calledAt
,returnedAt
,functionName
andlocation
in source code (optional). In case the function returns a promise then finally handler will be attached to the promise and is reported once the finally handler is invoked. - A PerformanceObserver stores the performance entries generated by
parikshan
in time series collection. - Use this project's MongoDB Charts dashboard file when creating a new dashboard by importing it and connect it to collection created by parikshan.
- You can check dashboard for analysis done on botbuilder example repository here.
- Check project's README for usage, docs and more information.
Submission Category:
Prime Time
Link to Code
⏰ Parikshan
Compiler to measure the running time of javascript functions.
Installation • Usage • Using with MongoDB • FAQs
Converts
// index.js
greet('John')
To
// output/index.js
const {parikshan} = require("parikshan/build/src/parikshan");
parikshan(greet)('John');
// if compiled with -s flag then compiles to
parikshan(
greet,
{"start":{"line":1,"column":0},"end":{"line":1,"column":13},"filename":"index.js"}
)('John')
Installation
To install this package run:
npm i parikshan -D
or with yarn run:
yarn add parikshan -D
Usage
CLI Usage
parikshan <files..>
Compiles code to performance.measure the functions
Positional Arguments:
files One or more files or glob patterns to compile
Options:
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
-o, --output-dir Output
…Additional Resources / Info
Dashboard for analysis done on botbuilder example
This content originally appeared on DEV Community and was authored by Gajanan Patil
Gajanan Patil | Sciencx (2022-01-13T14:21:10+00:00) ⏰ Parikshan – Compiler to measure the running time of javascript functions. Retrieved from https://www.scien.cx/2022/01/13/%e2%8f%b0-parikshan-compiler-to-measure-the-running-time-of-javascript-functions/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.