Profiling
Profiling is the measurement and analysis of a program’s runtime behavior and resource use to characterize performance and identify bottlenecks.
Troubleshooting Java, Second Edition
Profiling is the measurement or recording of program execution to identify which code runs and how resources are used.
- How it is used
- Deploys execution measurement to locate performance, resource-consumption, concurrency, memory, and database-query problems.
- How deep it goes
- Explains sampling, CPU and memory monitoring, targeted instrumentation, invocation counts, SQL interception, and stack traces without covering profiler internals.
- Examples
- Uses VisualVM displays, unsynchronized producer-consumer threads, repeated JDBC queries, generated cross joins, and Product object allocation.
- What you can do after
- Diagnose bottlenecks, abnormal resource use, repeated queries, generated SQL errors, and allocation sources with VisualVM profiling.
Read how Troubleshooting Java, Second Edition explains profiling →
Fast Python: High performance techniques for large datasets
- How it is used
- Locates measured bottlenecks before choosing performance changes to Python data-processing code.
- How deep it goes
- Works from cProfile commands and cumulative-time interpretation through trace visualization and line profiling, noting the latter’s collection cost.
- Examples
- Uses NOAA temperature ingestion, station-distance computation, repeated range timings, and GPU Mandelbrot traces.
- What you can do after
- Diagnose/debug with cProfile, finer profiling, or GPU tools to identify the costly operation before optimizing it.
Read how Fast Python: High performance techniques for large datasets explains profiling →
Advanced Algorithms and Data Structures
Profiling is the measurement of a program's runtime behavior, such as execution time and resource consumption, to identify performance characteristics.
- How it is used
- Guides performance decisions when implementation overhead, input distribution, or tunable data-structure parameters make asymptotic analysis insufficient.
- How deep it goes
- Defines profiling and develops a workflow from high-level timing to workload-specific CPU and memory comparisons, without detailing profiler configuration.
- Examples
- Compares Huffman encoding with d-ary heaps and profiles tree height, CPU time, and memory under different key distributions.
- What you can do after
- Evaluate/understand implementation trade-offs by profiling critical paths on representative inputs before choosing a parameter or data structure.
Read how Advanced Algorithms and Data Structures explains profiling →
100 Go Mistakes and How to Avoid Them
Profiling is the measurement of a program's runtime behavior and resource consumption to identify performance characteristics and bottlenecks.
- How it is used
- Directs Go optimization toward measured bottlenecks instead of guesses.
- How deep it goes
- Explains profile types, pprof activation, and CPU sampling mechanics; contrasts CPU profiles with execution traces.
- Examples
- Uses an HTTP pprof endpoint, benchmark CPU-profile command, profile viewer, and long-blocked goroutine stack trace.
- What you can do after
- Apply it via pprof to collect a relevant Go profile and identify where to investigate performance or resource use.
Read how 100 Go Mistakes and How to Avoid Them explains profiling →
Cloud Observability in Action
Profiling is the collection and analysis of measurements describing a program's execution behavior, resource usage, or function activity.
- How it is used
- Uses numerical execution evidence to troubleshoot services, optimize performance, and assess resource effects of code changes.
- How deep it goes
- Explains profile types, pprof collection, interactive analysis, and Parca usage, while stopping short of detailed pprof interpretation.
- Examples
- Uses Go pprof, CPU and goroutine profiles, cumulative function tables, and Parca profiling of an OpenTelemetry collector.
- What you can do after
- Diagnose/debug with it by locating costly functions and comparing service performance or resource usage across versions.
Starting Data Analytics with Generative AI and Python
Profiling is the systematic measurement of a program or system's resource usage and execution behavior to identify performance characteristics.
- How it is used
- Guides performance analysis by locating resource-intensive code and comparing system behavior before and after changes.
- How deep it goes
- Explains collected measurements and a repeated execution-time procedure, while stopping short of detailed profiling-tool internals.
- Examples
- Measures bootstrap confidence-interval calculations across sampled DataFrame sizes and plots execution time against input size.
- What you can do after
- Diagnose performance hot spots and evaluate optimization impact using repeated measurements under expected loads.
Read how Starting Data Analytics with Generative AI and Python explains profiling →
Domain-Specific Small Language Models
The practice of collecting runtime measurements for model execution to identify bottlenecks and optimization opportunities.
- How it is used
- Uses runtime measurements to diagnose bottlenecks and guide ONNX model and runtime optimization against latency, throughput, and memory KPIs.
- How deep it goes
- Descends from session configuration through raw JSON extraction, operator aggregation, and visualization, but defers specific optimization remedies.
- Examples
- Uses linear regression, ONNX conversion, test-set inference, Ort_perf_view, mlprodict tables, and Plotly operator charts.
- What you can do after
- Diagnose/debug with it by producing profiling reports that rank operators by duration, invocation count, and share of inference time.
Read how Domain-Specific Small Language Models explains profiling →
Latency
CPU profiling is the measurement and attribution of processor execution time across program call paths.
- How it is used
- Uses CPU time attribution to locate high-cost call paths before optimizing benchmarked code.
- How deep it goes
- Explains flame-graph structure and interpretation, then stops short of broader profiling caveats or implementation internals.
- Examples
- Uses recursive, memoized, and iterative Fibonacci implementations with Criterion timings and a generated flame graph.
- What you can do after
- Diagnose expensive call paths using Criterion, pprof, profile intervals, and flame-graph widths.
Learn Haskell by Example
Profiling is the measurement and analysis of a program's runtime behavior and resource consumption to identify performance characteristics and bottlenecks.
- How it is used
- Diagnoses runtime bottlenecks in the ladder-game application before selecting performance changes.
- How deep it goes
- Descends from compilation and runtime commands to cost-center interpretation, then stops short of detailed profiling theory.
- Examples
- Uses ladder-game graph lookup, candidate computation, dictionary reading, and generated .prof reports as concrete profiling artifacts.
- What you can do after
- Diagnose performance bottlenecks with Stack profiling, RTS options, and cost-center reports, then evaluate targeted implementation changes.
Coding with AI
The measurement and analysis of a program's execution behavior, such as runtime and resource usage, to identify performance characteristics.
- How it is used
- Uses timing comparisons to check generated Python code and choose a more performant implementation.
- How deep it goes
- Demonstrates repeated function timing but stops short of broader profiling methodology or detailed performance internals.
- Examples
- Compares two punctuation-cleaning functions on the same text file using elapsed-time measurements.
- What you can do after
- Evaluate competing Python implementations and revise generated code using measured runtime evidence.
Machine Learning System Design
Profiling is the measurement and analysis of a program's runtime behavior and resource consumption to identify performance bottlenecks.
- How it is used
- Uses runtime measurement to choose promising optimization directions across the entire serving system.
- How deep it goes
- Measures pipeline performance and prioritizes bottlenecks, but does not detail profiling tools or measurement implementation.
- Examples
- Uses 200-millisecond latency analysis and a sequential multi-model pipeline where preprocessing dominated inference.
- What you can do after
- Diagnose/debug with profiling by locating bottlenecks and selecting optimizations with the greatest practical opportunity.
Read how Machine Learning System Design explains profiling →
Related concepts
- performancealternative to · Performance is the measurable effectiveness or operational behavior of a system under specified conditions, assessed through relevant qualities such as task results, speed, responsiveness, throughput, or resource use.
- memory boundmeasures · A memory-bound workload is one whose performance is limited primarily by the rate of accessing or transferring data rather than by computational throughput.
- cProfileuses · cProfile is a Python standard-library deterministic profiler that records function-call counts and execution-time statistics.
- profilerkind of · A profiler is software that measures and analyzes program execution behavior and resource consumption to characterize performance and identify bottlenecks.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.










