Skip to content
This repository was archived by the owner on Feb 11, 2025. It is now read-only.

nearform/slow-rest-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7b48d36 · Jan 6, 2025

History

35 Commits
Jan 25, 2018
Jan 19, 2018
Jan 6, 2025
Feb 18, 2020
Jan 19, 2018
Oct 11, 2016
Feb 18, 2020
Jan 19, 2018
Jan 21, 2022
Nov 12, 2022
Sep 20, 2022

Repository files navigation

slow-rest-api

A REST API that is slow.

Part of the The Node.js Performance Workshop.

Steps

  1. clone this repository
  2. npm install
  3. node index
  4. In another terminal: npm test

Running Clinic Doctor

  1. Install clinic with npm install clinic -g
  2. Run clinic doctor -- node index
  3. What is the problem?

A sample doctor output is included in doctor.html.

Generating a flamegraph

  1. Make sure you are on Linux or Mac OS X, and you have superuser permissions
  2. Install clinic with npm install clinic -g
  3. clinic flame -- node index
  4. In another terminal, as soon as possible: npm test
  5. CTRL-C the clinic process.

A sample flamegraph is included in flamegraph.html.

License

MIT

banner