Reputation: 101
Is there some way to automatically run a pre- and post-build script in Flash Builder/Eclipse to track the amount of time spent compiling throughout the day? Basically I'd want something like this:
Pre-Build: Output timestamp to file (or set some sort of Eclipse variable, if possible)
Post-Build: Read starting timestamp from file, subtract from current timestamp, append this build time to another file (or add to a running total)
The idea is that I can track how much time I spend throughout the day just waiting for my project to compile, to make a case for the product team to spend some time improving build times, as it would end up saving us time in the long-run.
It seems like I might be able to do this with Flex Ant Tasks, but 1) I've never set up a Flex Ant Task, so I'm not sure how, and 2) coming from the world of Visual Studio, it seems like there'd be some easy way to set scripts to run before and after compilation.
Upvotes: 0
Views: 150
Reputation: 56
I know this probably doesn't work either (since it requires ant-contrib), but we use the "Stopwatch" task of ant-contrib. http://ant-contrib.sourceforge.net/tasks/tasks/
Also, ant-contrib has some other very useful features like: if for foreach PropertyRegex Variable
Example of the end of our build scripts:
BUILD SUCCESSFUL
Total time: 37 minutes 46 seconds
[timestamp]: Build started on: Sat Aug 31 06:05:50 PDT 2013
[timestamp]: Build completed on: Sat Aug 31 06:43:35 PDT 2013
[timestamp]: Total Build Time: 37 Min 45 seconds
Finished: SUCCESS
Upvotes: 1