Version 4 (modified by JoelSherrill, on Mar 17, 2009 at 8:02:29 PM) (diff)

Add Issues

RTEMS Code Swarm

Code Swarm is a tool which visualizes project commit history. It can produce some very cool and interesting output.

Thanks to Peter Burns (a.k.a rictic) for fixing bugs and providing guidance during this. He was most supportive.

Running Code Swarm

#download and extract
curl -L > code_swarm.tar.gz
tar -xzf code_swarm.tar.gz
mv rictic-code_swarm-*/ code_swarm

#add the bin directory to your path

#convert the CVS log -c activity.log > log.xml
#get a code_swarm config file (I'd eventually like to remove this step)
cp code_swarm/bin/config.template rtems.config
#run code_swarm on the config file
code_swarm -c rtems.config

At this point, you will have a subdirectory in the code_swarm tree named code_swarm_frame with a lot of .png files. Following the instructions for Generating a Video, I used this command to generate the movie.avi file.

mencoder mf://*.png -mf fps=24:type=png -ovc lavc -oac copy -o movie.avi

If that results in a file that is too large, read the Wiki and try the other alternatives.

This takes between 90 minutes and 6 hours on the RTEMS activity log depending on how many frames per day you generate. At 2 frames per day, it is about 90 minutes and at 6, it is ~6 hours.

Open Issues

RTEMS has a history of having many submitters and few committers. Code Swarm uses the committer user Id. It would be nice if it could make a distinction between author and submitter and show the extra level of activity. Since from 1995 to 2002, JoelSherrill committed nearly all submissions, this looks very bad in the RTEMS video. During this period, to identify just one submitter, Eric Norum submitted the TCP/IP stack, termios, a handful of BSPs and other code. This is simply not reflected.

Text for Video

The video shows periods of high and low activity. On the videos from other projects, there are subtitles indicating what actually happened in the project at that time.

  • beginning until non-OAR committers added - need date
  • early 1997
  • June 1997
  • October 1997

Committers and their first commit:

  • joel, Joel Sherrill - 11 May 1995
  • jmj, Mark Johannes - 24 May 1996
  • wade, ? - 10 August 1998
  • jennifer, Jennifer Averrett, 2 September 1998
  • ralf, Ralf Corsepius - 16 June 2002
  • ericn, Eric Norum - 13 September 2002
  • ccj, Chris Johns - 31 October 2002
  • jtm, Jay Monkman - 17 July 2004
  • gregmenke, Greg Menke, 6 December 2004
  • strauman, Till Straumann - 12 January 2006
  • loki, Philippe Simons - 7 July 2005
  • richard, Richard Campbell - 16 September 2005
  • thomas, Thomas Doerfler - 29 September 2005
  • humph, Glenn Humphrey - 10 October 2007

RTEMS Configuration File

You can try enabling OpenGL support and see if it works for you.

# This is a sample configuration file for code_swarm

# Input file

# Optional Method instead of MillisecondsPerFrame

# OpenGL has problems on some platforms.  We're closer to having it work 
# automatically out of the box, but not close enough to enable it by default

# Color assignment rules
# Keep in order, do not skip numbers. Numbers start
# at 1.
# Pattern:  "Label", "regex", R,G,B, R,G,B
# Label is optional.  If it is omitted, the regex
# will be used.
ColorAssign1="Tests",".*test.*", 90,225,90, 110,200,90
ColorAssign2="Build Infrastructure",".*config.*|.*Make.*|.*cfg", 198,229,255, 178,209,235
ColorAssign3="Ports",".*score/cpu.*", 90,225,225, 110,200,200
ColorAssign4="BSPs",".*libbsp.*|.*libcpu.*|.*libchip.*", 30,144,255, 10,124,235
ColorAssign5="Source Code",".*(\.py|\.rb|\.erb|\.hs|\.sql|\.[sSchd]|\.cpp|\.cc|\.m|\.js|\.pl|\.sh|\.java|\.lhs|\.hi|\.ad[abs])", 225,90,90, 200,90,110
ColorAssign6="Documents/Images",".*(\.txt|\.html|\.tex|\.t|\.texinfo|\.texi|\.tmpl|\.css|\.xml|\.yml|\.json|\.png|\.jpg|\.gif|\.jpeg|README|COPYING|LICENSE|AUTHORS)", 90,90,225, 90,110,200

# Save each frame to an image?

# Where to save each frame

#Is the input xml sorted by date?  It's faster and uses much less memory if it is
#  - All of the given scripts for producing repository xml files produce sorted data
#  - Please file a bug if one doesn't

# Uncomment to not use avatars