Metrics Maintenance

From HaFrWiki
Jump to: navigation, search

The Maintenance metrics description as been used in the Omnext Source2Value tooling [1].

Omnext MI

MI3

Name/Item Description
Requirement: Source2VALUE shall measure the relative maintainability of the code by calculating the Maintainability Index (MI3).
Formula: MI3 = 171 - 5,2ln(aveV) - 0,23*aveV(g') - 16,2ln(aveLOC)
Where:
  • aveV = Halstead Effort to implement (HALVolume)
  • g (average CC) = Sum CC Methods / Sum Methods
  • aveLOC (average LOC) = Sum LOC Methods / Sum Methods
Rationale: The Maintainability Index is a known metric that's being used for calculating the maintainability of the software. It thereby helps reducing or reversing the system's tendency towards 'code entropy' or degraded integrity and to determine whether it's cheaper and/or less risky to rewrite the code than it is to change. The metric uses the lines of code measure, the McCabe CC measure and a Halstead measure which make it a important indicator of the complexity and size of the system.
Fit criterion: The MI3 value of the system component in the Source2VALUE Portal must be the same as the MI3 value that is calculated manually.
Testcase:
  1. Open the Source2VALUE Portal
  2. Search for a software component
  3. Check the MI3 value
  4. Check the MI3 formula and calculate the ' aveV', 'g' and 'aveLOC' (collect all the inputs like CC, HALVolume and LOC).
  5. Fill in the formula and calculate the MI3
  6. Compare the result with the value that is presented in the Source2VALUE Portal (Dashboard)

MI4

Name/Item Description
Requirement: Source2VALUE shall measure the relative maintainability of the code by calculating the Maintainability Index (MI4).
Formula: MI4 = 171 - 5,2ln(aveV) - 0,23*aveV(g') - 16,2ln(aveLOC) + 50.0sins(√(2.46perCM))
Where:
  • aveV = Halstead Effort to implement (HALVolume)
  • g (average CC) = Sum CC Methods / Sum Methods
  • aveLOC (average LOC) = Sum LOC Methods / Sum Methods
  • perCM = Comment / ((Comment + LOC) / 100
Rationale: The Maintainability Index is a known metric that's being used for calculating the maintainability of the software. It thereby helps reducing or reversing the system's tendency towards 'code entropy' or degraded integrity and to determine whether it's cheaper and/or less risky to rewrite the code than it is to change. The metric uses the lines of code measure, the McCabe CC measure, a Halstead measure and the comment lines measure, which make it a important indicator of the complexity and size of the system.
Fit criterion: The MI4 value of the system component in the Source2VALUE Portal must be the same as the MI4 value that is calculated manually.
Testcase:
  1. Open the Source2VALUE Portal
  2. Search for a software component
  3. Check the MI4 value
  4. Check the MI4 formula and calculate the ' aveV', 'g', 'aveLOC' and 'perCM'. (collect all the inputs like CC, HALVolume, LOC and comment lines).
  5. Fill in the formula and calculate the MI4
  6. Compare the result with the value that is presented in the Source2VALUE Portal (Dashboard)

See also

top

References

top

  1. Omnext, Home page