Measurement:
·
The
act of quantifying an attribute of a software product or process.
·
Provides
a specific numerical value for a given characteristic.
·
Examples
include the number of lines of code, the execution time of a program, or the
number of defects found.
It can be
classified into three categories:
product metrics, process metrics, and project metrics.
Product metrics
describe the characteristics of the product
such as size, complexity, design features, performance, and quality level.
Process metrics can be used to
improve software development and maintenance. These focus on
the development process, such as the time it takes to complete tasks, the number of defects
found, and the efficiency of the
development team.
Examples
include the effectiveness of defect removal during development, the pattern of
testing defect arrival, and the response time of the fix process.
Project metrics describe the project characteristics and execution. These focus on the project as a whole, such as its cost, schedule, and resource utilization.
Examples include the number of software developers,
the staffing pattern over the life cycle of the
software, cost, schedule, and productivity.
Examples of Software Metrics:
·
Code Size: Measured by the number of lines of code (LOC),
bytes, or number of tokens.
·
Code Complexity: Measured by cyclometric complexity, which
indicates the number of independent paths through a code module.
·
Defect Density: Measures the number of defects per unit of code
or per release.
·
Mean Time between
Failures (MTBF): Measures the average time a
software system is expected to operate without failures.
·
Mean Time To Repair
(MTTR): Measures the average time it takes to fix a
defect or failure.
·
Test Coverage: Measures the percentage of code that is executed
during testing.
·
Deployment Frequency: Measures how often new code is deployed into
production.
·
Lead Time for
Changes: Measures the time it takes to deploy a
change.
·
Change Failure Rate: Measures the percentage of code changes that
require hot fixes or remediation after deployment.
· User Satisfaction: Measures the satisfaction of users with the software, often through surveys or feedback.
Why Are They Important?
● Track
progress and performance
● Identify
problems early
● Improve
planning and estimation
● Enhance
product quality
● Support
decision-making
● Justify
process improvements
Scope of Software Metrics
1.
Project
Management
○
Tracks
time, cost, schedule, and progress.
○
Metrics:
Effort hours, schedule variance, burn-down charts.
2.
Software Development
○
Measures
code quality, complexity, and maintainability.
○
Metrics:
Lines of Code (LOC), cyclomatic complexity, code churn.
3.
Testing &
Quality Assurance
○
Evaluates
software reliability and defect levels.
○
Metrics:
Defect density, test coverage, mean time to repair.
4. Process Improvement
○
Monitors
and refines development processes.
○
Metrics:
Lead time, defect trends, process maturity.
5.
Team
Productivity
○
Assesses
team performance and workload balance.
○
Metrics:
Velocity, WIP, sprint completion rate.
6.
Customer
Satisfaction
○ Focuses on post-release performance and user experience.
Metrics: NPS, customer-reported bugs, response time.
Size-Oriented
Metrics
Size-oriented metrics
measure software based on the size of
its code or functionality, often in terms of lines or components. Size-oriented
metrics reflect the overall size of the software.
These metrics are used to estimate the size of a
software project and can be used to derive other metrics like productivity.
Example: Lines of code (LOC) is a common example, where a line of code is defined as one line of text in a source file.
Common
Size-Oriented Metrics:
1.
Lines of Code
(LOC):
Total number of lines in the codebase
(including or excluding comments).
2.
KLOC:
Thousands of lines of code; used for larger
projects.
3.
Cost per LOC:
Cost to develop each line of code.
4.
Defects per
KLOC:
Number of bugs per 1,000 lines of code.
5.
Productivity =
LOC / Person-month:
Measures developer productivity.
Function-oriented
metrics
Function-oriented metrics assess the system's functionality from a user's
perspective, considering what they request and receive.
Function
Points (FP)
Function-oriented metrics is determined by counting the number of inputs, outputs, queries, internal files and external files in the system and adjusting that total for the functional complexity of the system.
Advantages of Function Points (FP)
FP provides a way to estimate development effort, predict project completion time, and compare different software projects.
Normalization Value:
Function-oriented metrics can be used to normalize
other quality and productivity measures, such as defects per function point.
Function Points estimate the amount of functionality in a system by
evaluating:
1. External Inputs (EI)
– Data entering the system
2. External Outputs (EO)
– Data leaving the system
3. External Inquiries (EQ)
– User interactions with no data update
4. Internal Logical Files (ILF)
– Internal data stores
each is assigned a weight (low,
average, high) to compute the total Function
Point Count.
Based
on |
Lines
of Code |
User-visible
functionality |
Metric
Example |
LOC,
KLOC |
Function
Points (FP) |
Language
Bias |
Yes |
No |
Accuracy |
Low
for early phases |
High
for early estimation |
Software
Metrics Data Collection
Data Collection
The quality of any measurement program
is clearly dependent on data collection. Data collected
can be into simple charts and graphs so
that the managers can understand the progress and problem of the development.
Data collection is also essential for scientific
investigation of relationships and trends.
Steps
in Data Collection
1.
Define
Objectives
➤
what do you want to measure? (e.g., code quality, productivity, defects)
2.
Select Metrics
➤
Choose relevant metrics (e.g., LOC, Function Points, Defect Density)
3.
Choose Data
Sources
➤
Common sources include:
○
Version
control systems (Git, SVN)
○
Issue
trackers (JIRA, Bugzilla)
○
Code
quality tools (SonarQube)
○
Test
tools (JUnit, TestRail)
4.
Set Up Tools
& Automation
➤
Automate data collection using CI/CD pipelines or plugins to reduce manual
errors.
5.
Collect Data
Consistently
➤
Ensure data is collected at regular intervals (e.g., per sprint, weekly)
6.
Validate &
Clean the Data
➤
Check for inaccuracies, or inconsistencies.
➤ Use dashboards, spreadsheets, or BI tools for visualization and trend analysis.
Analyzing Software Metrics Data
After collected
software metrics, analysis helps
turn raw numbers into actionable
insights for improving performance,
quality, and decision-making.
Analyzing software data
this process helps in identifying
problems, tracking progress, and making informed decisions throughout the
software development lifecycle.
Key
Areas of Software Data Analysis
· Project Management: Analyzing data related to
project schedules, tasks, resources, and budget.
· Software Development: Monitoring
code quality, code coverage, and testing metrics.
· Requirements Management: Tracking
requirements, changes, and their impact on the project.
· Testing and Quality Assurance: Analyzing test
results, defect reports, and bug tracking data.
1.
Define Goals
○
What
are you trying to find out? (e.g., Is the team productive? Is the codebase
improving?)
2.
Organize the
Data
○
Sort
by time, module, team, or phase.
○
Use
graphs, charts, or tables for clarity.
3.
Compare Against
Benchmarks
○
Use
industry standards, historical data, or project baselines for context.
4.
Look for Trends
and Patterns
○
Identify
improvements, declines, or anomalies.
○
Example:
Rising defect density over sprints = possible quality issue.
5. Correlate Metrics
○
Combine
data for deeper insights.
○
Example:
High LOC + low test coverage = potential risk area.
6.
Identify Root
Causes
○
Use
tools like cause-effect analysis, Pareto charts, or 5 Whys to dig deeper.
7. Take Action
Suggest improvements, adjust workflows, or reassign resources based on the findings.
Benefits
of Analyzing Software Data:
·
Improved
Project Outcomes:
Data-driven
decision-making can lead to better project outcomes, including reduced costs,
improved quality, and faster delivery.
·
Increased
Efficiency:
By
identifying and addressing problems early, teams can work more efficiently and
effectively.
·
Better
Resource Management:
Analyzing
data helps optimize resource allocation and ensure that the right people are
assigned to the right tasks.
·
Enhanced
Communication and Collaboration:
Data-driven insights can improve communication and collaboration between team members and stakeholders.
🔧 Common Tools for Analysis
●
Excel / Google
Sheets
– for charts, pivot tables, basic analysis
●
Power BI /
Tableau
– for interactive dashboards
●
JIRA Reports – for Agile
metrics
●
SonarQube – for code
quality trends
●
Git Analytics
tools
– like GitPrime, Waydev
0 comments:
Post a Comment