Changeset 3501


Ignore:
Timestamp:
Mar 14, 2013, 6:27:53 PM (12 years ago)
Author:
mmc
Message:

Created a new "rptimes" script that ingests run.xml files and creates
an SQLite database of execution times that can be used for the "instant on"
time prediction.

Updated the tool invocation to store the cputime and walltime in the
output section, so we don't have to look at middleware log files. Each
run.xml file has all the info we need to extract execution time.

Location:
trunk/gui
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/apps/Makefile.in

    r3471 r3501  
    3838                rappture-csh.env \
    3939                rappture.use \
     40                rpdiff \
     41                rptimes \
    4042                rerun \
    4143                simsim  \
  • trunk/gui/scripts/tool.tcl

    r3330 r3501  
    324324        if {[regexp {=RAPPTURE-RUN=>([^\n]+)} $result match file]} {
    325325            set status [catch {Rappture::library $file} result]
    326             if {$status != 0} {
     326            if {$status == 0} {
     327                # add cputime info to run.xml file
     328                $result put output.walltime $times(walltime)
     329                $result put output.cputime $times(cputime)
     330            } else {
    327331                global errorInfo
    328332                set result "$result\n$errorInfo"
     
    331335            # if there's a results_directory defined in the resources
    332336            # file, then move the run.xml file there for storage
    333             if {[info exists _resources(-resultdir)]
    334                   && "" != $_resources(-resultdir)} {
     337            if {$status == 0 && [info exists _resources(-resultdir)]
     338                  && $_resources(-resultdir) ne ""} {
    335339                catch {
    336340                    if {![file exists $_resources(-resultdir)]} {
    337341                        _mkdir $_resources(-resultdir)
    338342                    }
    339                     file rename -force -- $file $_resources(-resultdir)
     343                    set tail [file tail $file]
     344                    set fid [open [file join $_resources(-resultdir) $tail] w]
     345                    puts $fid "<?xml version=\"1.0\"?>"
     346                    puts $fid [$result xml]
     347                    close $fid
     348                    file delete -force -- $file
    340349                }
    341350            }
Note: See TracChangeset for help on using the changeset viewer.