Fitness Function Block
Architectural fitness function definition with metric, threshold, measurement method, and automation status.
The Fitness Function block defines an architectural fitness function: a measurable check that verifies whether a system characteristic remains within acceptable bounds. Each block captures the metric being measured, the acceptable threshold, how the measurement is performed, and whether it runs automatically or manually.
When to Use
Block Properties
| Property | Required | Description |
|---|---|---|
| Name | Yes | Short name for the fitness function, for example API Response Time |
| Quality Attribute | Yes | The architectural quality being measured, for example Performance or Security |
| Metric | Yes | What is measured, for example 95th percentile response time in milliseconds |
| Threshold | Yes | Acceptable value or range, for example less than 200ms |
| Current Value | No | Most recent measured value |
| Measurement Method | Yes | How the metric is collected, for example Synthetic monitoring via Datadog |
| Frequency | No | How often the measurement runs, for example Every deployment or Hourly |
| Automation Status | Yes | Whether the check is Automated, Semi-automated, or Manual |
| Pipeline Stage | No | Where in the CI/CD pipeline the check runs, for example Post-deploy |
| Owner | No | Team or individual responsible for maintaining the fitness function |
| Notes | No | Additional context or rationale |
Rendered Output
The block renders as a structured card with the fitness function name as the heading, the quality attribute as a badge, and the remaining properties in a labelled field layout. When a current value is provided, it is displayed alongside the threshold with a pass or fail indicator based on whether the value meets the threshold condition.
Fitness Functions vs Quality Gates
| Aspect | Fitness Function | Quality Gate |
|---|---|---|
| Scope | Single architectural quality attribute | Multiple pass/fail checks at a pipeline stage |
| Granularity | One metric with a threshold | Aggregation of several metrics or rules |
| Usage | Ongoing architectural governance | Go/no-go decision at a specific point |
| Example | API latency under 200ms | All unit tests pass, code coverage above 80%, no critical vulnerabilities |