#1
|
|||
|
|||
Outputting Elapsed Time in HTML
In addition to the defaults of Start/Finish time, etc. that are listed in the HTML version of the log, I'd like to add the total elapsed time as well, which appears to be an already created field for me in the .log file itself.
I have edited my .xslt file to include the lines: <td class="tablehdr">Elapsed</td> and <td><xsl:value-of select="status/@elapsed"/></td> in the Summary area. This works and looks great for every build except the current one, where the table cell is simply blank. And that's all I really care about since I start my log file from scratch every time. Any ideas on how to get that field to show up? Thanks, Rob |
#2
|
|||
|
|||
The Transform XML Log action does not currently write the elapsed time for the current build when closing the XML log file (it should, and we've put it on the list), and the logging component won't add it until the build has completed (which is too late to get reported on during that build run). The attached sample shows how to write the missing value out after the log file has been closed and generate the HTML report from the modified log file, and it also includes TransformLog2.xlst file with an elapsed time column (LogElapsed.bld expects it to be in your VisBuildPro\Style folder).
|
#3
|
|||
|
|||
You'll definitely want to use Int() instead of CInt() in the script step of this build. Int() truncates fractions, where CInt() rounds.
My build was >30 min. and <60 min., so because of the rounding problem, it told me my build was 1 hour, -13 min, -19 sec. Rob |
#4
|
|||
|
|||
You learn something new every day. We've also updated the download with a fix to the Transform XML Log action, so the workaround script is no longer necessary.
|
|
|