Fully featured low overhead profiler for Java EE and Java SE platforms.
Ultimate profiling and monitoring solution for Gradle, Maven, Ant, JUnit and TestNG.
Easy to use performance and memory profiler for .NET framework.

Insufficient information on subant task

Moderators: Vladimir Kondratyev, Anton Katilin

Insufficient information on subant task

Postby Mathias » Mon Oct 23, 2017 6:40 am

First off thanks for sharing your new project with the community. Incidentially I was just looking for something like this to analyse some long build times.

After fiddling around a bit I came upon a small problem: We use subant with an ordered filelist to execute the same target in multiple subfolders like this:

Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<project default="packaging-distribution" name="zzz-delegator">
    <target name="delegate">
        <fail unless="target">no target to delegate</fail>
        <subant antfile="build.xml" target="${target}" verbose="true">
          <propertyset>
             <propertyref name="project.dist.dir"></propertyref>
             <propertyref name="project.aop.dir"></propertyref>
             <propertyref name="project.deploy.dir"></propertyref>
          </propertyset>
             <filelist refid="project.ordered.modules"></filelist>
        </subant>
    </target>
</project>


In the ProjectX-UI there seems to be no way to see which folder the build.xml has been executed in:

Image

Greetings

Mathias
Mathias
 
Posts: 10
Joined: Fri Nov 18, 2011 8:24 am

Re: Insufficient information on subant task

Postby Anton Katilin » Mon Oct 23, 2017 3:50 pm

Hello Mathias

Thank you for the feedback. We'll try to address this issue in the next build.

Will it be enough if we add the full path to the build script to the target's detail (i.e. in the view shown in the bottom of your screenshot)?

Best regards,
Anton
Anton Katilin
 
Posts: 5565
Joined: Wed Aug 11, 2004 8:37 am

Re: Insufficient information on subant task

Postby Mathias » Mon Oct 23, 2017 4:39 pm

Hello Anton,

Having the full path to the build script in the detail view would suffice.
This would fully enable me to assign the underlying targets to the sub-ant used!

Thanks and Greetings

Mathias
Mathias
 
Posts: 10
Joined: Fri Nov 18, 2011 8:24 am

Re: Insufficient information on subant task

Postby Vladimir Kondratyev » Tue Oct 24, 2017 1:58 pm

Please try latest build #40 https://www.yourkit.com/projectx/eap/

Path to Ant file should be shown for "subant" task.

Best regards,
Vladimir Kondratyev
YourKit GmbH
http://www.yourkit.com
"Don't get lost in data, get information!"
Vladimir Kondratyev
 
Posts: 1444
Joined: Tue Aug 10, 2004 7:52 pm
Location: Düsseldorf, Germany

Re: Insufficient information on subant task

Postby Ilya Kalikin » Tue Oct 24, 2017 2:20 pm

Just to clarify. The "File" property is now written for each Ant target. It should be visible in the Detail view for all new Ant builds.
Ilya Kalikin
 
Posts: 2
Joined: Mon Jun 12, 2017 3:06 pm

Re: Insufficient information on subant task

Postby Mathias » Tue Oct 24, 2017 4:03 pm

First of all a big thanks for reacting so swiftly :)

I have good an bad news though:

* the good: for the above case it works perfectly
* the bad: for another case it does not

For the above case it works as the next target (compile-schemas) is defined in the same file as the target called via subant (doing-precompilation).
But: The target itself is not shown and I have a case where the next target is a target imported from somewhere else:

Image
Image

Of course, now I have a way around this by e.g. inserting an intermediary target in the subant's build.xml, which would be fine for me for now – but having more information about the subant-target actually executed (e.g. folder, properties) would still be nice :)
Mathias
 
Posts: 10
Joined: Fri Nov 18, 2011 8:24 am

Re: Insufficient information on subant task

Postby Vladimir Kondratyev » Tue Oct 24, 2017 7:26 pm

Mathias,

could you please provide simple sample script, which demonstrates missing target. We will be happy to fix this issue.

Best regards,
Vladimir Kondratyev
YourKit GmbH
http://www.yourkit.com
"Don't get lost in data, get information!"
Vladimir Kondratyev
 
Posts: 1444
Joined: Tue Aug 10, 2004 7:52 pm
Location: Düsseldorf, Germany

Re: Insufficient information on subant task

Postby Mathias » Tue Oct 24, 2017 7:40 pm

Sure, will do!
I'm out of the office tomorrow so its going to be thursday :)

Greetings

Mathias
Mathias
 
Posts: 10
Joined: Fri Nov 18, 2011 8:24 am

Re: Insufficient information on subant task

Postby Mathias » Thu Oct 26, 2017 11:00 am

The sample project:

http://freigmbh.de/files/upload/ProjectX-SubAntExample1.zip

Usage: Just call ant in the root-directory ;)

So, this is of course a very simplified version of what we are doing.
Essentially, the sub-builds (Delegate1 and Delegate2) just set the property name and have a single target doSomething which depends on target global.target.doSomething imported from another file (build-project.xml). This target just echos the contents of property name.

In my case, the global target of course does something more time consuming (e.g. compile some xsd depending on properties set in the sub-build via xmlbeans).

Looking for echo or global.target.doSomething I cannot determine via which sub-build it has been called:

Call tree view:
Image

Tasks view:
Image

Hope this helps,

Greetings,

Mathias
Mathias
 
Posts: 10
Joined: Fri Nov 18, 2011 8:24 am

Re: Insufficient information on subant task

Postby Mathias » Thu Oct 26, 2017 11:23 am

Okay, the images again, something went wrong:

Call tree:
Image

Tasks:
Image

Feel free to consolidate both posts ;)

Greetings

Mathias
Mathias
 
Posts: 10
Joined: Fri Nov 18, 2011 8:24 am

Re: Insufficient information on subant task

Postby Vladimir Kondratyev » Sat Oct 28, 2017 9:45 pm

Mathias, thank you for details.

We will try fix this issue in the next ProjectX build. I expect it on November 6. I'll post a notice here when the fix is available.

Best regards,
Vladimir Kondratyev
YourKit GmbH
http://www.yourkit.com
"Don't get lost in data, get information!"
Vladimir Kondratyev
 
Posts: 1444
Joined: Tue Aug 10, 2004 7:52 pm
Location: Düsseldorf, Germany

Re: Insufficient information on subant task

Postby Vladimir Kondratyev » Wed Nov 08, 2017 1:12 pm

Hi, Mathias,

we released build #41 of ProjectX. Now path to build file and Ant target are shown in intermediate node. Please give it a try https://www.yourkit.com/projectx/eap/

Best regards,
Vladimir Kondratyev
YourKit GmbH
http://www.yourkit.com
"Don't get lost in data, get information!"
Vladimir Kondratyev
 
Posts: 1444
Joined: Tue Aug 10, 2004 7:52 pm
Location: Düsseldorf, Germany

Re: Insufficient information on subant task

Postby Mathias » Wed Nov 08, 2017 4:33 pm

It works, thanks :)

Greetings

Mathias
Mathias
 
Posts: 10
Joined: Fri Nov 18, 2011 8:24 am


Return to ProjectX

Who is online

Users browsing this forum: No registered users and 1 guest