Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Node.js High Performance

You're reading from   Node.js High Performance Take your application to the next level of high performance using the extensive capabilities of Node.js

Arrow left icon
Product type Paperback
Published in Aug 2015
Publisher
ISBN-13 9781785286148
Length 136 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Diogo Resende Diogo Resende
Author Profile Icon Diogo Resende
Diogo Resende
Arrow right icon
View More author details
Toc

Chapter 4. CPU Profiling

Profiling is boring, but it's a good form of software analysis where you measure resource usage. This usage is measured over time and sometimes under specific workloads. Resources can mean anything the application is using, be it memory, disk, network, or processor. More specifically, CPU profiling allows you to analyze how and how much your functions use the processor. You can also analyze the opposite—the non-usage of the processor, or the idle time.

Node.js is not primarily meant for continuous CPU-intensive tasks, and sometimes, for profiling, it is important to identify the methods of the intensive task that are holding to the processor and keeping other tasks from performing better. You may find huge call stacks continuously occupying the processor or repetitive and recursive tasks not ending as you expected. There are several techniques, such as splitting and scheduling tasks instead of continuously running them as they block the event...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image