What Are Software Metrics and How Can You Track Them
What Are Software Metrics and How Can You Track Them
Within the software development process, there are many metrics that are all
related to each other. Software metrics are related to the four functions of
management: Planning, Organization, Control, or Improvement.
In this article, we are going to discuss several topics including many examples of
software metrics:
(ROI)
• Identify areas of improvement
• Manage workloads
• Reduce overtime
• Reduce costs
These goals can be achieved by providing information and clarity throughout the
organization about complex software development projects. Metrics are
an important component of quality assurance, management, debugging,
performance, and estimating costs, and they’re valuable for both developers and
development team leaders:
Thus, a single software package could have two very different LOC counts
depending on which counting method is used. That makes it difficult to compare
software simply by lines of code or any other metric without a standard definition,
which is why establishing a measurement method and consistent units of
measurement to be used throughout the life of the project is crucial.
There is also an issue with how software metrics are used. If an organization uses
productivity metrics that emphasize volume of code and errors, software
developers could avoid tackling tricky problems to keep their LOC up and error
counts down. Software developers who write a large amount of simple code may
have great productivity numbers but not great software development skills.
Additionally, software metrics shouldn’t be monitored simply because they’re easy
to obtain and display – only metrics that add value to the project and process
should be tracked.
Of course, none of this matters if the measurements that are used in software
metrics are not collected or the data is not analyzed. The first problem is that
software development teams may consider it more important to actually do the
work than to measure it.
This is why software development platforms that automatically measure and track
metrics are important. But software development teams and management run the
risk of having too much data and not enough emphasis on the software metrics
that help deliver useful software to customers.
The technical question of how software metrics are collected, calculated and
reported are not as important as deciding how to use software metrics. Patrick Kua
outlines four guidelines for an appropriate use of software metrics:
For example, size-based software metrics often measure lines of code to indicate
coding complexity or software efficiency. In an effort to reduce the code’s
complexity, management may place restrictions on how many lines of code are to
written to complete functions. In an effort to simplify functions, software developers
could write more functions that have fewer lines of code to reach their target but do
not reduce overall code complexity or improve software efficiency.
These simple targets do not offer as much information on how the software metrics
are trending. Any single data point is not as significant as the trend it is part of.
Analysis of why the trend line is moving in a certain direction or at what rate it is
moving will say more about the process. Trends also will show what effect any
process changes have on progress.
By breaking the measurement periods into smaller time frames, the software
development team can check the software metrics — and the trend line — to
determine how well they are progressing.
Yes, that is an interruption, but giving software development teams more time to
analyze their progress and change tactics when something is not working is very
productive. The shorter periods of measurement offer more data points that can be
useful in reaching goals, not just software metric targets.
Why would software developers keep doing something that is not getting them
closer to goals such as better software experiences? Because they are focusing on
software metrics that do not measure progress toward that goal.
Some software metrics have no value when it comes to indicating software quality
or team workflow. Management and software development teams need to work on
software metrics that drive progress towards goals and provide verifiable,
consistent indicators of progress.
As a starting point, here are some software metrics that can help developers track
their progress.
Lead time
Lead time quantifies how long it takes for ideas to be developed and delivered as
software. Lowering lead time is a way to improve how responsive software
developers are to customers.
Screenshot via Pearsoned.co.uk
Cycle time
Cycle time describes how long it takes to change the software system and
implement that change in production.
Team velocity
Team velocity measures how many software units a team completes in an iteration
or sprint. This is an internal metric that should not be used to compare software
development teams. The definition of deliverables changes for individual software
development teams over time and the definitions are different for different teams.
Open/close rates
Open/close rates are calculated by tracking production issues reported in a specific
time period. It is important to pay attention to how this software metric trends.
Production
Production metrics attempt to measure how much work is done and determine the
efficiency of software development teams. The software metrics that use speed as
a factor are important to managers who want software delivered as fast as
possible.
Active days
Active days is a measure of how much time a software developer contributes code
to the software development project. This does not include planning and
administrative tasks. The purpose of this software metric is to assess the hidden
costs of interruptions.
Assignment scope
Assignment scope is the amount of code that a programmer can maintain and
support in a year. This software metric can be used to plan how many people are
needed to support a software system and compare teams.
Efficiency
Efficiency attempts to measure the amount of productive code contributed by a
software developer. The amount of churn shows the lack of productive code. Thus
a software developer with a low churn could have highly efficient code.
Code churn
Code churn represents the number of lines of code that were modified, added or
deleted in a specified period of time. If code churn increases, then it could be a
sign that the software development project needs attention.
Impact
Impact measures the effect of any code change on the software development
project. A code change that affects multiple files could have more impact than a
code change affecting a single file.
ACR = F/U
Security metrics
Security metrics reflect a measure of software quality. These metrics need to be
tracked over time to show how software development teams are developing
security responses.
Endpoint incidents
Endpoint incidents are how many devices have been infected by a virus in a given
period of time.
Mean time to repair (MTTR)
Mean time to repair in this context measures the time from the security breach
discovery to when a working remedy is deployed.
Size-oriented metrics
Size-oriented metrics focus on the size of the software and are usually expressed
as kilo lines of code (KLOC). It is a fairly easy software metric to collect once
decisions are made about what constitutes a line of code. Unfortunately, it is not
useful for comparing software projects written in different languages. Some
examples include:
Function-oriented metrics
Function-oriented metrics focus on how much functionality software offers. But
functionality cannot be measured directly. So function-oriented software metrics
rely on calculating the function point (FP) — a unit of measurement that quantifies
the business functionality provided by the product. Function points are also useful
for comparing software projects written in different languages.
Function points are not an easy concept to master and methods vary. This is why
many software development managers and teams skip function points altogether.
They do not perceive function points as worth the time.
DRE = E / (E+D)
The closer to 1 DRE is, the fewer defects found after product delivery.
With dozens of potential software metrics to track, it’s crucial for development
teams to evaluate their needs and select metrics that are aligned with business
goals, relevant to the project, and represent valid measures of progress. Monitoring
the right metrics (as opposed to not monitoring metrics at all or monitoring metrics
that don’t really matter) can mean the difference between a highly efficient,
productive team and a floundering one. The same is true of software testing: using
the right tests to evaluate the right features and functions is the key to success.
(Check out our guide on software testing to learn more about the various testing
types.)
While the process of defining goals, selecting metrics, and implementing consistent
measurement methods can be time-consuming, the productivity gains and time
saved over the life of a project make it time well invested. Various software metrics
are incorporated into solutions such as application performance
management (APM) tools, along with data and insights on application usage, code
performance, slow requests, and much more. Retrace, Stackify’s APM solution,
combines APM, logs, errors, monitoring, and metrics in one, providing a fully-
integrated, multi-environment application performance solution to level-up your
development work. Check out Stackify’s interview with John Sumser with HR
Examiner, and one of Forbes Magazine’s 20 to Watch in Big Data, for more
insights on DevOps and Big Data.