News: Ant Utility For Build Analysis
Wondering why your Ant build is slow? Is your continuous integration server taking too long to produce your project builds? This project may help. This project includes a small number of classes for use with Ant that can help you to analyze your build in a non-intrusive manner. How it works: Ant provides some great facilities for customization. One of them is the org.apache.tools.ant.BuildListener . By implementing a build listener, you can get detailed information about the build without changing your build scripts. This utility contains a build listener that gathers and accumulates timing metrics for your build, and produces a report. The report can be visually inspected, or loaded into a spreadsheet since it's in CSV format. See https://antutility.dev.java.net/ for more details.
- Posted by: David Green
- Posted on: July 06 2007 10:58 EDT
- Ant > JUnit > Hibernate by William Louth on July 06 2007 16:22 EDT
- Is anyone using Ant anymore ? by Nicolas Modrzyk on July 09 2007 00:12 EDT
- Nice tool by Peter Mularien on July 10 2007 10:45 EDT
- JUnit Testing with Hibernate by Sylvan Sam on May 15 2009 02:32 EDT
A very, very long time ago I added an extension to JXInsight that performs this and integrates the data with measurement data obtained from other extensions involved. The following article shows the profiling of ant tasks, junit tests cases as well as trace and transaction of Hibenate runtime. There is even tracing across processes and the data collected includes: CPU time, clock time, wait time, GC time, thread monitoring blocking time,.... Certainly enough information to understand any complex Ant build environment. http://www.jinspired.com/products/jxinsight/antjunittracing.html Today it would be even possible to profile and perform transaction analysis of a Ant build.xml containing JUnit/TestNG test cases calling over the wire (RMI, CORBA) to EJBs and then via JDBC to the database from within the JXInsight management console. Merge the snapshots from each process and you have distributed trace and transaction analysis!!! You can then perform some offline asserts on the actual execution behavior. All cool on paper and it does work but to be honest in practice most developers have very little incentive to be that diligent. regards, William Louth JXInsight Product Architect JINSPIRED "Performance monitoring and problem management for Java EE, SOA and Grid Computing" http://www.jinspired.com
with all the time wasted trying to get the xml junk to do anything anything that taking gigabytes in the SCM ? I am definitely in favor of tools like Buildr that can help me do an if or a for statement in less than 30 lines of xml junk. If the tool is taking time to write, time to execute, time to profile ... I think it's worth looking into alternatives.
All world is using Ant!
That's rhetorical. Hands up who's using buildr.
XML is not meant for human consumption, least of all configuration files. Just my 2 cents.
This is pretty nifty, David. Nice job! Had any thoughts about integrating the output into a CI tool such as CruiseControl?
This is pretty nifty, David. Nice job!Thanks, Peter. The intent was simple and non-intrusive. As far as CI integration, that's a great idea. No plans yet -- but it could be done. Perhaps the easiest thing to do would be to output the results as XML and provide a stylesheet that converts it to a nice HTML report. The CI build could then copy the report to the published artifacts folder. Thoughts?
Had any thoughts about integrating the output into a CI tool such as CruiseControl?
A method under test uses Hibernate to query the database. Hence the test case prepares data by inserting them into the table. For eg let us say feature A works with emp table and is developed and tested. Now for feature B, a new column is added to the same emp table, Although feature A does not depend on this column all test cases of feature A needs to updated now. This is turning out to be a costly issue. Is there is a better way to do this ?