jstuning

0.0.2 • Public • Published

JS Tuning

Build Status

Inspect your code to track its performance

Are you looking for a tool to track your code performance?

This is the project made for you!

With only 2 line, you can track all main issuer like db or http queries.

How

In first, you should create your handler. The handler is a function that will be invoked when a metric is calculated. For instance we'll use console.log function.

var myhandler = console.log.bind(null, 'Metric:');

You can send this metric to somewhere, where you prefer.

Please note: in the following example, we use the packages of the app beacuse this tool wrap all methods we need.

Mongodb

 
var mongodb = require('mongodb');
 
// pass same instance you use
require('jstuning').mongodb(mongodb, myhandler);
 

Mongoose

 
var mongoose = require('mongoose');
 
// pass same instance you use
require('jstuning').mongoose(mongoose, myhandler);
 

So difficult, right?

Why?

In my experience, nodejs is a great language. My idea starts from a real problem: how my code performs? So I haven't found a tool that permits me to track all elapsed time. This tool aimed to give you a canche to give all elapsed time and send them to some tool like Gathering or StatsD.

This project is free and has a very low integration cost. So, why not?

TODO

I've started but there're lot of things do to. I'd like to integrate major packages.

  • async
  • underscore / lodash
  • Mongodb native driver
  • Mongoose (partially)
  • request
  • connect / expressjs middelware
  • sequelizejs
  • ...

So all your contributes are accepted and welcomed!

I'm started from packages I'm used to.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    6
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    6
  • 0.0.1
    1

Package Sidebar

Install

npm i jstuning

Weekly Downloads

6

Version

0.0.2

License

MIT

Last publish

Collaborators

  • allevo