290 likes | 397 Views
A “Software ICU” for assessing and maintaining software project health. Philip Johnson Collaborative Software Development Laboratory Information and Computer Sciences University of Hawaii Honolulu HI 96822. Medical ICUs & Vital Signs.
E N D
A “Software ICU” for assessing and maintaining software project health Philip Johnson Collaborative Software Development Laboratory Information and Computer Sciences University of Hawaii Honolulu HI 96822
Medical ICUs & Vital Signs • Intensive care units are designed to monitor patient health via “vital signs” • Temperature • Heart (pulse) rate • Blood pressure • Respiration • (and others, depending on particular patient) • Why are vital signs interesting? • Vital signs in a “healthy” patient are “normal” or “improving” • Change in one vital sign may or may not be significant. • Change in multiple vital signs is almost certainly significant. • In an ICU, vital signs monitored automatically and continuously.
ICU Vital Signs Instrumentation Current Values Recent History and Trends
Characteristics of a “healthy” development project • High efficiency: • Software development proceeds “as fast as possible, but no faster” • Don’t sacrifice quality for speed. • High effectiveness • Effort is focused on most important issues. • Minimal re-work. • High quality • Software conforms to specifications. • Software can be easily installed, adapted, maintained.
Software Project “Vital Signs” • ICS SE “vital signs” for a “healthy” project include: • Everyone works consistently; • Everyone works equally; • Code is committed consistently; • Progress is regular; • Quality remains high; • No last minute “rush” to finish; • Up to now, vital signs were assessed informally: • Blog entries about project • Hudson failures • These are not necessarily informative. Let’s look at some examples.
A Software ICU for ICS SE • Approach: Attach Hackystat software “sensors” to your development tools: • Eclipse • Ant • Hudson • Automatically gather “vital signs” about the state of your software project. • Display trends and current values of “vital signs” for all projects in ICS SE. • Learn which projects are “healthy” and (hopefully) how to improve health of those that aren’t.
Monitoring Project Vital Signs withHackystat Portfolio Analysis We will build our “Software ICU” using Hackystat Portfolio Analysis
Software ICU Concepts • Support 10 software vital signs: • Coverage, Complexity, Coupling, Churn, Builds, Code Issues, Commits, Unit Tests, Size, and Dev Time. • Show both current value and historical trend. • When possible for the vital sign: • Color the current value Red/Yellow/Green • Color the trend Red/Yellow/Green • Projects that are mostly green are “healthy”. • Projects that are mostly red are “sick”.
Vital Sign: Coverage • Measures percentage of code executed by tests. • A healthy project should have HIGH coverage. • Healthy: Above 90%; trend: stable or rising. • Unhealthy State: Below 40%; trend falling. • Tool to collect coverage: Emma
Vital Sign: Complexity • Measures the density of branches and loops in your code (called the “cyclomatic” complexity). • A healthy project should have LOW complexity. • Healthy: Average CC below 10; trend stable or falling. • Unhealthy: Average CC above 20; trend rising. • Tool to collect complexity: JavaNCSS
Vital Sign: Coupling • Measures the number of dependencies between classes: • How many classes are used by a class • How many classes does a class use? • A healthy project should have LOW coupling. • Healthy: average < 10; trend stable or falling • Unhealthy: average > 20; trend rising. • Tool to collect coupling: DependencyFinder.
Vital Sign: Churn • Churn is a measure of the lines of code added, deleted, and modified in a commit. • A healthy project should have LOW churn. • Healthy: Churn < 400 LOC; trend stable or falling. • Unhealthy: Churn > 900 LOC; trend rising. • Tool to collect churn: SVN
Vital Sign: Size • A measure of the amount of code in the system. • There is no general relationship between size and health! • Tool to collect size information: SCLC
Vital Sign: DevTime • A measure of the time spent by developers editing their source code. • A healthy project will “regular and equal participation” by developers w.r.t. DevTime. • Tools to collect DevTime: Eclipse, Ant.
Vital Sign: Commits • Measures the number of commits to the repository made by developers. • A healthy project will “regular and equal participation” by developers w.r.t. Commits. • Tool to collect commits: SVN
Vital Sign: Builds • Measures the number of builds of the system made by the developers and/or CI system. • A healthy project will “regular and equal participation” by developers w.r.t. Builds • Tool to collect build info: Ant
Vital Sign: UnitTests • A measure of the number of unit tests invoked on the system. • A healthy project will “regular and equal participation” by developers w.r.t. Unit tests. • Tool to collect test information: JUnit
Vital Sign: Code Issues • Code Issues is a measure of the number of warnings generated by QA tools like Checkstyle, FindBugs, PMD. • A healthy project should have LOW Code Issues. • Healthy: Code Issues < 10; trend stable or falling. • Unhealthy: Code Issues > 30; trend rising. • Tool to collect churn: Checkstyle, FindBugs, PMD • In the class, code issues must be ZERO, so this vital sign is not displayed.
Things to note • Color of current state and trend are generated independently: • A single “red” indicator is weak evidence of project dis-health. But many red indicators provide stronger evidence of problems:
Drilling down for details • Software ICU provides an overall perspective. • How to make a “diagnosis”? • Get “telemetry” • Get “DailyProjectData”
Drilling Down: Telemetry Click any trend histogram to display “telemetry” with more details. This one shows a break-down of DevTime by project member.
Drilling Down: DPD DailyProjectData analysis can provide a breakdown of how the current value was computed. This shows there are 20 highly coupled classes in the hackystat-analysis-dailyproject data project.
Drilling Down: DPD Clicking a link shows the files in the specified category of coupling.
A Software ICU for ICS SE • Your remaining development will be supported by a Software ICU for all the projects in this class. • To do this, you must: • Read the Hackystat tutorials. • Download and install the Eclipse sensor. • Download and install Ant sensors. • Update your *.build.xml files. • Define a Hudson <project>-daily-build task • Define a Hackystat project for your group. • Run Portfolio analyses to see how your project is doing.
ICS SE Software ICU goals • Get a better sense for the “health” of your group’s development process. • More easily see how your project health compares to other projects in the class. • Be able to identify unhealthy trends easier and earlier. • However, it’s still up to you to take action!