debuggers: import openocd-0.7.0
Initial check-in of openocd-0.7.0 as it can be downloaded from http://sourceforge.net/projects/openocd/files/openocd/0.7.0/ Any modifications will follow. Change-Id: I6949beaefd589e046395ea0cb80f4e1ab1654d55
This commit is contained in:
45
debuggers/openocd/jimtcl/tools/benchtable.tcl
Normal file
45
debuggers/openocd/jimtcl/tools/benchtable.tcl
Normal file
@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env tclsh
|
||||
#
|
||||
# Tabulate the output of Jim's bench.tcl -batch
|
||||
#
|
||||
# Copyright (C) 2005 Pat Thoyts <patthoyts@users.sourceforge.net>
|
||||
#
|
||||
|
||||
proc main {filename} {
|
||||
set versions {}
|
||||
array set bench {}
|
||||
set f [open $filename r]
|
||||
while {[gets $f data] >= 0} {
|
||||
lappend versions [lindex $data 0]
|
||||
set results [lindex $data 1]
|
||||
foreach {title time} $results {
|
||||
lappend bench($title) $time
|
||||
}
|
||||
}
|
||||
close $f
|
||||
|
||||
puts "Jim benchmarks - time in milliseconds"
|
||||
puts -nonewline [string repeat " " 21]
|
||||
foreach v $versions {
|
||||
puts -nonewline [format "% 6s " $v]
|
||||
}
|
||||
puts ""
|
||||
|
||||
foreach test [lsort [array names bench]] {
|
||||
puts -nonewline "[format {% 20s} $test] "
|
||||
foreach v $bench($test) {
|
||||
if {$v eq "F"} {
|
||||
puts -nonewline " F "
|
||||
} else {
|
||||
puts -nonewline [format "% 6d " $v]
|
||||
}
|
||||
}
|
||||
puts ""
|
||||
}
|
||||
}
|
||||
|
||||
if {!$tcl_interactive} {
|
||||
set r [catch {eval [linsert $argv 0 main]} res]
|
||||
puts $res
|
||||
exit $r
|
||||
}
|
||||
Reference in New Issue
Block a user