Introduction
  • Software metrics and models are important concepts and play a crucial role in software engineering; they are used to measure, evaluate, assess objectives, estimate, control, and improve software products and software-development processes.
  • Software metrics models enable better planning, control, and continuous improvement in software development.
  • Software metrics are collected and are finally used in Software metrics models to estimate or predict development effort, cost, quality, reliability, and schedule.
Definition
  • Software metrics are quantitative measures used to evaluate, control, and improve the software development process and the quality of software products. They help managers and developers make informed decisions, estimate effort and cost, monitor progress, and improve software quality.
  • Software metrics refer to numerical measures that quantify characteristics of software, software processes, and software products. In other words, a software metric is used to determine the degree to which a software system, component, process, or project possesses or completes a particular characteristic.
Characteristics
  • Software metrics are numerical measurements used to evaluate software quality, size, complexity, productivity, cost, performance, and development progress. For example – 

Number of lines of code = 20,000
Number of defects = 50
Development effort = 12 person-months
Testing coverage = 85%

  • Software Metrics provide a scientific and objective way to assess software development activities instead of relying on intuition.
Objectives
  • Software metrics are used to:
    • Estimate software size, development cost, development effort, and development time.
    • Measure or assess software quality and reliability.
    • Determine program complexity.
    • Measure programmer/team productivity.
    • Monitor project progress and productivity.
    • Identify defects and problem areas.
    • Improve software-development processes.
    • Compare actual project performance with planned performance.
    • Support project-management decisions.
    • Estimate maintenance requirements.
    • To support decision-making and risk management
    Types of Software Metrics

    Software metrics are commonly classified into –

    • Process metrics
    • Product metrics
    • Project metrics.
    Process Metrics
    • Process metrics are used to measure the effectiveness and efficiency of the software development process.
    • These metrics help organizations to improve the way software is developed. In other words, these metrics help organizations understand how well their development processes are performing and identify areas for improvement.
    • Product metrics help assess the quality and performance of the software itself.
    • Characteristics of Process Metrics
      • Focus on how software is developed
      • Help in process improvement
      • Support better project planning and control
    • Examples/Terms/Work done in Process Metrics
      • Defect Removal Efficiency (DRE): It measures how effectively defects are removed during development.
      • Process Yield: It gives the percentage of defects detected before software release.
      • Cycle Time: It is the time required to complete a development phase.
      • Productivity Metrics: It is the output produced per unit of effort (e.g., function points per person-month).
    Productivity= Software Size/Development Effort
    For example: 10,000 LOC/5 Person-Months =2,000 LOC/Person-Month
      • Review and Inspection Effectiveness: It measures the success of code and design reviews.
      • Average time required to fix a defect
      • Number of defects discovered during testing
      • Testing effectiveness
      • Development-cycle time
    • Importance of Process Metrics
      • Improve development efficiency
      • Reduce rework and development cost
      • Enhance the predictability of schedules
      • Support continuous process improvement
    Product Metrics
    • Product metrics measure the characteristics of the software product itself.
    • These metrics help evaluate the quality, performance, and maintainability of the final software system.
    • Characteristics of Product Metrics
      • It focuses on what is being developed
      • It is applied to both intermediate and final products
      • It is used to assess software quality
    • Examples/Terms/Work done in Product Metrics
      • Size Metrics: Lines of Code (LOC), Function Points (FP)
        • LOC measures the approximate size of software by counting the number of source-code lines.
        • LOC is simple, but it depends strongly on the programming language and coding style.
        • Function Point Analysis measures software size based on the functionality provided to the user rather than simply counting source-code lines. It considers features such as:
          • External inputs
          • External outputs
          • External inquiries
          • Internal logical files
          • External interface files
      • Program Complexity/Complexity Metrics: Cyclomatic Complexity
        • Cyclomatic complexity measures the logical complexity of a program based on its control-flow structure. A commonly presented formula is:
    V(G)=E−N+2P
    where:
    E = number of edges in the control-flow graph
    N = number of nodes
    P = number of connected components (often 1 for a single program/module)
        • Higher cyclomatic complexity generally indicates more independent execution paths and potentially more testing/maintenance effort.
      • Quality Metrics: Defect density (defects per KLOC/Number of defects)
        • Defect density measures defects relative to software size.

    Defect Density=Number of Defects/Software Size

    For example, if software contains 20 defects in 10 KLOC: 20/10=2
    So the defect density is: 2 defects/KLOC.
      • Reliability Metrics: Mean Time to Failure (MTTF)
      • Maintainability Metrics: Code modularity and documentation quality
      • Performance Metrics: Response time, throughput, memory requirements
      • Execution speed
      • Code coverage
    • Importance of Product Metrics
      • It helps in assessing software quality
      • It supports maintenance and enhancement decisions
      • It improves software reliability and usability
      • It enables comparison between different software versions.
    Project Metrics
    • Project metrics are concerned with the management and progress of a software project.
    • A project manager can use these measurements to determine whether a project is running according to schedule and budget.
    • Examples/Terms/Work done in Project Metrics:
      • Project cost
      • Development effort
      • Number of developers
      • Project duration
      • Schedule variance
      • Budget variance
      • Productivity
      • Number of completed tasks
      • Number of unresolved defects
    Software Metrics(Measurement) Model
    • A software measurement model is a simplified mathematical, conceptual, or empirical representation used to provide structured ways to understand, estimate, analyze, control, and predict software attributes such as size, cost, effort, time, and quality during the development of a project or software system.
    • A software model is a simplified mathematical, conceptual, or empirical representation used to understand, estimate, predict, or control some aspect of a software system or development project.
    • Software Models can be used for estimating:
      Cost → Effort → Schedule → Reliability → Quality → Performance
    • Examples of some common Software Measurement Models
      • LOC (Lines of Code)Metrics/Model
        • This model measures software size based on the number of lines of source code.
      • Function Point (FP)Metrics/Model
        • This model measures software size based on functionality provided to the user.
      • COCOMO (Constructive Cost Model)Metrics/Model
        • This model estimates effort, time, and cost based on software size and complexity.
        • It was developed by Barry Boehm and is used to estimate software-development effort and schedule based on software size and other project characteristics.
        • The original COCOMO model is commonly distinguished into three levels.
          • Basic COCOMO
            • This level uses mainly software size (KLOC) and development mode to estimate effort and schedule. It is simple but does not consider many detailed project characteristics.
          • Intermediate COCOMO
            • This level adds cost drivers to the basic size-based calculation. Cost drivers represent characteristics related to the product, hardware/computer environment, personnel, and project.
          • Detailed COCOMO
            • This level extends the intermediate approach by considering the influence of cost drivers across different phases of the software-development life cycle.
        • The original COCOMO distinguishes three project modes:
          • Organic Mode: This mode is for relatively small and straightforward projects developed by experienced teams in familiar environments.
          • Semi-detached Mode: This mode is for intermediate projects involving a mixture of experience levels and moderate complexity.
          • Embedded Mode: In this mode, projects are developed under strong hardware, software, operational, or regulatory constraints.
          • The basic effort equation of Basic COCOMO is generally expressed as:
    E=a(KLOC)b
    where,
    E = effort in person-months
    KLOC = thousands of lines of source code
    a, b = constants depending on project mode

    And development time is estimated using:

    D=c(E)d
    where,
    D = development time
    E = estimated effort
    c, d = model constants
      • Halstead’s Software Science Metrics/Model
        • This model uses operators and operands to estimate program complexity and effort.
      • Putnam Model
        • The Putnam model is another software estimation model.
        • It relates software size, development effort, and development time and is associated with the Rayleigh distribution of staffing/effort over the project life cycle.
        • It is particularly concerned with the relationship between:

    Software Size + Development Time + Development Effort = Project Estimation

      • Software Reliability Models
        • Software reliability models attempt to estimate or predict the probability of software operating without failure for a specified period under specified conditions.
        • They can use information such as:
          • Number of failures
          • Failure occurrence times
          • Testing time
          • Defect discovery/removal
          • Operational usage
        • Reliability measurements can include MTTF (Mean Time To Failure) and failure rate.
      • Quality Models
        • Software quality models organize important characteristics used to evaluate software quality.
        • Quality models help developers and organizations systematically evaluate whether software meets required quality objectives.
        • Some common characteristics include:
          • Functional suitability
          • Reliability
          • Performance efficiency
          • Usability
          • Security
          • Maintainability
          • Compatibility
          • Portability

    Loading


    0 Comments

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    This site uses Akismet to reduce spam. Learn how your comment data is processed.