Profiling code execution

- [Instructor] So far, we've used external tools…and internal code changes to get a glimpse…into the performance of our application's code execution.…There's another technique…that's already built into node, profiling.…Software profiling is a form of dynamic program analysis,…which means that the program is actually running…when the analysis is performed.…Profiling can answer questions like the number of times…each method is called and how long the methods take.…Often, these include resource usage…such as the amount of memory or CPU that's used.…

Node has a built-in profiler which in turn…uses the V8's profiler.…Node's profiler records important events…such as just-in-time compiles and regular samples.…The record of these events in samples…is saved to a log file.…On their own, these profiler logs aren't very useful.…The information is better read with a tool…that aggregates events and produces reports.…Fortunately, Node also includes a V8 profiler processor…that we're going to use.…Some IDEs include built-in profiler and profiler processors,…

Resume Transcript Auto-Scroll

Author

Released

7/13/2018

Node.js apps are known for their blazing-fast speed, but hard-to-find bugs and suboptimal processes can drag performance down. Isolating the problem in the stack can often grind productivity to a halt. In this course, Node.js developer Jon Peck shows how to debug and speed up your site as he walks through how to fix a complete—but flawed—rock-paper-scissors game. Jon shows how to log problems, debug issues, measure performance, implement caching, and continuously optimize your application for performance.