Glueglue
AboutFor PMsFor EMsFor CTOsHow It Works
Log inTry It Free
Glueglue

The Product OS for engineering teams. Glue does the work. You make the calls.

Monitoring your codebase

Product

  • How It Works
  • Platform
  • Benefits
  • Demo
  • For PMs
  • For EMs
  • For CTOs

Resources

  • Blog
  • Guides
  • Glossary
  • Comparisons
  • Use Cases
  • Sprint Intelligence

Top Comparisons

  • Glue vs Jira
  • Glue vs Linear
  • Glue vs SonarQube
  • Glue vs Jellyfish
  • Glue vs LinearB
  • Glue vs Swarmia
  • Glue vs Sourcegraph

Company

  • About
  • Authors
  • Contact
AboutSupportPrivacyTerms

© 2026 Glue. All rights reserved.

Blog

Software Metrics in Software Engineering: From Code Analysis to Business Outcomes

The evolution of software engineering metrics from classical code-level measures to modern flow metrics. Understand why legacy metrics failed and what works today.

GT

Glue Team

Editorial Team

March 5, 2026·12 min read
DORA metricsSPACE frameworkcode complexity metricsmodern engineering metricssoftware engineering metricssoftware metrics in software engineeringsoftware quality metrics

Software Metrics in Software Engineering: From Code Analysis to Business Outcomes

I've lived through the full arc of software metrics. At Shiksha Infotech in the early days, we measured lines of code and function points. At UshaOm, we graduated to velocity and burn-down charts. At Salesken, we finally got to DORA metrics and outcome-based measurement. Each transition felt like a revelation — and each previous approach, in hindsight, was measuring the wrong thing.

Software engineering metrics have a troubled history. For decades, the field relied on metrics inherited from manufacturing and borrowed from other disciplines. Many of these metrics failed—spectacularly—because software isn't a manufacturing problem.

This evolution matters because understanding why old metrics failed helps you understand why new metrics work.

Part 1: The Classical Metrics (And Why They Failed)

Lines of Code (LOC)

The promise: Code quantity reveals productivity and complexity.

How it worked: Count lines of code. More lines = more work. Developers who wrote 1,000 lines per week were productive. Code with 5,000+ lines was complex and risky.

Why it failed: Lines of code is inversely correlated with quality. A junior developer writes 200 lines to solve a problem. A senior developer solves the same problem in 50 lines. By the LOC metric, the junior is more productive.

