Class MetricsUtils::JavaMetrics
In: metrics_utils.rb
Parent: Object

This class parses the text output of the ckjm program and stores the data points.

Methods

metric_desc   metrics   new  

Public Class methods

Initializes this instance with the name of the text file containing the output of the ckjm program.

Public Instance methods

Returns string description corresponding to sym; raises ArgumentError if sym unknown. Valid values for sym are :wmc, :dit, :noc, :cbo, :rfc, :lcom, :ca, and :npm.

Computes the distribution of the 8 ckjm metrics by counting how many classes fall into a bucket with a specific metric value. Buckets are just individual metric values, (e.g. 1, 2, 3 for DIT). Returns the distribution as a hash of hashes:

  { metric_sym => { metric_value => count } }

Example:

  { :wmc => { 7 => 134 } }

[Validate]