본문으로 건너뛰기
Clinford Jordano Valencia
모든 글

엔지니어링 리더십

The Metrics That Make Engineering Organizations Worse

Lines of code, story points and pull-request counts reward the wrong behavior. Why vanity metrics backfire, and how to measure outcomes, flow and health without gaming.

  • 12분 분량

이 페이지는 아직 한국어로 제공되지 않아 영어 원문을 보여 드립니다.

A metric is a question you ask so often that you automate it. Choose the wrong question and the organization optimizes for the wrong answer: count lines of code and you get more code, count tickets closed and you get smaller tickets. Measuring engineering is not wrong. It just has to measure outcomes, flow and health, at team level, as signals to investigate rather than targets to hit.

Why It Matters

Metrics shape behavior more strongly than any memo, because people respond rationally to what they are judged on. A single badly chosen number can make a team:

  • ship less useful work, while the dashboard shows improvement
  • cut corners on quality
  • stop helping colleagues, because helping doesn’t count
  • hide problems instead of raising them

Good metrics do the opposite: they make problems visible early and help teams argue for the investments that would fix them.

Goodhart’s Law

“When a measure becomes a target, it ceases to be a good measure.” (Marilyn Strathern’s phrasing of the economist Charles Goodhart’s observation.)

What it means: a number is useful because it moves together with something you care about, such as lines of code with work done or tickets closed with progress. Once people are rewarded for the number itself, they find cheaper ways to move it that don’t involve the thing you care about, and the link between the two breaks. The number keeps improving; the reality behind it doesn’t. In engineering it plays out the same way every time:

  1. Pick a number that correlates with good work
  2. Make it a target, or rank people by it
  3. People improve the number, not the work
  4. The correlation breaks, and the dashboard lies

Engineering versions are usually smaller but follow the same steps: pull requests split to hit a count, tests that raise coverage without checking anything, incidents downgraded so “time to restore” looks good.

Metrics That Backfire

MetricWhat it rewardsWhat it hides
Lines of codeVerbose code, copying, not deletingThe best changes often remove code
Commits or pull requests per personSplitting work into tiny piecesReview load, design work, mentoring
Story points completed (“velocity”)Inflated estimatesPoints are a planning tool, not output
Sprint commitment met (“say/do ratio”)Committing to less than the team can doAmbition, and the real capacity of the team
Tickets closedSmall, easy ticketsHard problems nobody picks up
Hours logged or online statusPresenceFocused work and sustainable pace
Code coverage as a targetTests that execute code without checking itWhether behavior is actually verified
Number of testsMany trivial testsWhether the important paths are tested
Bugs found per tester, or fixed per developerSplitting or inventing bugsPrevention
Number of incidents as a targetNot declaring incidents, downgrading severityReal reliability, and the learning from each incident
Review turnaround as a targetRubber-stamp approvalsWhether reviews catch anything
Deployments as a target, without qualityDeploying empty or trivial changesWhether deploys deliver anything to users
Share of code written by AIAccepting suggestions without reading themReview load, defects and maintainability
Individual leaderboardsCompetitionCollaboration, pairing and helping others

None of these is useless as information: coverage shows untested modules, velocity helps planning. They become harmful when they turn into targets or comparisons between people.

What to Measure Instead

Measure at three levels, and read them together:

Outcomes: did it help users and the business?adoption, conversion, retention, customer-facing incidents, support ticketsFlow: how smoothly does work reach users?lead time, deploy frequency, change failure rate, time to restore, work in progressHealth: can the team keep this up?developer experience surveys, on-call load, focus time, satisfaction, attritionenablesenables
Three levels of engineering metrics. Health enables flow, and flow enables outcomes; reading only one level invites gaming.

Outcomes

Start from what the work was for. Shipping is not the outcome; what changed for users, or for the teams you serve, is. Every kind of team has outcomes of its own:

TeamOutcomes to measureExample
ProductAdoption, conversion, retention, fewer support ticketsA new checkout step: share of users who finish checkout, before and after
Platform and developer experienceTime saved for other teams, how fast teams can build and shipA shared component library: days for a team to build a new page
Infrastructure and SREReliability users feel, cost per request, incidents preventedService level objectives met, and the number of customer-facing incidents
DataFreshness and correctness of data people decide withShare of dashboards updated on time, data bugs found by users
SecurityExposure removed, time to fix vulnerabilitiesMedian days from a critical vulnerability report to a fix in production

Flow: The DORA Metrics

DORA (DevOps Research and Assessment, now part of Google Cloud) has surveyed tens of thousands of professionals since 2014. Its central finding: a small set of delivery metrics predicts how well the organization does, and speed and stability are not a trade-off. The best teams are good at both.

DORA’s Five Delivery Metrics

