# Profiling

> A technique for measuring where a running program spends its time and memory under a representative workload.

Record: `architecture:profiling`
Kind: technique
Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)
Severity: recommended
Scope: runtime, code path
Canonical: https://banes-lab.com/ontology#architecture-profiling

Listed in [Architecture principles](https://banes-lab.com/api/records/architecture.md), after [Optimization](https://banes-lab.com/records/architecture/optimization.md) and before [Benchmarking](https://banes-lab.com/records/architecture/benchmarking.md).

## Repair

- Refactored by: Profile Path, Target Hotspot
- Detected by: missing profile evidence
- Violated by: performance decisions without profiling
- Measured by: hotspot attribution
- Enforced by: performance review

## Requires

- [Representative Workload](https://banes-lab.com/records/lexicon/representative-workload.md)

## Reinforces

- [Performance Engineering](https://banes-lab.com/records/architecture/performance-engineering.md)

## Enables

- [Bottleneck Detection](https://banes-lab.com/records/lexicon/bottleneck-detection.md)

## Conflicts with

- [Guesswork](https://banes-lab.com/records/lexicon/guesswork.md)

## In tension with

- [Measurement Overhead](https://banes-lab.com/records/lexicon/measurement-overhead.md)

## Tensions

- [Profiling / Measurement Overhead](https://banes-lab.com/records/tension/measurement-overhead-profiling.md)

## Severity

- [recommended](https://banes-lab.com/records/vocabulary/severity-recommended.md)

## Techniques

- [Profiling](https://banes-lab.com/records/reasoning/technique-profiling.md)

## Category

- [Scalability / Performance / Optimization](https://banes-lab.com/records/architecture-category/scalability-performance-optimization.md)

## Required by

- [Optimization](https://banes-lab.com/records/architecture/optimization.md)
- [Bottleneck Analysis](https://banes-lab.com/records/architecture/bottleneck-analysis.md)

## Linked from

- [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- [Scalability / Performance / Optimization](https://banes-lab.com/ontology/lexicon/lexicon-category-scalability-performance-optimization.md)
- [The techniques](https://banes-lab.com/ontology/reasoning/the-techniques.md)
- [Severity levels](https://banes-lab.com/ontology/schema/the-vocabulary-severity.md)
- [The resolutions](https://banes-lab.com/ontology/schema/the-resolutions.md)
