Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Hopefully-meaningful metrics

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 template
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 turbulence.gemspec
Octocat-spinner-32 win_rakefile_location_fix.rb
README.md

Hopefully-meaningful Metrics

Based on Michael Feathers' recent work in project churn and complexity.

Here is how to read the graph (extracted from the above article):

  • The upper right quadrant is particularly important. These files have a high degree of complexity, and they change quite frequently. There are a number of reasons why this can happen. The one to look out for, though, is something I call runaway conditionals. Sometimes a class becomes so complex that refactoring seems too difficult. Developers hack if-then-elses into if-then-elses, and the rat’s nest grows. These classes are particularly ripe for a refactoring investment.

  • The lower left quadrant. is the healthy closure region. Abstractions here have low complexity and don't change much.

  • The upper left is what I call the cowboy region. This is complex code that sprang from someone's head and didn't seem to grow incrementally.

  • The bottom right is very interesting. I call it the fertile ground. It can consist of files that are somewhat configurational, but often there are also files that act as incubators for new abstractions. People add code, it grows, and then they factor outward, extracting new classes. The files churn frequently, but their complexity remains low.

Installation

$ gem install turbulence

Usage

In your project directory, run:

$ bule

and it will generate (and open) turbulence/turbulence.html

Supported SCM systems

Currently, bule defaults to using git. If you are using Perforce, call it like so:

$ bule --scm p4

You need to have an environment variable P4CLIENT set to the name of your client workspace.

WARNING

When you run bule, it creates a JavaScript file which contains your file paths and names. If those are sensitive, be careful where you put these generated files and who you share them with.

Something went wrong with that request. Please try again.