Throughput: how fast changes flowChange lead timecommit → running in productionDeployment frequencyhow often you deployFailed deployment recovery timehow fast you recover from a bad deployInstability: how often they go wrongChange fail ratedeploys that need a rollback or hotfixDeployment rework rateunplanned deploys to fix an incidentStrong teams improve both columns at the same time
DORA’s five software delivery metrics. Throughput shows how fast changes flow; instability shows how often they go wrong. Read both columns together.
MetricQuestion it answersWhere the data comes fromHow it gets gamed
Change lead timeHow long does a finished change wait before users have it?Commit timestamps and deployment logsCommitting only at the last minute; measure from first commit or pull request instead
Deployment frequencyHow often can we ship?Your deployment pipelineDeploying empty or trivial changes
Failed deployment recovery timeWhen a deployment breaks something, how quickly are users OK again?Incident and rollback recordsNot declaring incidents
Change fail rateWhat share of deployments needs immediate intervention?Rollbacks, hotfixes, linked incidentsCalling hotfixes “normal” deployments
Deployment rework rateHow much of our shipping is unplanned repair?Deployments linked to production incidentsSame as above

Why they beat output counts:

  • They measure the team’s process, not one person. Writing code, reviews, tests, the build pipeline and releases all affect them, so nobody can push the numbers up alone.
  • They keep each other honest. If you ship more often but break more things, the second column shows it straight away. Cheating on one number usually makes another one worse.
  • They point to what to fix. Slow lead time usually means slow reviews, slow builds or changes that are too big. A high fail rate usually means weak tests or risky releases.
  • They’re easy to start with. Your CI/CD tool already records lead time and how often you deploy. Compare with your own team’s past, not with other companies.

Health: The SPACE Framework

A team can keep great delivery numbers for a quarter by working weekends, then lose its best engineers. The SPACE framework (GitHub, Microsoft Research and the University of Victoria, 2021) says productivity has several dimensions and no single metric captures it:

The SPACE Framework

S Satisfaction and well-beingsatisfaction with tools and reviews, burnout, retentionP Performance (outcomes)quality, reliability, customer satisfaction, adoptionA Activitydeployments, reviews, incidents handled; never aloneC Communication, collaborationfinding docs, review turnaround, onboarding timeE Efficiency and flowhandoffs, focus time, waiting time, lead time
The five SPACE dimensions, with example measures for each. Pick a few metrics from at least three dimensions, including one people report themselves.
  • Use at least three dimensions, so a gain in one (activity) can’t hide a loss in another (satisfaction).
  • Include perception. How developers rate their tools and workload is real data, and often the earliest warning.
  • Never use activity alone. It is the easiest to collect and the easiest to misread.
  • Measure at the right level. Some metrics make sense for a team or a system and mislead for an individual.

A practical set for one team: change lead time, change fail rate, a quarterly developer experience survey and review turnaround time. Four numbers, three dimensions, none about one person.

The same researchers later added the DevEx framework, which narrows the focus to three things developers feel every day:

  • Feedback loops: how fast builds, tests and reviews respond.
  • Cognitive load: how much you must keep in your head to make a change, from unclear ownership to undocumented systems.
  • Flow state: how often you can work without interruption.

Slow builds, flaky tests and unclear ownership show up here long before they show up in delivery numbers.

A Worked Example: DORA and SPACE Together

An illustration, not a real team’s data. A checkout team of six engineers feels slow, and leadership asks for proof. Instead of counting pull requests, the team picks four numbers across three SPACE dimensions and reads them for one quarter:

MetricDimensionStart of quarterEnd of quarterWhat the team changed
Change lead time (median)Efficiency and flow6 days2.5 daysSmaller pull requests; a “first review within 4 working hours” agreement
Change fail ratePerformance18%9%Tests for the payment edge cases behind most rollbacks
“Builds slow me down” (survey, % agree)Satisfaction70%30%CI caching and splitting the slowest test suite
Review turnaround (median)Communication and collaboration2 days5 hoursThe review agreement, and fewer, smaller changes in flight
  • Nothing here ranks a person. Every number describes how work moves through the team.
  • The numbers checked each other. Faster lead time didn’t come from skipping review, because the fail rate fell at the same time.
  • The survey found the cause first. Developers named slow builds before the delivery numbers showed why.

Using Metrics Without Breaking Them

  • Teams, not individuals. Show the numbers to the team first, and say up front they won’t be used in performance reviews. Then keep that promise.
  • Trends, not targets. Ask “why did lead time double this quarter?”, not “why is it above 2 days?”.
  • Several, in tension. Pair speed with quality and health (see the table below).
  • Context before comparison. A payments team and a marketing-site team should not share a leaderboard.
  • Ask the team. When a number moves, the people closest to the work usually know why.
  • Retire dead metrics. A dashboard nobody acts on is just a cost.

Going Deeper: Reading the Numbers Well

Look at Distributions, Not Averages

Lead time is skewed: most changes are quick, a few take weeks. Report the median (the typical change) and the 85th percentile (the slow ones), and read the slow tail by hand. That is where the process problems are.

Break Lead Time Into Its Parts

“Lead time went up” is a starting point, not a diagnosis. Split it into stages from tool timestamps (first commit, PR opened, first review, merged, deployed) to see where changes wait:

