We are currently using Jenkins in our CI environment to perform builds. Is there anyway to use dynaTrace to get performance data on ANT (and running in Jenkins)? For example, for a build target named "Test 1" that has 3 tasks defined, I want to see method data on the ANT classes, tasks, etc. for each task(s). So, essentially for a long running ANT task, I want to isolate which methods, etc. are long-running under ANT. Has anyone been able to do this under Jenkins? I know there is a test automation plugin but on first glance it doesn't seem to provide this (I could be wrong).
Answer by Wolfgang G. ·
Hi, I don't think you would need a plugin for that as Jenkins allows you to add Java options to the Ant execution:
I have just given it a quick try and instrumented the following methods for the org.apache.tools.ant.Task class (as "active and starts PurePaths"):
This results in a number of PurePaths during the build. I haven't looked into the other methods of that class now, but this looks like a potential starting point
Thanks for the quick reply. I had actually looked at the plug-in and, while very interesting, I also didn't think that I needed this to accomplish what I was looking for. I had my "Build" configuration similar to what you listed above with the exception of explicitly listing the targets and build file (these are not necessary based on our Jenkins configuration but provide the ability to obviously specify and limit what is run). I also did not have the dtagent property set which seems to be the missing culprit. Thanks again...
Answer by Dominik S. ·
Hi, if I read the question correctly you are interested in analyzing where the ant build itself spends most of it's time?
If this is the case, we have done some internal work on this topic for one of our build-processes. I have attached a copy of the information as PDF at Measuring Performance of an Ant build process.pdf, also a preconfigured system profile is available under Ant.profile.xml
FYI when doing this inside Jenkins, you will probably need to inject the dynaTrace agent via setting the environment variable ANT_OPTS or JAVA_OPTS if you use the Ant-executable script ant.bat/ant.sh, not sure if there is an easy way to inject in the builtin-Ant builder in Jenkins, maybe you need to switch to a shell-based build-steps and invoke Ant from there to get injected.
Answer by Michael B. ·
Hi Thomas,
Please check out this plugin from Wolfgang. It should be what you're looking for.
https://community.compuwareapm.com/community/display/DL/Test+Automation+Plugin+for+Jenkins
Thanks,
Mike
JANUARY 15, 3:00 PM GMT / 10:00 AM ET