Getting Entity Metrics

Metric values associated with a specific entity are available for Understand::Ent objects.

The command $ent->metrics() returns a list of all available entity metric names. The command $ent->metric(@mets) returns a list of values for specific metrics.

# lookup a specific metric 
foreach $func ($db->ents("Function")) { 
   $val = $func->metric("Cyclomatic"); 
   # only if metric is defined for entity 
   print $func->name()," = ",$val,"\n" if defined($val); 
} 

See $ent->metrics() for detailed information.


Scientific Toolworks, Inc.
http://www.scitools.com