codingwaiting for reviewreviewwaiting for releasedeployactive workwaitingTypical fixes: smaller changes and review agreements for the first wait, automated deploys for the second.
A change’s lead time split into stages. Most of it is waiting, for review, for a build or for a release window; that is where improvements pay off.

Keep Metrics in Tension

If you watchAlso watchBecause
Deployment frequencyChange fail rateShipping more often while breaking more isn’t progress
Lead timeEscaped defects, incidentsSpeed bought by skipping review shows up later
ThroughputDeveloper experience survey, on-call loadA sprint that burns people out isn’t sustainable
Feature deliveryAdoption, support ticketsShipped isn’t the same as useful

Test Yourself: Scenarios

Think through your answer, then compare.

시나리오 1

The Leaderboard Request

A director asks you to build a dashboard ranking engineers by pull requests merged per week.

정답 보기

Push back, and offer an alternative.

  • Why not: it rewards splitting work and penalizes reviewers, mentors, incident responders and whoever takes the hard problems. The best engineers often merge the fewest PRs.
  • Ask what decision they want to make. “Are we delivering faster?” → team-level lead time, deploy frequency and change fail rate, next to outcomes.
  • If it is about one person, that is a conversation for their manager, with context, not a number.

시나리오 2

Faster, but Breaking More

After moving to continuous deployment, deployment frequency doubled. Change fail rate also doubled, from 5% to 10%.

정답 보기
  • Do the math: twice the deploys at twice the fail rate is four times as many failed deploys.
  • Check impact: if failures are small and rolled back in minutes, the trade may be fine; if customers feel them, it isn’t.
  • Find the cause: missing tests, risky database changes, no feature flags.
  • Fix forward: better automated checks and progressive delivery (canaries, flags), not deploying less.

시나리오 3

Three-Week Lead Time

Your team’s median lead time is three weeks, but engineers say a typical change takes two days of work.

정답 보기

The rest is waiting.

  • Split lead time into stages: time to first review, review rounds, CI, release window, QA.
  • Fix the biggest wait first. Usual suspects: large PRs, a weekly release train, manual QA queues, slow or flaky CI.
  • Typical fixes: a review response agreement, smaller changes, automated deploys.
  • Show it worked with the median and 85th percentile over time.

시나리오 4

“Our Builds Are Slow”

A developer survey ranks slow builds as the top problem. How do you decide whether to invest, and show it worked?

정답 보기
  • Price it: build minutes × builds per day × engineers = hours waiting per week, plus context switches.
  • Compare with the cost of the fix: caching, split test suites, faster runners.
  • Set a target such as “median CI time under 10 minutes” and ship.
  • Report both sides: the system metric (CI duration) and the perception metric (the next survey). Acting on survey feedback also makes the next survey more honest.

Key Takeaways

  • When a measure becomes a target, people optimize the number instead of the work (Goodhart’s law).
  • Output counts (lines, commits, story points, tickets) reward busywork and hide the hardest work.
  • Measure outcomes, flow (DORA) and team health (SPACE, DevEx) together.
  • Read metrics as team-level trends that prompt questions, paired so none can be gamed alone.
  • Never rank individuals by output numbers; software is built by teams.

Measurement also decides how you handle debt and AI: see technical debt is not the enemy for pricing debt with these signals, and AI makes writing code cheaper for why output metrics are about to mislead even more.

Sources

태그

자주 묻는 질문

Are DORA metrics safe to use?

YesWith care. They describe the delivery system rather than individuals, which makes them much harder to game. They still do harm when used to rank teams with different products, or as targets on their own.

How do I show leadership that engineering is productive without output metrics?

Tie engineering work to outcomes leadership already cares about, such as conversion, incidents, support tickets and time to market, and show delivery trends next to them. Explain one or two concrete improvements per period in plain language.

Should we measure individual developers at all?

NoNot for comparison or performance reviews. Individual data is fine for an engineer’s own reflection and conversations with their manager, but software is a team activity, and individual output mostly measures the kind of work someone was given.

How do I measure developer experience?

Combine short, regular surveys about friction (builds, reviews, documentation, focus time) with system data such as CI duration and review wait times. The DevEx framework’s three areas, feedback loops, cognitive load and flow, are a good structure.

How many metrics should a team track?

A handful, typically three to five, chosen in pairs that pull against each other, such as speed and quality. More than that and nobody acts on them.

What is the difference between a metric and a target?

A metric is information you look at to ask questions. A target is a number someone is rewarded or judged for reaching. Turning a metric into a target is what triggers Goodhart’s law.

Should metrics be visible to the whole team?

YesTeam-level metrics work best when the team sees them first and uses them to improve its own way of working. Hidden metrics used by management create suspicion and gaming.

Should I use the average or the median for lead time?

The median, plus a high percentile such as the 85th. Lead time is skewed by a few very slow changes, which distort the average; the percentile shows how bad the slow ones are.