Skip to content

luque/dm-metrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DMMetrics

Build Status Coverage Status

DMMetrics is a library to compute Robert C. Martin's dependency management metrics for packages in Pharo.

DMMetrics is written and supported by Rafael Luque and other developers at OSOCO.

Description

DMMetrics computes the following metrics for your Smalltalk packages:

  • Stability metrics:

    • Afferent Couplings (Ca): The number of classes outside a given package that depend on classes within that package.
    • Efferent Couplings (Ce): The number of classes inside a given package that depend on classes outside that package.
    • Instability (I): equation
  • Abstraction metrics:

    • Number of classes (Nc): The number of classes in the package.
    • Number of abstract classes (Na): The number of abstract classes in the package. An abstract class is a class with at least one abstract method.
    • Abstractness (A): equation
  • The Main Sequence:

    • Distance to the main sequence (D): equation
    • Normalized distance to the main sequence (D'): equation

Install DMMetrics

To install DMMetrics on your Pharo image you can just execute the following script:

    Metacello new
    	githubUser: 'luque' project: 'dm-metrics' commitish: 'master' path: 'src';
    	baseline: 'DMMetrics';
    	load

To add DMMetrics to your own project's baseline just add this:

    spec
    	baseline: 'DMMetrics'
    	with: [ spec repository: 'github://luque/dm-metrics:master/src' ]

Note that you can replace the #master by another branch as #development or a tag.

Getting started

To compute the dependency metrics for a collection of packages you can execute the following in a Playground:

    packages := RPackageOrganizer default packages select: [:p | 'ProfStef*' match: p name].
    (DMMPackageGroupVisualizations onPackages: packages) build open

This code will show you an inspector on the DMMPackageGroupVisualizations with the following tabs:

DM Metrics

Inspector on DMMPackageGroupVisualizations - DM Metrics Tab

Distances to Main Sequence

Inspector on DMMPackageGroupVisualizations - Distances to Main Sequence Tab

Package Dependencies

Inspector on DMMPackageGroupVisualizations - Package Dependencies Tab

About

Robert C. Martin's packages dependency management metrics for Pharo.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published