GMetrics - GMetrics - Home

GMetrics

##### General

- Home
- Downloads
- Javadocs
- SourceForge Project

##### Running

- Ant Task Usage
- Other Tools/Frameworks

##### Using

- Creating a MetricSet
- The Default MetricSet

##### Reports

- BasicHtmlReportWriter
- SingleSeriesHtmlReportWriter
- XmlReportWriter
- Sample Reports

##### Metrics

- ABC
- AfferentCoupling
- ClassCount
- ClassLineCount
- CoberturaBranchCoverageMetric
- CoberturaLineCoverageMetric
- CrapMetric
- CyclomaticComplexity
- EfferentCoupling
- FieldCount
- MethodLineCount
- MethodCount

## GMetrics

The GMetrics project provides calculation and reporting of size and complexity metrics for Groovy source code. GMetrics scans Groovy source code, applying a set of metrics, and generates an HTML or XML report of the results.

You can run GMetrics using the supplied Ant Task.

Total and average values for the following metrics are provided:

- Cyclomatic Complexity.
- ABC Size/Complexity. Also see the C2 Wiki page.
- Cobertura line coverage and Cobertura branch coverage
- CRAP - (Change Risk Anti-Patterns) score
- Afferent Coupling
- Efferent Coupling
- Lines per method
- Lines per class
- Number of classes per package
- Number of field per class

See the site navigation menu for a list of the metrics and reports provided out of the box by GMetrics.

Take a look at a Sample GMetrics Report.

### Requirements

The GMetrics project requires:

- Groovy version 1.7 or later
- Java 1.5 or later
- The Log4J jar, version 1.2.13 or later, accessible on the classpath.

### Getting GMetrics from the Maven2 Central Repository

For projects built using Maven, GMetrics is now available from the Maven Central Repository.

- groupId = `org.gmetrics`
- artifactId = `GMetrics`