Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
.gitignore
README.md
keep-alive-off.js
keep-alive-on.js
package.json
yarn.lock

README.md

node-keep-alive-benchmark

This repository contains benchmarks to compare the performance of outbound HTTP requests with non-reused connections (Node's default behavior) versus reusing connections with HTTP Keep-Alive.

Install Depedencies

yarn

Run Benchmarks

First set the TARGET, COUNT, and COUNCURRENCY variables in keep-alive-off.js and keep-alive-on.js.

Then, run the benchmarks.

node keep-alive-off.js
node keep-alive-on.js

Generating a Flamegraph

To profile CPU utilization and generate a flamegraph (introduction to flamegraphs), first generate a v8.log, then run it through the flamebearer tool.

Install flamebearer

yarn global add flamebearer

Generate a v8.log

node --prof --trace-ic --track_gc_object_stats --trace_gc_verbose --log_timer_events keep-alive-off.js

Generate a flamegraph

node --prof-process --preprocess -j isolate*.log | flamebearer
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.