Tk Library Source Code

View Ticket
Login
Ticket UUID: 701077
Title: normbench can't process newest runbench output
Type: Bug Version: None
Submitter: techentin Created on: 2003-03-10 19:58:49
Subsystem: tclbench Assigned To: hobbs
Priority: 9 Immediate Severity:
Status: Closed Last Modified: 2003-08-07 07:58:55
Resolution: Fixed Closed By: hobbs
    Closed on: 2003-08-07 00:58:55
Description:
normbench.tcl fails to process the results of the latest 
runbench.tcl, with this stack trace.

TCL_INTERP: 1:8.4.2 2:8.4.2
STARTED 2003-03-10 12:42:02 (runbench.tcl v1.15)
Benchmark 1:8.4.2 ./tclkit-cc/tclsh8.4
bbccdeeeffghkllmmmmpprrssstuvw 00:04:28 elapsed
can't read "format": no such variable
    while executing
"switch -exact -- $format {
            text { puts stdout [normalize-text $norm $line] }
            list { puts stdout [normalize-list $norm $line] }
            csv  {
        ..."
    (procedure "normalize" line 22)
    invoked from within
"normalize $opts(norm) [read -nonewline $opts(fid)]
"
    (file "./normbench.tcl" line 202)


The offending line in the runbench.tcl output is 
  251591 milliseconds
which passes the header-skipping [string match] at the 
top of the 'normalize' proc, but it doesn't fall into any of 
the version detection cases.

You could fix this by changing the output format from 
runbench, so that this line doesn't have numeric first 
characters.

A better solution might be to improve the header 
detection section to check for string matches against 
the format patterns.  For example (untested)

  set format "unknown"
  foreach line $lines {
      if {$format=="unknown"} {
          switch -glob -- $line {
              "0,VER*" {set format csv}
              ....
          }
      continue
      }
     ....
User Comments: hobbs added on 2003-08-07 07:58:55:
Logged In: YES 
user_id=72656

fixed in head.