Panopticode is back under active development!
Keep up to date with the latest Panopticode news at Java-Metrics.com.
Java-Metrics.com will provide reviews of commercial and open source metrics tools as well as educational articles and videos for how to select, collect, analyze, and report on metrics most effectively.
panopticon:
- An optical instrument or device; a mechanical peep-show offering views of European capitals, etc., for public entertainment.
- A circular prison with cells arranged around a central well, from which inmates can be observed at all times.
- A place where all is on display; a public exhibition hall or showroom.
source: Oxford English Dictionary
panopticode:
- A project dedicated to making code metrics so widely understood, valuable, and simple that their use becomes ubiquitous, thus raising the quality of software across the industry.
The Panopticode project provides a set of open source tools for gathering, correlating, and displaying code metrics.
The Good
There is a rich selection of tools available to the Java community for gathering code metrics. These tools can be invaluable for tasks such as:
- Prioritizing refactoring and redesign work
- Understanding unfamiliar or large code bases
- Ensuring coding standards are being followed
- Evaluating software quality
- Informing extend -vs- rewrite decisions
- Proving that contractual obligations have been met
- Comparing competing tools
The Bad and The Ugly
While these tools are powerful they suffer from a number of problems such as:
- Installation and configuration can be difficult and time consuming
- Most only measure the status at a point in time and have no concept of historical data
- Each tool represents its data in a proprietary format
- It is very difficult to correlate data from different tools
- It can be difficult to switch between competing tools that provide similar functions
- Most have extremely limited reporting and visualization capabilities
The Solution
The Panopticode project was conceived to address all of the concerns above.
It provides a set of Ant build files to simplify configuring many of the most popular tools. Setting up a project can be as simple as:
- Download and extract Panopticode in your project's home directory
- Copy the PROJECT_HOME/panopticode/build-example.xml file to PROJECT_HOME/build.xml
- edit the PROJECT_HOME/build.xml to specify your classpath and source code directory.
- (optional) Select your source code management tool in the PROJECT_HOME/panopticode/panopticode-imports.xml
The whole thing can be easily done in 5 minutes. If you have a fast internet connection you could probably pull it off in 2 minutes :)
Now when you run your build using the metrics target you will get:
- Emma - Unit test code coverage. By changing one line in your build file this can be switched to Cobertura.
- CheckStyle - Validates that your code follows Sun's standards for Java. If you want to use a different set of rules you only need to change one parameter in your build file.
- JDepend - Sophisticated OO quality metrics and package dependency checking.
- JavaNCSS - Cyclomatic Complexity and size (NCSS) metrics.
- Volatility - Measure change within your projects. Currently this only works with Subversion, but support for other SCM repositories is planned.
- Duplicate Code - Using Simian. NOTE: If your project is not open source you must purchase a license for Simian after your free 15 day trial.
- Panopticode Aggregator - Generates an XML file that integrates ALL of the information gathered above
-
Panopticode Reports
- Powerful visualizations, such as TreeMaps, that allow you to see the overall picture and an amazing amount of detail in a single view.
- Metric Correlation
- Historic Data
NOTE: In the current version (0.1) Only JDepend, Emma, and JavaNCSS metrics are integrated into the panopticode.xml file. However, all other metrics listed are gathered.
In the time you have spent reading this you could already be using Panopticode, so why don't you go download and try it. After you've played with it a bit you might want to check out the documentation to learn how to customize and extend Panopticode.
If you have any questions or ideas for Panopticode, or need any help, please let us know.
Sponsors:
ThoughtWorks - Project Lead's Employer

SourceForge - Project Hosting
