--On Wednesday, November 10, 2004 12:20 PM -0700 Tim Shadel <[EMAIL PROTECTED]> 
wrote:

On Wed, 10 Nov 2004 08:55:33 -1000, Philip Johnson <[EMAIL PROTECTED]> wrote:
Hi Aaron,

Yes, that's an excellent, excellent idea, and in fact that's pretty much 
exactly what
the hackyMaven project is intended to support. The idea is that Maven-generated 
project
websites would (a) run analyses during construction that send data to a 
hackystat
server, and then (b) suck charts from Hackystat and display them in a 
reasonable place
on the project website.

Given that we don't use Maven, at least not yet, it might be nice for us to hack
something together for hackydevsite. Maybe we can adapt the telemetry viewer 
code to
simply download once  day a bunch of jpgs from the hackystat server, rename 
them to
something standard, and then build a static page that displays them?

That's exactly the approach I'm taking on hackyMaven. Since nearly all maven goals are truly rooted in Ant tasks, I'm developing a simple Ant task that should be able to download any type of analysis to a local directory. What you do with the .jpg or .html files (containing the client side map that puts labels over the data points) after the download is an open question.

Maven has a second step that generates a coherent project website.
During that phase I planned to put together the report with all of the
analyses.  I've been concentrating on the download portion thus far,
so I haven't jumped into the report design much.  It may also be an
Ant task that would assemble the pieces into a coherent document.
Maven often uses a specific DTD for XML docs it'll transform, but it
may be trivial to allow both a straight HTML or XML output.

That's my current working path.  What do you think?

--Tim

Sounds excellent! However, rather than create a completely generic analysis retriever (or perhaps as a wrapper over it), I would propose that you create an Ant task specialized to telemetry chart retrieval, since I think that is going to be the target analysis 99% of the time. It might look like the following:


<taskdef name="hacky-chart" classname="org.hackystat.app.maven.ant.HackyTelemetryChartRetriever"/>
<property file="${user.home}/.hackystat/sensor.properties"/>
<hacky-chart host="${HACKYSTAT_HOST}"
key="${HACKYSTAT_KEY}"
telemetrychart="ActiveTime-Member"
project="hacky2004-all"
intervaltype="Day"
intervalstart="01-Nov-2004"
intervalend="07-Nov-2004"
templatevalues="**"
outputfile="ActiveTime-Member-Last-Seven-Days.png">
</hacky-chart>


This would login to the host using the key, run the Telemetry Chart Analysis on the associated chart, project, interval, and template values, storing the resulting chart image in the file ActiveTime-Member-Last-Seven-Days.png. Note that the "Report Type" always defaults to "Chart", so that we know we have a file to download. Each time this example task runs, it will overwrite ActiveTime-Member-Last-Seven-Days.png with a new copy of the image (which is presumably what one would typically want to have happen).

Although I hardcoded the dates in this example, in reality the user would probably want to use the <tstamp> task to build the interval dynamically, to do things like make the start date <today minus seven days>, and the end date <today>. That's quite simple as well.

I think you'll find that implementing this is substantially easier than the general case, and will allow you to get an initial version of hackyMaven up and running more quickly. I also think this interface is easier to use and understand than a general Hackystat analysis invoker would be. Though this version of hackyMaven would be limited to retrieving individual Telemetry Charts at first, we might find that even this limited functionality satisfies everyone for quite a while.

Comments?

Cheers,
Philip







Reply via email to