Skip to content

vagostep/Node-EventLoop-Visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js EventLoop Visualizer

Demo of the Node-Event-Loop

Try it out! Node-Event-Loop

This Node.js Event Loop Visualizer shows the phases that an Event Loop makes when executing Javascript code in Node.js Runtime. The server captures the traces at runtime and then, it returns them to the visualizer.

What's new?

  • Added feature to support actual Node.js Event Loop & processTicksAndRejections traces
  • Added better visualization of Node.js' Event Loop phases
  • Added a visualizer of the processTicksAndRejections loop
  • Added a "terminal" to print logs with an Ubuntu skin
  • New examples and descriptions
  • Toggle color mode
  • Performance metrics from libuv

Dependencies

  • The repo for the Node.js modified source code is here

How to set up node?

You need to compile the Node.js modified project. Then you need to copy the file from /out/Release/node to server/node/node

How to run it?

Client

cd client
npm install
npm run dev

Server

cd server
npm install
npm run start

Supported Features

  • Promise.resolve().then()
  • Promise.reject().catch()
  • new Promise((resolve) => resolve()).then
  • process.nextTick()
  • queueMicrotask()
  • setTimeout()
  • setInterval() (You need to add a clearInterval() at some point to stop the execution)
  • fs.readFile()
  • setImmediate()
  • async/await
  • http.createServer
  • http.request
  • net.createServer
  • net.createConnection

Important info about supported features

Some features (Ex. http.createServer) are just proxies to the original function. The reason is to control what operations are allowed to do, and prevent malicious attacks. Most of this proxies only receive a callback function as argument.

Issues

If you find any issue, please open a new issue

Feature Requests

If you want to test some functionality that is not supported yet, please open a ticket request.

Acknowledgments

This repo is an improvement of the wonderful work made by

PhakornKiong
PhakornKiong
Hopding
Hopding
latentflip
latentflip
thedull
thedull

About

Node.js Event Loop Visualizer

Resources

Stars

Watchers

Forks