This is such a nice summary of setting up the SVN sensor, I figured it needed wider
distribution. :-)
Cheers,
Philip
------------ Forwarded Message ------------
Date: Monday, November 20, 2006 1:42 PM -1000
From: Robert Brewer <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: [ICS413-L] Hackystat and svn metrics
Team Aqua finally got our per-team-member svn Hackystat metrics working
correctly. Here
are the basic steps to get it working. I'm assuming you are starting with an
svn.build.xml file from one of our previous assignments.
0) Assign someone to be in charge of submitting svn commit data. The project
manager
might be a logical choice, but whoever it is, you probably only want one person
doing
this.
1) Create a usermaps.xml file. Hackystat needs a way to map from Google Code
svn account
names to Hackystat keys. This is done using the usermaps.xml file. The easy way
to build
it is to run the hackyInstaller.jar and select File->Manage usermaps.xml file.
Add each of the members of your team to the Usermap. The "Tool" field should be
"SVN" for
each one, the account name should be the username part of your gmail account
(like
"rbrewer"), and the User Key should be that string of letters and numbers that
you get
when you first signed up for Hackystat. Once you have entered them, click the
Validate
All Keys button to make sure you entered all the keys properly.
2) Modify svn.build.xml file to match your project. You can check out our Team
Aqua one
as an example if you like:
<http://traffometer-sim-aqua.googlecode.com/svn/trunk/svn.build.xml>
One thing that appears to be crucial: don't set use the
defaultHackystatAccountKey
parameter. I found that if this was set then I would have problems submitting
the data.
If you usermaps.xml file is set up properly, then you shouldn't need a default
anyway.
If you haven't been submitting svn metrics, then you probably want your first
run to have
the fromDate and toDate attributes set to cover a big range of dates. Be
prepared for a
long wait, on my system the svn sensor is really slow (like 20 minutes to
handle several
days of commits).
If you feel nervous, set the verbose attribute to true and the debug attribute
to true as
well. This will display the entries it would submit, but won't submit any data.
3) Now that you have submitted data, you need to make sure the Hackystat
workspace root
is set properly for each member of the team. In order to get any stats
regarding files,
presumably each team member has set up their own workspace root properly.
However, the
svn commit data will all come from the workspace of the person running the svn
sensor, so
each team member has to add the workspace root of the svn sensor runner to
their list of
workspace roots. This step is key: until you do it the memberProcessReport will
show
commit data only for the svn sensor runner, and 0 for everyone else.
4) Once you have things running, the svn sensor person should run it once
daily, and by
default (if there are no fromDate or toDate attributes) it looks at all commits
from the
previous day. Remember to run it in both the TraffoSim and TraffoBase project
directories! If you have a machine that stays on all the time, you could set up
a cron
job or something so the svn sensor runs automatically.
The HackyStat reference manual has all the details:
<http://hackydev.ics.hawaii.edu/hackyDevSite/external/docbook/ch25s27.html>
---------- End Forwarded Message ----------