Node js Application Performance Metrics
Posted By : Sakshi Gadia | 19-Mar-2018
Node js Application metrics ('appmetrics-dash') provide you to display data and visualize the performance of your Node.js application
- It is a web based dashboard of your running Node Application.
- Path defaults to
/appmetrics-dash
Installation
It can be accessed by:
const dash = require('appmetrics-dash');
const dash = require('appmetrics-dash');
dash.attach();
If you are not creating an HTTP server then use:
const dash = require('appmetrics-dash');
dash.monitor();
The above code will create a new HTTP server running on port 3001. Accesed by http://localhost:3001/appmetrics-dash.
If you want to add the dashboard to one specific HTTP server then use:
const dash = require('appmetrics-dash');
dash.monitor({server: myHttpServer});
Understanding the data metrics:
- CPU Profiling
- HTTP Incoming Requests
- HTTP Throughput
- Average Reponse Times (top 5)
- CPU
- Memory
- Heap
- Event Loop Times
- Environment
- Other Requests
- HTTP Outbound Requests
CPU and Memory graphs show system and process usage over time. HTTP Incoming Requests, HTTP Outgoing Requests and Other Requests show event duration against time. HTTP Throughput shows requests per second . Heap shows the maximum heap size and used heap size over time.
‘Other Requests’ chart shows database request duration for supported databases (MongoDB, MySQL, Postgres, LevelDB and Redis), as well as Socket.IO and Riak events, which could help you further identify where time is being spent in your application.
By clicking enable button we can generate a Node report or a Heap snapsort from the dashboard.
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
Sakshi Gadia
An experienced MEAN Stack developer having good knowledge in Nodejs, MongoDb. Apart from these in my spare time, I enjoy playing chess and ready to learn new technologies.