IT lexicon › Programming › Profiling

Profiling

Programming På svenska → Updated: 2026-11-14

Technique for measuring how much CPU, memory, or time each function in a program uses — to find bottlenecks without guessing.

A CPU profiler samples the call stack every 10 milliseconds and aggregates. After billions of samples, you learn "60% of runtime is in the sort function". A memory profiler tracks allocations and frees to spot leaks. These raw profiles get visualized as flame graphs — stacked bars where height = time spent.

Profilers are not real-time observability; they're debugging tools. You run them locally or in a controlled test to attack an already-identified problem (slow startup, high memory). Common implementations: perf (Linux), Instruments (macOS), Go pprof, Java JFR, Python cProfile.

← Back to the lexicon