# Benchmarking

> The activity of timing a fixed workload repeatedly in a controlled environment, so results can be compared across changes.

Record: `architecture:benchmarking`
Kind: activity
Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)
Severity: recommended
Scope: function, service, system
Canonical: https://banes-lab.com/ontology#architecture-benchmarking

Listed in [Architecture principles](https://banes-lab.com/api/records/architecture.md), after [Profiling](https://banes-lab.com/records/architecture/profiling.md) and before [Bottleneck Analysis](https://banes-lab.com/records/architecture/bottleneck-analysis.md).

## Repair

- Refactored by: Add Benchmark, Stabilize Environment
- Detected by: missing benchmark for perf-sensitive changes
- Violated by: performance claim without benchmark
- Measured by: benchmark score/trend
- Enforced by: benchmark CI

## Requires

- [Repeatable Test Environment](https://banes-lab.com/records/lexicon/repeatable-test-environment.md)

## Reinforces

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

## Enables

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

## Conflicts with

- [Anecdotal Timing](https://banes-lab.com/records/lexicon/anecdotal-timing.md)

## In tension with

- [Environment Drift](https://banes-lab.com/records/lexicon/environment-drift.md)

## Tensions

- [Benchmarking / Environment Drift](https://banes-lab.com/records/tension/benchmarking-environment-drift.md)

## Severity

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

## Category

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

## Linked from

- [Correctness / Determinism / Verification](https://banes-lab.com/ontology/principles/architecture-category-correctness-determinism-verification.md)
- [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)
- [Severity levels](https://banes-lab.com/ontology/schema/the-vocabulary-severity.md)
- [The resolutions](https://banes-lab.com/ontology/schema/the-resolutions.md)
