OLD | NEW |
1 #!/bin/tclsh | 1 #!/bin/tclsh |
2 # | 2 # |
3 # Run this script in the same directory as the "vdbe_profile.out" file. | 3 # Run this script in the same directory as the "vdbe_profile.out" file. |
4 # This script summarizes the results contained in that file. | 4 # This script summarizes the results contained in that file. |
5 # | 5 # |
6 if {![file readable vdbe_profile.out]} { | 6 if {![file readable vdbe_profile.out]} { |
7 error "run this script in the same directory as the vdbe_profile.out file" | 7 error "run this script in the same directory as the vdbe_profile.out file" |
8 } | 8 } |
9 set in [open vdbe_profile.out r] | 9 set in [open vdbe_profile.out r] |
10 set stmt {} | 10 set stmt {} |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 foreach op [lsort [array names opcnt]] { | 73 foreach op [lsort [array names opcnt]] { |
74 set cx $opcnt($op) | 74 set cx $opcnt($op) |
75 set tx $opcycle($op) | 75 set tx $opcycle($op) |
76 if {$cx==0} { | 76 if {$cx==0} { |
77 set ax 0 | 77 set ax 0 |
78 } else { | 78 } else { |
79 set ax [expr {$tx/$cx}] | 79 set ax [expr {$tx/$cx}] |
80 } | 80 } |
81 puts [format {%8d %12d %12d %s} $cx $tx $ax $op] | 81 puts [format {%8d %12d %12d %s} $cx $tx $ax $op] |
82 } | 82 } |
OLD | NEW |