Software Metrics

What Are Software Metrics?

Software metrics are an important aspect in determining software quality. You can use these metrics to determine when software is ready for production and for guidance at various stages in the development process. Monitoring software metrics is an important task in developing critical embedded software systems, especially systems that require certification.

Examples of software metrics include:

  • Comment density of a source file
  • Cyclomatic complexity
  • Number of lines, parameters, parameters, call levels, etc. in a function
  • Identified run-time errors in the software

Software metrics are instrumental in establishing software quality objectives for developing high-quality software. By establishing thresholds for specific software metrics, you can determine if your quality objectives have been met. When a threshold is either met or exceeded, QA teams can recommend that the software be promoted to the next stage of the development process.

You can use static analysis tools to automatically produce various software metrics. For example, you can:

  • Generate metrics for each version or build of the software
  • Use a web-based dashboard to monitor the metrics and drill down to the function level to obtain more detailed information
  • Apply thresholds to check if certain software quality objectives have been met

For details, see Polyspace® products.

See also: Static analysis with Polyspace products, verification, validation, and test, embedded systems