Lesson239 words

Metrics and queries for development

Metrics and queries for development

What is worth measuring

MetricSignals
Pull request cycle timeHow long review takes — usually the biggest hidden delay
PR sizeLarge PRs get worse review; the correlation is strong
Build failure rate on mainWhether the trunk is healthy
Time to first reviewWhether work sits unattended
Code churnRepeated rewriting of the same area

Review latency is usually the bottleneck

Teams instinctively optimise build speed, which is visible on a dashboard. Time-to-first-review is often several times larger and rarely displayed — a two-minute build behind an eleven-hour review wait is not a fast pipeline.

Metrics that mislead

MetricWhy it fails
Lines of codeRewards volume; deleting code is usually good
Commits per developerRewards splitting commits
Individual velocityPunishes helping colleagues

The common thread: anything measuring an individual's output rather than the system's flow degrades collaboration, because helping someone else always lowers your own number.

Churn

High churn in one area means the design is not settled there. It is a prompt to investigate — the answer might be an unclear requirement, a missing abstraction, or a genuinely volatile domain — not a number to drive down.

Primary sources

Ready to study Designing and Implementing Microsoft DevOps Solutions (AZ-400)?

Practice tests, flashcards, and all study notes — free, no sign-up needed.

Start Studying — Free