Flame graph exercise
npm install in here
app.js before trying the task
Open app.js and modify
It will affect how hard it is to find the function you're looking for.
|a month old baby would spot it||100|
|please try normal first ;)||1|
Run the app through perf. Make the following request:
Or just open it in the browser.
Generate a flame graph, identify the function in your code that performs the long synchronous computation.
Now for something more realistic.
Start the app, open http://localhost:8080/ to simulate traffic (it repeatedly makes requests to /api/tick), run a short perf on the running process and generate a flame graph. See if you would identify the function under real traffic. Try with shorter sleep and lower profiling frequency too.