Also, LOC incentivizes the wrong behavior:

  • Developers write verbose code to pad metrics
  • Functions that should be extracted stay combined (fewer total lines)
  • Copy-paste proliferates (can't reuse, have to write new code)

The lesson: Quantity metrics don't work for knowledge work. A brilliant 10-line fix matters more than a 500-line refactor.

Cyclomatic Complexity (McCabe Complexity)

The promise: Simpler code is easier to understand and test. Measure code complexity numerically.

How it worked: Count decision paths in code. A simple function with one if-statement has complexity of 2. A function with multiple branches has higher complexity.

function checkCredentials(user, password, isAdmin) {
  if (user && password) {  // +1
    if (validatePassword(user, password)) {  // +1
      if (isAdmin) {  // +1
        return true;
      } else {
        return false;
      }
    } else {
      return false;
    }
  } else {
    return false;
  }
}
// Cyclomatic complexity: 4

Industry dogma: Complexity >10 is risky, >5 is concerning.

Why it failed: Some problems are genuinely complex. Reducing complexity artificially (extracting all branches into new functions) doesn't improve code—it spreads the problem across more functions and makes understanding harder.

Also, it's gamed easily:

  • Extract each branch to a separate function, complexity appears lower but total complexity is the same
  • Use dispatch tables instead of if-statements, complexity drops but behavior doesn't change

The metric became a checkbox exercise, not a code quality tool.

The lesson: A single number can't capture code quality. What matters is whether the complexity is justified and whether developers understand it.

Halstead Metrics

The promise: Measure code quality using operators, operands, and entropy.

How it worked: Count unique operators and operands in code. Calculate mathematical properties based on this distribution. The theory: well-written code has a specific operator-to-operand ratio.

Example: z = a + b uses operators (+, =) and operands (z, a, b).

Why it failed: Halstead metrics have almost no correlation with actual quality. Two pieces of code with identical Halstead metrics can have vastly different quality, maintainability, and correctness.

The metrics were developed in an era when code was written on punch cards, not collaboratively reviewed and iterated. They don't capture the dimensions of quality that actually matter.

The lesson: Metrics need to predict something real (bugs, maintenance time, etc.). If they don't, they're academic curiosities.

Function Points

The promise: Measure software project size and productivity consistently across organizations.

How it worked: Analyze software requirements and assign "function points" based on:

  • Number of inputs
  • Number of outputs
  • Number of database files accessed
  • Complexity ranking
  • Other factors

Then calculate productivity: function points per developer per month.

Why it failed: Function points are hugely subjective. Two analysts counting the same system might assign 100 vs. 150 function points. The "calibration" required to make them consistent across organizations is exhausting.

Also, they measure outputs not outcomes. You could score high on function points by building exactly the wrong thing. Customer didn't want it = 0 business value.

The lesson: Metrics must be objective and connected to value. If they require interpretation or debate, they're unreliable.

Part 2: The Wrong Turn—Flawed Individual Metrics

As software engineering matured, the field kept trying to measure individual developer productivity. These metrics all failed for similar reasons.

Commits Per Developer Per Week

The promise: Developers who commit more frequently are more productive.

Why it failed: Completely gamed. You can make 50 commits (one per file) or 1 commit (all files). Same work. Also rewards developers who:

  • Make tiny changes (commit, push, repeat vs. batching work)
  • Use poor commit hygiene (bad messages, incomplete features)
  • Break history (hard to bisect, hard to understand what changed why)

Developers who refactored extensively without committing appeared unproductive. Developers who made trivial commits appeared busy.

Code Review Comments Per Reviewer

The promise: Thorough reviews improve quality.

Why it failed: Incent nitpicking. A reviewer who comments on variable naming, style, and whitespace racks up review counts. A reviewer who spots architectural flaws but makes one comment appears less engaged.

Also created adversarial dynamics: developers vs. reviewers, not teammates working together.

Test Coverage %

The promise: More test coverage means fewer bugs.

Why it failed: Easy to achieve high coverage with worthless tests. Cover all lines with tests that never assert anything meaningful. Coverage hit goal, quality unchanged.

Inversely, low coverage on critical components can be okay if those components are simple and well-understood.

The lesson: Individual metrics are almost always gamed or misinterpreted. Focus on team outcomes.**

Part 3: The Scientific Era—DORA and SPACE

In the 2010s, research teams (notably Google's DevOps Research and Assessment team) started doing rigorous analysis: which metrics actually correlate with software quality, team happiness, and business outcomes?

DORA Metrics (DevOps Research and Assessment)

Google spent years analyzing thousands of engineering teams and found four metrics that strongly correlate with performance and quality:

1. Deployment Frequency

How often does your team deploy to production?

  • Elite: Multiple times per day
  • High: Daily
  • Medium: Weekly
  • Low: Monthly or less

Why this matters: Frequent deployment forces smaller changes, which means:

  • Easier to review (smaller diff, less risk)
  • Faster feedback (easier to spot bugs)
  • Faster recovery (smaller change = easier to find root cause)
  • Lower stress (rollback is quick)

2. Lead Time for Changes

Time from code commit to production deployment.

  • Elite: <1 hour
  • High: 1-24 hours
  • Medium: 1-7 days
  • Low: >30 days

Why this matters: Lead time reveals process friction. If it takes you 2 weeks to get code to production, you have 2 weeks of waiting somewhere. That waiting is often approval gates, testing, or compliance. Shorter lead time forces you to streamline process.

3. Change Failure Rate

Percentage of deployments that result in production incidents.

  • Elite: 0-15%
  • High: 15-30%
  • Medium: 30-45%
  • Low: >45%

Why this matters: Counterintuitively, elite teams deploy more frequently AND have lower failure rates. How? Better testing, better observability, better deployment practices. Frequent deploy forces good practices.

4. Mean Time to Recovery (MTTR)

Time from incident detection to system restoration.

  • Elite: <15 minutes
  • High: <1 hour
  • Medium: <4 hours
  • Low: >4 hours

Why this matters: You can't prevent all incidents, but you can be fast at fixing them. MTTR matters more than incident prevention. A 1-minute incident with 15-minute recovery is fine. A 30-second incident with 3-hour recovery is bad.

SPACE Framework

In 2019, researchers at Google, GitHub, and Microsoft proposed SPACE as a more holistic framework capturing multiple dimensions of developer productivity:

Satisfaction: Developer happiness and well-being.

  • Measured via surveys (eNPS, CSAT)
  • Predicts retention and engagement
  • Often inverse to high utilization (burnt-out teams report low satisfaction)

Performance: Throughput and quality.

  • Deployment frequency, lead time, change failure rate
  • Also code review quality, testing thoroughness
  • Combination of DORA metrics + team standards

Activity: Raw work output (with caveats).

  • Commits, PRs, issues closed
  • Useful for trend analysis (not comparisons)
  • Easy to game, so use cautiously
  • What matters is activity on high-impact work, not raw activity

Communication: How well the team shares knowledge and collaborates.

  • Code review feedback quality
  • Documentation and knowledge sharing
  • Async communication vs. synchronous meetings
  • Response time to questions

Efficiency: How quickly work converts to outcomes.

  • Cycle time (how fast from idea to production)
  • Time in review (a bottleneck signal)
  • Deployment success rate
  • How often you're interrupted vs. in deep work

The SPACE framework acknowledges that no single metric captures productivity. You need multiple dimensions.

Part 4: Modern Metrics—From Code to Outcomes

The industry is now shifting from code-level metrics to three categories:

Code-Level Metrics (Still Useful, But Limited)

These reveal technical health and technical debt, but don't predict business outcomes:

  • Test coverage: 70-80% is reasonable. >80% has diminishing returns.
  • Build time: Keep under 5 minutes. >15 minutes is a productivity killer.
  • Dependency currency: How many dependencies have security patches pending?
  • Code duplication: High duplication is a smell, but not always bad.

These are useful for engineering teams internally (detecting regressions, identifying refactoring opportunities). But don't use them to measure team performance across organizations.

Team-Level Metrics (The Practical Sweet Spot)

These reveal whether teams are shipping effectively and sustainably:

  • Deployment frequency: How often can you ship?
  • Lead time for changes: How fast is your process?
  • Change failure rate: How confident are you in each deployment?
  • MTTR: How quickly do you recover from failures?
  • Cycle time: How fast from idea to customer?
  • WIP: Are people context-switching or focused?
  • Throughput consistency: Are you predictable?

These are the metrics worth tracking because they correlate with actual business outcomes (customer satisfaction, time to market, reliability).

Business-Level Metrics (The Only Ones That Matter)

Ultimately, engineering exists to serve business:

  • Feature adoption: Do customers use what you built?
  • Engineering ROI: Revenue per engineering dollar spent?
  • Time to market: How quickly can you respond to opportunities?
  • Customer retention: Are they happy with stability and feature velocity?
  • Cost per transaction: Infrastructure efficiency?

The Evolution: Why Each Transition Happened

From code metrics to team metrics: Code-level metrics don't predict outcomes. Two teams with identical code complexity can have vastly different productivity. What matters is team dynamics, process, and focus. Code is just the artifact.

From individual metrics to team metrics: Individual productivity metrics create perverse incentives. They also miss the point: engineering is a team sport. An individual contributor's speed doesn't matter if the team is slow. Focus on team velocity instead.

From output metrics to outcome metrics: Shipping code ≠ delivering value. A team shipping 50 features per quarter that customers don't use generated zero value. A team shipping 5 features per quarter that customers love and adopt generates huge value.

Putting It Together: The Modern Metrics Stack

A mature engineering organization tracks:

Daily/Weekly (tactical):

  • Deployment frequency
  • Lead time for changes
  • Code review cycle time
  • Build time

Monthly (operational):

  • Cycle time (idea to production)
  • Change failure rate
  • MTTR for incidents
  • WIP levels

Quarterly (strategic):

  • Feature adoption rate
  • Engineering ROI
  • Customer satisfaction (NPS)
  • Time to market for critical features

Continuously (through AI):

  • Anomalies in above metrics
  • Trend analysis and root cause identification
  • Correlation with business outcomes

How Modern AI Changes the Game

Classical metrics required humans to:

  1. Run queries against multiple systems
  2. Manually calculate metrics
  3. Create dashboards
  4. Interpret results
  5. Act on insights (or not)

Modern AI agents like Glue autonomously:

  • Monitor metrics continuously across Git, deployment systems, and incident trackers
  • Surface anomalies (e.g., "Cycle time jumped 2 days, here's why")
  • Answer questions in natural language ("Why did MTTR increase last week?")
  • Trace correlations (when adoption dropped, was it correlated with deploys or quality?)
  • Forecast trends (based on current sprint velocity, can we hit Q2 targets?)

Rather than engineers spending 2 hours per week in dashboards, AI agents deliver insights proactively. Leadership gets data-driven answers to key questions without analysis work.

A Final Thought: Metrics Should Serve Strategy

The most dangerous metrics regime is one where metrics become strategy. Teams start optimizing for the metric instead of the business goal.

"Let's increase deployment frequency" → teams deploy broken code to hit the number. "Let's reduce cycle time" → teams ship half-baked features. "Let's improve test coverage" → teams write meaningless tests that don't catch bugs.

Use metrics to:

  1. See reality clearly (are we actually shipping fast?)
  2. Detect problems early (did quality drop?)
  3. Celebrate wins (we're improving)
  4. Align teams (everyone understands our top 3 metrics)

But always ask: "If we optimize this metric, do we get closer to our actual goal?" If the answer is no, don't track it.


The right metrics matter. Glue's AI agents monitor the metrics that actually predict success: deployment frequency, lead time, quality indicators, and customer outcomes. Rather than building dashboards, your team gets autonomous agents that surface insights, answer questions, and help you focus on unblocking work.

See how other engineering leaders use AI agents to track what matters and ignore what doesn't.


Related Reading

  • Coding Metrics That Actually Matter
  • Engineering Metrics Examples: 20+ Key Metrics Your Team Should Track
  • Metrics for Software Development: What Your Team Should Track
  • DORA Metrics: The Complete Guide for Engineering Leaders
  • Code Quality Metrics: What Actually Matters
  • Engineering Team Metrics: The Complete Framework

Author

GT

Glue Team

Editorial Team

Tags

DORA metricsSPACE frameworkcode complexity metricsmodern engineering metricssoftware engineering metricssoftware metrics in software engineeringsoftware quality metrics

SHARE

Keep reading

More articles

blog·Mar 5, 2026·22 min read

SPACE Metrics Framework: The Complete Guide for Engineering Teams

Learn how SPACE metrics measure developer satisfaction, performance, activity, communication, and efficiency. Implementation strategies for engineering teams.

GT

Glue Team

Editorial Team

Read
blog·Mar 5, 2026·11 min read

What Are DORA Metrics? A Beginner's Guide to Measuring Software Delivery Performance

Learn what DORA metrics are, why they matter, and how to track them. Complete guide to the 4 metrics engineering teams use to measure delivery performance.

GT

Glue Team

Editorial Team

Read
blog·Mar 5, 2026·17 min read

Metrics for Software Development: What Your Team Should Track and Why

The definitive guide to software development metrics. Organized by stakeholder—metrics for developers, managers, and executives—with real-world examples and anti-patterns.

GT

Glue Team

Editorial Team

Read

Related resources

Glossary

  • What Is Developer Onboarding?
  • What Is Bus Factor?

Use Case

  • Glue for Competitive Gap Analysis

Stop stitching. Start shipping.

See It In Action

No credit card · Setup in 60 seconds · Works with any stack