Nada
Keheliya Gallaba
WSO2 Inc.
Why collect metrics?
●
You cannot improve what you don’t measure
●
What you don’t measure, you cannot prove
●
Broken Window TheoryWhat to do?
●
Prevention is the best medicine
●
Planning and Prioritizing
●
Technical Debt Resolution
What to monitor?
Duplicated code
Coding standards
Unit tests
Complex codePotential bugs
Comments
Design and architecture
How to monitor?
●
Sonar Dashboard
–
–
–
–
Lines of code
Code Complexity
Code Coverage
Rules Compliance
●
Time Machine
●Clouds & Hot spots
Demo
Metrics - Rules
●
Violations
–
●
New Violations
–
●
Number of new violations with severity xxxxx, xxxxx being blocker, critical,
major, minor or infoWeighted violations
–
–
●
Number of violations with severity xxxxx, xxxxx being blocker, critical, major,
minor or info
New xxxxx violations
–
●
Total number of new violationsxxxxx violations
–
●
Total number of rule violations
Sum of the violations weighted by the coefficient associated at each priority
(Sum(xxxxx_violations * xxxxx_weight))
Default Weights:INFO=0;MINOR=1;MAJOR=3;CRITICAL=5;BLOCKER=10
Rules compliance index (violations_density)
–
100 - weighted_violations / Lines of code * 100
Metrics - Size
●
Physical lines
–
●Comment lines
–
●
Number of commented-out lines of code. Javadoc blocks are not scanned.
Lines of code (ncloc)
–
●
Number of javadoc, multi-comment and single-comment lines. Emptycomment
lines like, header file comments (mainly used to define the license) and
commented-out lines of code are not included.
Commented-out lines of code
–
●
Number of carriage returnsNumber of physical lines of code - number of blank lines - number of comment lines
- number of header file comments - commented-out lines of code
Density of comment lines
–
–
Number of comment...
Regístrate para leer el documento completo.