Re: Can DefaultLogger record the time on each target transition?
Jeffrey, In addition to backwards compatibility, there are other issues to consider: 1) Granularity: why limit timing data to targets? why not extend it to tasks as well? Personally, I'm not interested in timing tasks. Perhaps that could be debated another time. 2) Filtering: do you want timing data for every target? every task? As above. I'm interested for this (closing) discussion to consider target only, not task. Also, this proposal is asking for the a time since start of build not total time taken for target, start to finish. Specifically, the time when the target starts, not the time when the target ends. and the big one 3) Multithreading: as the committers on this list will tell you, I'm always thinking about this one. At IBM, we use Ant + in-house antlibs to build the WebSphere family of products. We're fortunate to have very good hardware in our build lab, and with products as large as WebSphere we're keen on making the most efficient use of it; one of the ways we do that is to multithread our builds. In our initial experiments we wanted to get timing data to compare against our single-threaded builds, so we wrote our own custom logger (just slight changes to the default logger) to print the timings. When we ran the builds, everything went haywire. I see how multithreading would affect a strategy to collect timings. Again though I'm asking for something else. --- I think however I I'll let this drop now. There's enough weight of opinion against the change for it to obviously futile to carry on. No consensus is emerging. Have fun, - Paul
Re: Can DefaultLogger record the time on each target transition?
Jeffrey E Care wrote: In addition to backwards compatibility, there are other issues to consider: 1) Granularity: why limit timing data to targets? why not extend it to tasks as well? 2) Filtering: do you want timing data for every target? every task? and the big one 3) Multithreading: as the committers on this list will tell you, I'm always thinking about this one. At IBM, we use Ant + in-house antlibs to build the WebSphere family of products. We're fortunate to have very good hardware in our build lab, and with products as large as WebSphere we're keen on making the most efficient use of it; one of the ways we do that is to multithread our builds. In our initial experiments we wanted to get timing data to compare against our single-threaded builds, so we wrote our own custom logger (just slight changes to the default logger) to print the timings. When we ran the builds, everything went haywire. The upshot is that we had to write our own logger from scratch to meet our needs for running in a multithreaded environment. I know that most people don't do this, but I don't think we should be introducing code into Ant that we KNOW doesn't work in certain cases. +1 I'm all for logging time data, and I have switched to using the logger of ant1.7 that prints out when a build finished. But any change to the log can break things. Even adding the time of build success/failure was enough to break luntbuild, that was looking for a string as well as an exit code. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can DefaultLogger record the time on each target transition?
In addition to backwards compatibility, there are other issues to consider: 1) Granularity: why limit timing data to targets? why not extend it to tasks as well? 2) Filtering: do you want timing data for every target? every task? and the big one 3) Multithreading: as the committers on this list will tell you, I'm always thinking about this one. At IBM, we use Ant + in-house antlibs to build the WebSphere family of products. We're fortunate to have very good hardware in our build lab, and with products as large as WebSphere we're keen on making the most efficient use of it; one of the ways we do that is to multithread our builds. In our initial experiments we wanted to get timing data to compare against our single-threaded builds, so we wrote our own custom logger (just slight changes to the default logger) to print the timings. When we ran the builds, everything went haywire. The upshot is that we had to write our own logger from scratch to meet our needs for running in a multithreaded environment. I know that most people don't do this, but I don't think we should be introducing code into Ant that we KNOW doesn't work in certain cases. JEC Jeffrey E. (Jeff) Care [EMAIL PROTECTED] IBM WebSphere Application Server Development WAS Pyxis Lead Release Engineer Paul Hammant [EMAIL PROTECTED] wrote on 08/18/2006 06:25:20 AM: Without any cited cases I am prepared to believe that someone is programatically processing default log output in such a way that it would break if it found one of.. compile @ 1 minute 12 seconds: compile (1 minute 12 seconds): compile: (at 1 minute 12 seconds) .. and that it would be too much for that team to fix their application to accommodate the new info. Perhaps an ant.exe command line switch could do it ( -timedTargets ) or an environmental variable ( -DtimedTargets=true ) Bugzilla bug 27771 is in the same realm too - http:// issues.apache.org/bugzilla/show_bug.cgi?id=27771 and hints that an additional temporal element to the Default Logger output would be problematic. - Paul On Aug 14, 2006, at 4:58 AM, Jeffrey E Care wrote: I wouldn't make the assumption that ALL automated log analyzers use the XML format. __ __ Jeffrey E. (Jeff) Care [EMAIL PROTECTED] IBM WebSphere Application Server Development WAS Pyxis Lead Release Engineer Paul Hammant [EMAIL PROTECTED] wrote on 08/11/2006 04:34:21 PM: Alexey, This one works: dir ham.txtoutput.log 21 ant [target] output.log 21 .. works well. Tis up to you guys to change the DefaultLogger or not. It sure looks nice when you run it and there's no harm as electronic processors of Ant output (like CruiseControl) use the XML logger. - Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can DefaultLogger record the time on each target transition?
Without any cited cases I am prepared to believe that someone is programatically processing default log output in such a way that it would break if it found one of.. compile @ 1 minute 12 seconds: compile (1 minute 12 seconds): compile: (at 1 minute 12 seconds) .. and that it would be too much for that team to fix their application to accommodate the new info. Perhaps an ant.exe command line switch could do it ( -timedTargets ) or an environmental variable ( -DtimedTargets=true ) Bugzilla bug 27771 is in the same realm too - http:// issues.apache.org/bugzilla/show_bug.cgi?id=27771 and hints that an additional temporal element to the Default Logger output would be problematic. - Paul On Aug 14, 2006, at 4:58 AM, Jeffrey E Care wrote: I wouldn't make the assumption that ALL automated log analyzers use the XML format. __ __ Jeffrey E. (Jeff) Care [EMAIL PROTECTED] IBM WebSphere Application Server Development WAS Pyxis Lead Release Engineer Paul Hammant [EMAIL PROTECTED] wrote on 08/11/2006 04:34:21 PM: Alexey, This one works: dir ham.txtoutput.log 21 ant [target] output.log 21 .. works well. Tis up to you guys to change the DefaultLogger or not. It sure looks nice when you run it and there's no harm as electronic processors of Ant output (like CruiseControl) use the XML logger. - Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can DefaultLogger record the time on each target transition?
I wouldn't make the assumption that ALL automated log analyzers use the XML format. Jeffrey E. (Jeff) Care [EMAIL PROTECTED] IBM WebSphere Application Server Development WAS Pyxis Lead Release Engineer Paul Hammant [EMAIL PROTECTED] wrote on 08/11/2006 04:34:21 PM: Alexey, This one works: dir ham.txtoutput.log 21 ant [target] output.log 21 .. works well. Tis up to you guys to change the DefaultLogger or not. It sure looks nice when you run it and there's no harm as electronic processors of Ant output (like CruiseControl) use the XML logger. - Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can DefaultLogger record the time on each target transition?
Alexey, This one works: dir ham.txtoutput.log 21 ant [target] output.log 21 .. works well. Tis up to you guys to change the DefaultLogger or not. It sure looks nice when you run it and there's no harm as electronic processors of Ant output (like CruiseControl) use the XML logger. - Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can DefaultLogger record the time on each target transition?
Alexey, Have you tried 21 redirection? Thanks for tip. I've tried it and it has no effect I'm looking for. What is it supposed to do on Windows XP ? dir 21 ham.txt (there's no ham.txt afteward, output was not redirected as hoped) - Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can DefaultLogger record the time on each target transition?
This one works: dir ham.txtoutput.log 21 - Alexey. On 8/10/06, Paul Hammant [EMAIL PROTECTED] wrote: Alexey, Have you tried 21 redirection? Thanks for tip. I've tried it and it has no effect I'm looking for. What is it supposed to do on Windows XP ? dir 21 ham.txt (there's no ham.txt afteward, output was not redirected as hoped) - Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Alexey N. Solofnenko trelony at gmail.com home: http://trelony.cjb.net/ Pleasant Hill, CA (GMT-8 hours usually)
Re: Can DefaultLogger record the time on each target transition?
On Thu, 10 Aug 2006, Paul Hammant [EMAIL PROTECTED] wrote: Have you tried 21 redirection? Thanks for tip. I've tried it and it has no effect I'm looking for. What is it supposed to do on Windows XP ? Assuming it does the same thing on Windows as it does in /bin/sh derivates on other platforms: redirect file descriptor 2 (stderr) to the same destination as descriptor 1 (stdout). Actually is a shortcut for 1 and for 0 where file descriptor 0 is stdin. Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can DefaultLogger record the time on each target transition?
Have you tried 21 redirection? - Alexey. On 8/9/06, Paul Hammant [EMAIL PROTECTED] wrote: To code it in org.apache.tools.ant.DefaultLogger, add ... + @ + formatTime(System.currentTimeMillis() - startTime) ... to the msg being prepared. Like so public void targetStarted(BuildEvent event) { if (Project.MSG_INFO = msgOutputLevel !event.getTarget().getName().equals()) { String msg = StringUtils.LINE_SEP + event.getTarget().getName() + @ + formatTime( System.currentTimeMillis() - startTime) + :; printMessage(msg, out, event.getPriority()); log(msg); } } Works sweetly, but we don't want to maintain a forked Ant. The other solution for us was to launch ant like so : ant -verbose -listener org.apache.tools.ant.listener.CommonsLoggingListener ant-output.txt The redirection '' is out and err to the same log file. That only works on Unix. On Windows the ant-output.txt 2ant-output.txt causes teh process handelr to barf suggesting the file is already in use. All we wanted was to work out how long each target was taking, without switching to an XML logging format.. - Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Alexey N. Solofnenko trelony at gmail.com home: http://trelony.cjb.net/ Pleasant Hill, CA (GMT-8 hours usually)