Skip to content

H4ad/nodejs-trace-http-performance-analysis

Repository files navigation

isTraceHTTPEnable Performance Analysis

This repo can be used to inspect and see the performance of isTraceHTTPEnabled.

How to Use

First, install the dependencies:

npm i

This will install light-my-request that is used to emulate HTTP behavior without needing to create a HTTP Server.

Then, get the CPU profile:

npm run prof

This will generate a file like CPU.[Number]... ending with .cpuprofile.

Cached Profiles

I already run some profiles, you can see below:

How to Visualize?

To visualize the isTraceHTTPEnabled, you need to open that profile with VSCode because they have support to visualize CPU Profiles in a way that shows the amount of time spent in each function.

If you don't have VSCode and don't want to install, you can use speedscope. Just import the CPU Profile and go to the tab Sandwich and import

Below, the example images of each profile.

NodeJS 16.x

Above, we can't find isTraceHTTPEnabled, probably it was introduced after 16.x.

NodeJS 16.x

NodeJS 18.x

NodeJS 18.x

NodeJS 20.x

NodeJS 20.x

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published