liveBook · Manning

Dynamic analysis

As explained in The Art of Code

Dynamic analysis is the examination of software by observing its behavior during execution.

Dynamic analysis examines software while it runs, using observed runtime behavior rather than source code alone. It can measure energy consumption and environmental impact. section 8.5.2

Practical applications include:

  • Use microbenchmarks to measure small code snippets in isolation. section 8.5.2
  • Use profilers to inspect CPU behavior and memory allocation in greater detail. section 8.5.2
  • Treat environmental-impact plugins and research prototypes cautiously when multiplatform support or maintenance is uncertain. section 8.5.2

Tool choices by ecosystem

Java developers can use JMH for microbenchmarks and VisualVM, JDK Flight Recorder with Mission Control, or Async-Profiler for deeper runtime analysis. Python developers can use pytest-benchmark or py-spy. section 8.5.2

How The Art of Code covers it

How deep it goes
Defines runtime observation and names measurement tools, but stops short of explaining instrumentation or analysis procedures.
Examples
Uses JMH, BenchmarkDotNet, pytest-benchmark, VisualVM, JDK Flight Recorder, Async-Profiler, and py-spy as examples.
What you can do after
Diagnose runtime CPU, memory, and energy behavior with benchmarks and language-specific profilers.
How it connects
Contrasts with static analysis and connects to microbenchmarking, profiling, memory allocation, and sustainable coding.

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.