Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js Performance Polygon

This is minimalist polygon to lear how to profile Node.js, find memory leaks, high CPU consumption, etc. It has no dependencies - only pure Node.js

It has the following endpoints:

server.js endpoint
'/' "Hello World" stub (nothing dangerous)
'/leak' Simple memory leak
'/block' Block main thread stub

Run server with inspect mode:

node --inspect server.js

Open the chrome dev-tools:

chrome://inspect

There you're getting power!


1. Debug memory leak

Inspect Memory Leak


Fake request sequence

To not make requests manually you can use Apache Bench tool:

ab -k -c 100 -n 20000 http://localhost:7777/

Most usefull:

n - Number of requests
c - (concurrency)  Number of multiple requests to make
k - Keep Alive connection

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages