Insufficient information on subant task

Questions about YourKit YouMonitor
Locked
Mathias
Posts: 10
Joined: Fri Nov 18, 2011 8:24 am

Insufficient information on subant task

Post by Mathias »

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
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Insufficient information on subant task

Post by Anton Katilin »

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
Mathias
Posts: 10
Joined: Fri Nov 18, 2011 8:24 am

Re: Insufficient information on subant task

Post by Mathias »

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
Vladimir Kondratyev
Posts: 1624
Joined: Tue Aug 10, 2004 7:52 pm

Re: Insufficient information on subant task

Post by Vladimir Kondratyev »

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!"
Ilya Kalikin
Posts: 16
Joined: Mon Jun 12, 2017 3:06 pm

Re: Insufficient information on subant task

Post by Ilya Kalikin »

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.
Mathias
Posts: 10
Joined: Fri Nov 18, 2011 8:24 am

Re: Insufficient information on subant task

Post by Mathias »

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 :)
Vladimir Kondratyev
Posts: 1624
Joined: Tue Aug 10, 2004 7:52 pm

Re: Insufficient information on subant task

Post by Vladimir Kondratyev »

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!"
Mathias
Posts: 10
Joined: Fri Nov 18, 2011 8:24 am

Re: Insufficient information on subant task

Post by Mathias »

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

Post by Mathias »

The sample project:

http://freigmbh.de/files/upload/Project ... ample1.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

Post by Mathias »

Okay, the images again, something went wrong:

Call tree:
Image

Tasks:
Image

Feel free to consolidate both posts ;)

Greetings

Mathias
Vladimir Kondratyev
Posts: 1624
Joined: Tue Aug 10, 2004 7:52 pm

Re: Insufficient information on subant task

Post by Vladimir Kondratyev »

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: 1624
Joined: Tue Aug 10, 2004 7:52 pm

Re: Insufficient information on subant task

Post by Vladimir Kondratyev »

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!"
Mathias
Posts: 10
Joined: Fri Nov 18, 2011 8:24 am

Re: Insufficient information on subant task

Post by Mathias »

It works, thanks :)

Greetings

Mathias
Locked