Excellent progress, Aaron!

I will play with this further on Monday. Looks great so far. It will be interesting to see if the speed advantage of Emma increases, decreases, or stays the same over JBlanket as we add more modules.

Cheers,
Philip

--On Saturday, November 5, 2005 12:02 AM -1000 Aaron Kagawa <[EMAIL PROTECTED]> wrote:

Hey Guys,

I've committed a couple of files for emma to hackyCore_Build:
- hackyCore_Build\emma.build.xml
- hackyCore_Build\modules.build.xml
- hackyCore_Build\lib\ant\emma.jar
- hackyCore_Build\lib\ant\emma_ant.jar

Note: I'm still building these modules:
hackyCore_Kernel.available=true
hackyCore_Installer.available=true
hackyCore_Common.available=true
hackyCore_Report.available=true
hackyCore_Statistics.available=true
hackyCore_Telemetry.available=true
hackySdt_Activity.available=true


First lets take a look at execution times:
ant -q freshStart all.junit
Total time:
2 minutes 57 seconds

ant -q -f emma.build.xml hackyCore_Build.emma
Total time: 3
minutes 4 seconds

ant -q -f jblanket.build.xml hackyCore_Build.jblanket
Total time:
4 minutes 58 seconds


Emma is a lot faster.

Now, lets look at the reports:
http://csdl.ics.hawaii.edu/~kagawaa/emma/emma/coverage.html
emma method coverage    61% (2147/3541)

http://csdl.ics.hawaii.edu/~kagawaa/emma/jblanket/index.html
jblanket method coverage         64.8% (1548/2390) oneline=1021

So, you can see that emma and jblanket disagree on the amount of total
methods.  Hopefully, you guys can figure out the specific differences.


Now, let me explain the emma.build.xml and the execution of emma. Take a
look at http://csdl.ics.hawaii.edu/~kagawaa/emma/-commandprompt-emma.txt
and the emma.build.xml in svn

- Don't forget to do an "ant updateAntLib"

- The first execution of "ant -q -f emma.build.xml hackyCore_Build.emma"
will fail the build because tomcat was started without emma.jar on its
classpath and will not be put there dynamically.  I built this check in.
The first execution of this target will fail the build. All other
executions should be ok.  I'm not sure what should happen when an upgrade
of the emma.jar is necessary. Maybe I should have a target similar to
"ant updateAntLib".

In addition, you'll see that I commented out an attempt to startup tomcat
after I copied the emma.jar to the java.home/lib/ext.  I wasn't sure how
to exec startup without ant waiting for startup to finish.  Anyway, if
you uncomment the exec and comment out the fail, you'll see what i mean.

- I wrote the emma target based on the jblanket target so, everything
should be pretty similar.  Except, I did not follow Philip's change to
include jblanket.build.xml in the build.xml file.  I did the reverse to
ensure that the makeJunit MacroDef is overridden.  You'll see in this log
that http://csdl.ics.hawaii.edu/~kagawaa/emma/-commandprompt-emma.txt I
added an echo to make sure that I'll calling the right makeJunit.  When I
tried to copy jblanket's current setup (ie, including emma.build.xml in
the build.xml file), I don't see those makeJunit echos; see
http://csdl.ics.hawaii.edu/~kagawaa/emma/-commandprompt-emma2.txt ..
Thus, I think emma _will_have_ to be executed like this ant -q -f
emma.build.xml hackyCore_Build.emma

- Notice that I built in a waitfor task to wait for the coverage.ec. This
file is generated after tomcat shutdown.

- finally, I'm not sure if I should be deleting the
Tomcat\webapps\hackystat\ directory before trying anything, because when
you do a startup tomcat will load the hackystat webapp. If the bytecode
has been instrumented by a previous emma execution, coverage data starts
to be collected.  I'm unsure at this point whether an undeploy will wipe
out that data.  This is something that you guys can experiment with.


Anyway, you should all be able to try Emma. Just follow these steps:
1) ant updateAntLib
2) startup
3) ant -q -f emma.build.xml hackyCore_Build.emma
4) startup (because ant will fail and tomcat will shutdown to copy
emma.jar to jre/lib/ext) 5) ant -q -f emma.build.xml hackyCore_Build.emma
6) the reports are in build/reports/emma

Any suggestions are appreciated. And/Or just hack the code and let me
know about your changes.

As I previously stated, I've already implemented an Ant sensor for emma.
I'll be converting it to the V7 architecture and build process.

thanks, aaron

Reply via email to