Visualizing Build ProcessesJune 29, 2010 — Eric Melski
The other day I was waiting for my continuous integration build to finish. Think about that a minute. See anything wrong with that statement? I was waiting for a continuous integration build to finish. The whole point of continuous integration is to detect integration errors as quickly as possible. After years of growth, our builds are too long to really live up to that definition.
Obviously I have to do something about this, but what? Where do I start? The build is composed of several distinct phases: checkout, compile, unit test, package, install and system test. In addition, the complete process is actually replicated on several platforms simultaneously. In total, the process encompasses over 200 distinct steps, running in parallel on dozens of machines.
Fortunately, ElectricCommander tracks the duration of every step in the process, so I can find the “long pole” and focus my efforts there:
Unfortunately, with hundreds of steps it’s not at all practical to work with the data in this format. What I need is something that allows me to visualize the build process, so that I can see at a glance where the time is going. So I created the Plotter Plugin for ElectricCommander (click to view full-size):
Now instead of digging through hundreds of lines of timing information, I can see immediately where the problems are. Briefly, here’s what you’re looking at in this image:
- Each colored box represents a single step in the build process.
- Hovering over a box will display the name of the step.
- Clicking on a box will load the Commander “Job Step Details” page for that step.
- Boxes are colored according to the outcome of the step (red, yellow or green, corresponding to failure, warning or success, respectively).
- Boxes are positioned horizontally according to the start time of the step relative to the start time of the entire process. The correlary to this is that steps that are running in parallel “line up” vertically, at least in part.
- Steps which run subprocedures are not colored, and use a dashed outline to group the child steps.
In my case, the first problem is the two large, serialized steps near the top of the image, which correspond to execution of our system test suites on Windows. Now armed with this information, I can make intelligent decisions about how to improve my end-to-end build time.
If you want to try the Plotter Plugin, make sure you’re running ElectricCommander 3.5 or later, then download the plugin from our public plugin repository, and use
ectool installPlugin to install it. If you’re not currently using ElectricCommander, you can get an evaluation copy.