This chapter has mostly focused on CPU performance, but memory leaks can also be bad for overall performance or even cause downtime.
In this final recipe, we'll look at memory profiling and fixing a memory leak.
This chapter has mostly focused on CPU performance, but memory leaks can also be bad for overall performance or even cause downtime.
In this final recipe, we'll look at memory profiling and fixing a memory leak.
We'll be using Chrome Devtools in this recipe, so if we don't have Google Chrome Browser installed, we'll need to download and install the relevant binaries for our operating system (head to https://www.google.com/chrome to get started).
If we haven't already installed autocannon we'll be using it in this recipe:
$ npm install -g autocannon
We're going to profile a server that gives us a unique, Star Wars inspired name.
Let's create a folder...