liveBook · Manning

Profiler

As explained in The Art of Code

A performance profiler measures and attributes software execution time or resource consumption to program operations.

A profiler observes software while it runs and attributes CPU behavior, memory allocation, or other resource consumption to program operations. It supports targeted investigations into efficient code, small memory footprints, energy use, and environmental impact. section 8.5.2

Choose a profiler suited to the language and investigation:

  • Java: VisualVM, JDK Flight Recorder with Mission Control, or Async-Profiler. section 8.5.2
  • Python: py-spy samples live processes without code changes; .NET, C#, and C++ developers can use Visual Studio or PerfView. section 8.5.2
  • Go, Rust, and Node.js: use pprof, cargo-flamegraph, or Clinic.js respectively. section 8.5.2

Profilers can add overhead, require manual setup, and produce substantial diagnostic data. Use them for focused investigations rather than continuous daily measurement. section 8.5.2

How The Art of Code covers it

How deep it goes
Connects profiling to CPU behavior and memory allocation, but stops short of explaining setup or trace interpretation.
Examples
Names VisualVM, JDK Flight Recorder, Async-Profiler, py-spy, PerfView, pprof, cargo-flamegraph, and Clinic.js.
What you can do after
Diagnoses targeted performance or resource issues with language-specific profilers while accounting for overhead and setup costs.
How it connects
Links profilers with dynamic analysis, microbenchmarking, static analysis, CPU behavior, memory allocation, and sustainable coding.

Also explained in

Compare how 3 books explain profiler →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Art of Code. The section links point to the parts of the book it draws on.